Update Contact

Change a contact's name, e-mail, phone, description, and custom attributes. Send only the fields to change: a field you leave out is kept, null clears it, and customAttributes is merged into the contact's attributes rather than replacing them. At least one field is required. A new phone number must carry its country code (+55 for Brazil): one without it is refused with 400 and code: PHONE_COUNTRY_CODE_MISSING, unless you send defaultCountryCode to add that code, and an incomplete one with code: PHONE_INVALID; the number the contact already has is accepted as it is. Phones are stored as digits. A phone number must be unique within the workspace once its digits are normalized; a collision is refused with 409 and code: PHONE_ALREADY_EXISTS, with contactId naming the contact that holds it. Correcting a phone makes the next WhatsApp message go to the new number. The key needs chat_contacts.update. A personal key edits the contact as its owner: their role must allow editing contacts (disableChatContactEdit). A personal key acts as its owner and never does more than they can in the app, right now: the owner's role, and for a conversation the owner's inboxes, teams and conversation access, decide. A refusal is 403 with details.code API_KEY_OWNER_PERMISSION_DENIED, naming the key permission and the part of the role that withholds it. A workspace key acts as Robô for the whole workspace and is held to no person's access. Every operation is scoped by the required workspaceId. A workspace-scoped API key that names any other workspace is refused with 403 before any query runs, so a workspace key can only ever reach its own workspace. A contact in another workspace is reported as 404, never as denied.

PATCH/api/v1/chat/contacts/{contactId}
X-API-Key<token>

Your Studio API key, personal or workspace-scoped. Generate one under Settings, then API Keys. Operations that reject workspace keys say so in their own description.

In: header

Path Parameters

contactId*string

Contact to update.

Length1 <= length

Request Body

application/json

The workspace and the fields to change. At least one field is required.

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PATCH "https://agent-studio.seeyu.ai/api/v1/chat/contacts/string" \  -H "X-API-Key: YOUR_API_KEY" \  -H "Content-Type: application/json" \  -d '{    "workspaceId": "ws_01J8F2K3N5P7",    "email": "ana.ribeiro@example.com",    "customAttributes": {      "plan": "enterprise"    }  }'
{
  "contact": {
    "id": "cnt_01J8F2K3N5P9",
    "name": "Ana Ribeiro",
    "firstName": "Ana",
    "lastName": "Ribeiro",
    "email": "ana.ribeiro@example.com",
    "phone": "+5511987654321",
    "avatarUrl": null,
    "gender": null,
    "description": null,
    "identifier": "crm-4821",
    "blocked": false,
    "contactType": 2,
    "company": {
      "id": "cmp_01J8F2K3N5PB",
      "name": "Ribeiro Ltda",
      "domain": "ribeiro.example"
    },
    "customAttributes": {
      "plan": "enterprise"
    },
    "additionalAttributes": {
      "source": "whatsapp"
    },
    "lastActivityAt": "2026-08-28T14:22:05.000Z",
    "createdAt": "2026-07-24T11:02:19.000Z"
  }
}
{
  "error": "The phone number has no country code. Send it in international format, such as +5585999990201 for a number in Brazil.",
  "code": "PHONE_COUNTRY_CODE_MISSING",
  "phone": "85999990201",
  "suggestedPhone": "+5585999990201"
}
{
  "error": "Unauthorized"
}
{
  "error": "The owner of this API key can't use the chat_messages.send permission: their role in this workspace doesn't allow disableChatMessageSend",
  "details": {
    "code": "API_KEY_OWNER_PERMISSION_DENIED",
    "permission": "chat_messages.send",
    "control": "disableChatMessageSend"
  }
}
{
  "error": "Conversation not found"
}
{
  "error": "This contact already has a conversation in progress",
  "code": "active_conversation_exists",
  "conversation": {
    "id": "conv_01J9Z2K3M4N5P6Q7R8S9T0",
    "inboxId": "inbox_01J9Z2K3M4N5P6Q7R8S9T0",
    "inboxName": "Support",
    "status": "open",
    "teamName": "Tier 1",
    "assigneeId": null,
    "assigneeName": null,
    "aiAgentActive": false
  }
}
{
  "error": "Rate limit exceeded",
  "message": "API rate limit exceeded. Please retry after 2026-09-13T12:00:00.000Z",
  "retryAfter": 1789286400000
}
{
  "error": "Internal server error",
  "requestId": "req_01J9Z2K3M4N5P6Q7R8S9T0"
}