PATCH
/
customers
/
{id}
import { Dub } from "dub";

const dub = new Dub({
  token: "DUB_API_KEY",
});

async function run() {
  const result = await dub.customers.update("<id>");

  // Handle the result
  console.log(result);
}

run();
{
  "id": "<string>",
  "externalId": "<string>",
  "name": "<string>",
  "email": "<string>",
  "avatar": "<string>",
  "createdAt": "<string>"
}

Authorizations

Authorization
string
header
required

Default authentication mechanism

Path Parameters

id
string
required

The unique identifier of the customer in Dub.

Body

application/json
email
string | null

Email of the customer in the client's app.

name
string | null

Name of the customer in the client's app. If not provided, a random name will be generated.

avatar
string | null

Avatar URL of the customer in the client's app.

externalId
string

Unique identifier for the customer in the client's app.

Response

200
application/json
The customer was updated.
id
string
required

The unique identifier of the customer in Dub.

externalId
string
required

Unique identifier for the customer in the client's app.

name
string
required

Name of the customer.

createdAt
string
required

The date the customer was created.

email
string | null

Email of the customer.

avatar
string | null

Avatar URL of the customer.