SupDesk API
SSupDesk API
API Reference
GETLiveness check/health
GETList article categories/v1/article-categoriesPOSTCreate an article category/v1/article-categories
GETGet an article category/v1/article-categories/{id}PATCHUpdate an article category/v1/article-categories/{id}DELETEDelete an article category/v1/article-categories/{id}
GETList help center articles/v1/articlesPOSTCreate a help center article/v1/articles
GETGet a help center article/v1/articles/{id}PATCHUpdate a help center article/v1/articles/{id}DELETEDelete a help center article/v1/articles/{id}GETSearch help center articles/v1/articles/search
GETList beta programs/v1/beta/programsPOSTCreate a beta program/v1/beta/programs
GETGet a beta program/v1/beta/programs/{id}PATCHUpdate a beta program/v1/beta/programs/{id}DELETEDelete a beta program/v1/beta/programs/{id}
GETList testers in a beta program/v1/beta/programs/{programId}/testersPOSTEnroll a tester in a beta program/v1/beta/programs/{programId}/testers
GETGet a beta tester/v1/beta/programs/{programId}/testers/{id}DELETERemove a tester from a beta program/v1/beta/programs/{programId}/testers/{id}
GETList published changelog entries/v1/changelogPOSTCreate a changelog entry/v1/changelog
GETGet a changelog entry/v1/changelog/{id}PATCHUpdate a changelog entry/v1/changelog/{id}DELETEDelete a changelog entry/v1/changelog/{id}
GETList customers/v1/customersPOSTCreate or resolve a customer/v1/customers
GETGet a customer/v1/customers/{id}PATCHUpdate a customer or link its identity/v1/customers/{id}DELETEDelete a customer/v1/customers/{id}
GETList feedback posts/v1/feedbackPOSTCreate a feedback post/v1/feedback
GETGet a feedback post/v1/feedback/{id}
GETList message threads/v1/messagesPOSTCreate a message thread/v1/messages
GETGet a message thread/v1/messages/{threadId}PATCHUpdate a message thread/v1/messages/{threadId}DELETEDelete a message thread/v1/messages/{threadId}
POSTAdd a message to a thread/v1/messages/{threadId}/messages
GETList submissions/v1/submissionsPOSTCreate a submission/v1/submissions
GETGet a submission/v1/submissions/{id}
GETList waitlist signups/v1/waitlist/signupsPOSTCreate or reuse a waitlist signup/v1/waitlist/signups
GETGet a waitlist signup/v1/waitlist/signups/{id}PATCHUpdate a waitlist signup/v1/waitlist/signups/{id}DELETEDelete a waitlist signup/v1/waitlist/signups/{id}
llms.txtPowered by Octri
PATCH/v1/customers/{id}

Update a customer or link its identity

Updates a customer's details or links the customer to another record representing the same person. Send name to change the name, or set primary_customer_id to link or unlink customer identities; the server validates identity links.

  • IdempotentThe SDK sends Idempotency-Key, so a retried request is only applied once.

1 parameter ยท 2 body fields
idstringrequired

The unique identifier of the customer to update.

The customer fields to update.

namestringoptional

The customer's name.

primary_customer_idstringoptional

The identifier of another customer to link as the same person, or null to unlink this customer.

4 status codes
200Returns the updated customer in the data object.
dataobjectoptional
400Returned when identity-link validation fails, including for a self-link, cross-project link, or chained link.
errorobjectoptional
401Returned when the request is unauthenticated.
errorobjectoptional
404Returned when no customer exists with the given id.
errorobjectoptional

Error handling

A 400 is returned when identity-link validation fails, including for a self-link, cross-project link, or chained link. A 401 is returned when the request is unauthenticated. A 404 is returned when the customer identified by the id path parameter does not exist.

import { SupDesk } from "supdesk-api-sdk";

const client = new SupDesk({
  baseUrl: "https://api.supdesk.app",
  auth: { bearer: process.env.API_TOKEN! },
});

const result = await client.customers.update({ id: "9b2f1c10-7a3e-4d54-8c2a-1f6b9e0d4a21" });
Response
{
  "data": {}
}
PreviousGet a customerNextDelete a customer