List all customers
Retrieve a paginated list of customers for the authenticated workspace.
1 min read
get/customers
Request example
Response
get/customers
Authorization
Query parameters
A case-sensitive filter on the list based on the customer's
email field. The value must be a string. Takes precedence over externalId.A case-sensitive filter on the list based on the customer's
externalId field. The value must be a string. Takes precedence over search.A search query to filter customers by email, externalId, or name. If
email or externalId is provided, this will be ignored.A filter on the list based on the customer's
country field.A filter on the list based on the customer's
linkId field (the referral link ID).Program ID to filter by.
Partner ID to filter by.
Whether to include expanded fields on the customer (
link, partner, discount).The field to sort the customers by. The default is
createdAt.Default: "createdAt"
Options:
createdAtsaleAmountfirstSaleAtsubscriptionCanceledAtIf specified, the query only searches for results before this cursor. Mutually exclusive with
startingAfter.If specified, the query only searches for results after this cursor. Mutually exclusive with
endingBefore.Responses
application/json
The list of customers.
The unique ID of the customer. You may use either the customer's
id on Dub (obtained via /customers endpoint) or their externalId (unique ID within your system, prefixed with ext_, e.g. ext_123).Name of the customer.
Email of the customer.
Avatar URL of the customer.
Unique identifier for the customer in the client's app.
The customer's Stripe customer ID. This is useful for attributing recurring sale events to the partner who referred the customer.
Country of the customer.
Total number of sales for the customer.
Total amount of sales for the customer.
The date the customer was created (usually the signup date or trial start date).
The date the customer made their first sale. Useful for calculating the time to first sale and LTV.
The date the customer canceled their subscription. Useful for calculating LTV and churn rate.
Show child attributesHide child attributes
The unique ID of the short link.
The domain of the short link. If not provided, the primary domain for the workspace will be used (or
dub.sh if the workspace has no domains).The short link slug. If not provided, a random 7-character slug will be generated.
The full URL of the short link, including the https protocol (e.g.
https://dub.sh/try).The destination URL of the short link.
The ID of the program the short link is associated with.