Skip to main content
GET
/
partners
Go
package main

import(
	"context"
	dubgo "github.com/dubinc/dub-go"
	"github.com/dubinc/dub-go/models/operations"
	"log"
)

func main() {
    ctx := context.Background()

    s := dubgo.New(
        dubgo.WithSecurity("DUB_API_KEY"),
    )

    res, err := s.Partners.List(ctx, operations.ListPartnersRequest{
        Status: operations.ListPartnersQueryParamStatusApproved.ToPointer(),
        Country: dubgo.String("US"),
        TenantID: dubgo.String("1K0NM7HCN944PEMZ3CQPH43H8"),
        IncludeExpandedFields: dubgo.Bool(false),
        Search: dubgo.String("john"),
        PageSize: dubgo.Float64(50),
    })
    if err != nil {
        log.Fatal(err)
    }
    if res != nil {
        // handle response
    }
}
[
  {
    "id": "<string>",
    "name": "<string>",
    "email": "<string>",
    "image": "<string>",
    "description": "<string>",
    "country": "<string>",
    "paypalEmail": "<string>",
    "stripeConnectId": "<string>",
    "payoutsEnabledAt": "<string>",
    "programId": "<string>",
    "groupId": "<string>",
    "partnerId": "<string>",
    "tenantId": "<string>",
    "createdAt": "<string>",
    "status": "pending",
    "links": [
      {
        "id": "<string>",
        "domain": "<string>",
        "key": "<string>",
        "shortLink": "<string>",
        "url": "<string>",
        "clicks": 0,
        "leads": 0,
        "sales": 0,
        "saleAmount": 0
      }
    ],
    "totalCommissions": 0,
    "clickRewardId": "<string>",
    "leadRewardId": "<string>",
    "saleRewardId": "<string>",
    "discountId": "<string>",
    "applicationId": "<string>",
    "bannedAt": "<string>",
    "bannedReason": "tos_violation",
    "clicks": 0,
    "leads": 0,
    "conversions": 0,
    "sales": 0,
    "saleAmount": 0,
    "netRevenue": 0,
    "website": "<string>",
    "websiteTxtRecord": "<string>",
    "websiteVerifiedAt": "<string>",
    "youtube": "<string>",
    "youtubeVerifiedAt": "<string>",
    "youtubeSubscriberCount": 123,
    "youtubeViewCount": 123,
    "twitter": "<string>",
    "twitterVerifiedAt": "<string>",
    "linkedin": "<string>",
    "linkedinVerifiedAt": "<string>",
    "instagram": "<string>",
    "instagramVerifiedAt": "<string>",
    "tiktok": "<string>",
    "tiktokVerifiedAt": "<string>"
  }
]
Partners endpoints require an Advanced plan subscription or higher.

Authorizations

Authorization
string
header
required

Default authentication mechanism

Query Parameters

status
enum<string>

A filter on the list based on the partner's status field.

Available options:
pending,
approved,
rejected,
invited,
declined,
banned,
archived
Example:

"approved"

country
string

A filter on the list based on the partner's country field.

Example:

"US"

sortBy
enum<string>
default:saleAmount

The field to sort the partners by. The default is saleAmount.

Available options:
createdAt,
clicks,
leads,
conversions,
sales,
saleAmount,
commissions,
netRevenue
Example:

"saleAmount"

sortOrder
enum<string>
default:desc

The sort order. The default is desc.

Available options:
asc,
desc
Example:

"desc"

tenantId
string

A case-sensitive filter on the list based on the partner's tenantId field. The value must be a string. Takes precedence over search.

Example:

"1K0NM7HCN944PEMZ3CQPH43H8"

includeExpandedFields
boolean

Whether to include stats fields on the partner (clicks, leads, conversions, sales, saleAmount, commissions, netRevenue). If false, those fields will be returned as 0.

Example:

"true"

A search query to filter partners by name, email, or tenantId.

Example:

"john"

page
number
default:1

The page number for pagination.

Required range: x > 0
Example:

1

pageSize
number
default:100

The number of items per page.

Required range: 0 < x <= 100
Example:

50

Response

The list of partners.

id
string
required

The partner's unique ID on Dub.

name
string
required

The partner's full legal name.

Maximum length: 190
email
string | null
required

The partner's email address. Should be a unique value across Dub.

Maximum length: 190
image
string | null
required

The partner's avatar image.

country
string | null
required

The partner's country (required for tax purposes).

paypalEmail
string | null
required

The partner's PayPal email (for receiving payouts via PayPal).

stripeConnectId
string | null
required

The partner's Stripe Connect ID (for receiving payouts via Stripe).

payoutsEnabledAt
string | null
required

The date when the partner enabled payouts.

programId
string
required

The program's unique ID on Dub.

partnerId
string
required

The partner's unique ID on Dub.

tenantId
string | null
required

The partner's unique ID within your database. Can be useful for associating the partner with a user in your database and retrieving/update their data in the future.

createdAt
string
required
status
enum<string>
required

The status of the partner's enrollment in the program.

Available options:
pending,
approved,
rejected,
invited,
declined,
banned,
archived

The partner's referral links in this program.

totalCommissions
number
default:0
required

The total commissions paid to the partner for their referrals. Defaults to 0 if includeExpandedFields is false.

clicks
number
default:0
required

The total number of clicks on the partner's links. Defaults to 0 if includeExpandedFields is false.

leads
number
default:0
required

The total number of leads generated by the partner's links. Defaults to 0 if includeExpandedFields is false.

conversions
number
default:0
required

The total number of leads that converted to paying customers. Defaults to 0 if includeExpandedFields is false.

sales
number
default:0
required

The total number of sales generated by the partner's links (includes recurring sales). Defaults to 0 if includeExpandedFields is false.

saleAmount
number
default:0
required

The total amount of sales (in cents) generated by the partner's links. Defaults to 0 if includeExpandedFields is false.

netRevenue
number
default:0
required

The total net revenue generated by the partner. Defaults to 0 if includeExpandedFields is false.

description
string | null

A brief description of the partner and their background.

Maximum length: 5000
groupId
string | null

The partner's group ID on Dub.

clickRewardId
string | null
leadRewardId
string | null
saleRewardId
string | null
discountId
string | null
applicationId
string | null

If the partner submitted an application to join the program, this is the ID of the application.

bannedAt
string | null

If the partner was banned from the program, this is the date of the ban.

bannedReason
enum<string> | null

If the partner was banned from the program, this is the reason for the ban.

Available options:
tos_violation,
inappropriate_content,
fake_traffic,
fraud,
spam,
brand_abuse
website
string | null

The partner's website URL (including the https protocol).

websiteTxtRecord
string | null
websiteVerifiedAt
string | null
youtube
string | null

The partner's YouTube channel username (e.g. johndoe).

youtubeVerifiedAt
string | null
youtubeSubscriberCount
number | null
youtubeViewCount
number | null
twitter
string | null

The partner's Twitter username (e.g. johndoe).

twitterVerifiedAt
string | null
linkedin
string | null

The partner's LinkedIn username (e.g. johndoe).

linkedinVerifiedAt
string | null
instagram
string | null

The partner's Instagram username (e.g. johndoe).

instagramVerifiedAt
string | null
tiktok
string | null

The partner's TikTok username (e.g. johndoe).

tiktokVerifiedAt
string | null
I