Skip to main content

Endpoint

method
string
DELETE

Authentication

This endpoint requires authentication using a Bearer token.
Authorization: Bearer DUB_API_KEY

Path Parameters

id
string
required
The unique ID of the customer. You may use either:
  • The customer’s id on Dub (obtained via /customers endpoint)
  • Their externalId (unique ID within your system, prefixed with ext_, e.g. ext_user_123456)

Response

Returns the ID of the deleted customer.
id
string
The unique ID of the deleted customer

Examples

curl -X DELETE https://api.dub.co/customers/cus_xyz123 \
  -H "Authorization: Bearer DUB_API_KEY"

Response Example

{
  "id": "cus_xyz123"
}
Deleting a customer will permanently remove all associated data. This action cannot be undone.

Build docs developers (and LLMs) love