Skip to main content
The Dub Partner API lets partners access their own data programmatically, across all the programs they’re enrolled in. Commissions from Dub’s network program aren’t included. You can use the API to:
The Partner API is available to all partners approved in the Dub Partner Network.
If you run a partner program and want to manage it programmatically, use the Dub API instead.

Base URL

The Partner API is built on REST principles and is served over HTTPS. The Base URL for all endpoints is:
Terminal

Authentication

Authenticate by sending your partner API key as a Bearer token in the Authorization header:
cURL

Versioning

You can select an API version per request with the Dub-Version header:
Terminal
mozart is currently the only version. When a request doesn’t include the header, Dub uses the version stored on the API key, then the default version. Every response returns the version that was used in its Dub-Version header. A Dub-Version value that isn’t a valid version returns a 400 error.

Request IDs

Every response includes a Dub-Request-Id header with a unique ID for the request, such as req_1KQ7YX7Z3H5T0A2B4C6D8E9F0G. The same ID is returned as request_id in error responses. Include it when you contact support about a specific request.

Error handling

Errors return a machine readable code, a human readable message, a link to the docs, and the request ID. See Errors for every error code and how to fix it.

Pagination

List endpoints return results in pages, using these query parameters: Responses have this shape:
data holds the items for the page, trimmed to id in this example, and stays in the requested sort order in both directions. hasMore is true when there are more items in the direction you’re paging. To page forward, send the id of the last item in data as startingAfter, and stop when hasMore is false. To page backward, send the id of the first item in data as endingBefore:
cURL
If an item stops matching your filters while you’re paging, for example because its status changed, you can still use its ID to get the next page.
Send either startingAfter or endingBefore, not both. An ID that doesn’t exist, belongs to another partner, or is outside the programId you passed returns a 422 error.