Skip to main content
When a request fails, the Dub Partner API returns an HTTP status code and a JSON body with a machine-readable error code, a human-readable message, a link to the docs and the request ID:
The request_id matches the Dub-Request-Id response header. Include it when you contact support about a specific request.

Error codes

  • Problem: The Authorization header doesn’t start with Bearer , the Dub-Version header isn’t a valid version, or sortBy=saleAmount is sent without a programId for a program that shares revenue with you.
  • Solution: Check that the request is properly formatted.
  • Problem: The API key is missing, invalid, or expired.
  • Solution: Make sure you are using a valid partner API key. See Authentication.
  • Problem: The API key is missing a required scope, the partner account isn’t approved in the Dub Partner Network, a large program doesn’t list its customers to you yet, or you can’t message the program on POST /messages.
  • Solution: Add the scopes named in the error message to your API key, or apply to the Dub Partner Network. You can message programs you’re enrolled in that have messaging turned on, and programs that have messaged you.
  • Problem: The programId you passed is a program you aren’t enrolled in, or Dub’s network program on GET /commissions.
  • Solution: Use the ID of a program you’re enrolled in. See List programs.
  • Problem: A query parameter is invalid, startingAfter and endingBefore were both sent, or a pagination ID doesn’t exist, belongs to another partner, or is outside the programId you passed.
  • Solution: Read the error message, which names the invalid field, and fix that value. See Pagination.
  • Problem: You have sent too many requests in a given amount of time.
  • Solution: Wait for the number of seconds in the Retry-After header, then try again. See Rate limits.
  • Problem: Something went wrong on Dub’s side.
  • Solution: Try again later. If the problem persists, contact support with the request ID.