Update a contact
Updates a contact. Optional If-Match with the ETag from the latest GET, create, or update; a stale value returns 412 (unlike updateTask, If-Match is not required).
Each array you send replaces that array; omitted fields are unchanged. At least one email or phone must remain.
tags replaces the full label set. Contacts on deals shared with you are read-only; updating them returns 404.
Requires the api_contacts_update scope.
Authorization
bearerAuth Bearer token using a Clai API key secret (clai_live_*).
In: header
Path Parameters
| Name | Type | Description |
|---|---|---|
orgIdrequired | string | Organization ID the key is operating in |
contactIdrequired | string | Contact ID Format uuid |
Header Parameters
| Name | Type | Description |
|---|---|---|
If-Match | string | Optional ETag from the latest GET, create, or update. A stale value returns 412. Length 1 <= length |
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
| Name | Type | Description |
|---|---|---|
fullName | string | Length 1 <= length <= 200 |
emails | array<object> | |
valuerequired | string | |
label | string | Allowed "personal""work" |
phones | array<object> | |
valuerequired | string | |
label | string | Allowed "personal""work" |
addresses | array<object> | |
placeId | string | null | Default nullLength1 <= length |
formatted | string | Default ""Lengthlength <= 500 |
components | object | Default {"line1":"","line2":"","city":"","region":"","postalCode":"","country":""} |
line1 | string | Default ""Lengthlength <= 200 |
line2 | string | Default ""Lengthlength <= 200 |
city | string | Default ""Lengthlength <= 120 |
region | string | Default ""Lengthlength <= 120 |
postalCode | string | Default ""Lengthlength <= 40 |
country | string | Default ""Lengthlength <= 120 |
label | string | Allowed "personal""work" |
companies | array<object> | |
namerequired | string | Length 1 <= length <= 200 |
role | string | Length 1 <= length <= 120 |
links | array<object> | |
valuerequired | string | Length 1 <= length |
label | string | Allowed "personal""work" |
tags | array<string> | Items items <= 20 |
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X PATCH "https://app.goclai.com/api/v1/orgs/org_2abc123/contacts/550e8400-e29b-41d4-a716-446655440030" \ -H "Content-Type: application/json" \ -d '{}'{
"contactId": "b5ec5d98-4bee-4da1-ad24-dde86346cb1d",
"fullName": "string",
"email": "string",
"phone": "string",
"emails": [
{
"value": "string",
"label": "personal"
}
],
"phones": [
{
"value": "string",
"label": "personal"
}
],
"addresses": [
{
"placeId": "string",
"formatted": "string",
"components": {
"line1": "string",
"line2": "string",
"city": "string",
"region": "string",
"postalCode": "string",
"country": "string"
},
"label": "personal"
}
],
"companies": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"role": "string"
}
],
"links": [
{
"value": "string",
"label": "personal"
}
],
"tags": [
"string"
],
"dealActivity": "active",
"dealsCount": 0,
"lastActivityAt": "string",
"firstSeenAt": "string",
"createdAt": "string",
"updatedAt": "string",
"linked": true,
"contactUrl": "string"
}{
"error": {
"code": "ERROR_CODE",
"message": "Human-readable error message",
"details": {}
}
}{
"error": {
"code": "ERROR_CODE",
"message": "Human-readable error message",
"details": {}
}
}{
"error": {
"code": "ERROR_CODE",
"message": "Human-readable error message",
"details": {}
}
}{
"error": {
"code": "ERROR_CODE",
"message": "Human-readable error message",
"details": {}
}
}{
"error": {
"code": "ERROR_CODE",
"message": "Human-readable error message",
"details": {}
}
}{
"error": {
"code": "ERROR_CODE",
"message": "Human-readable error message",
"details": {}
}
}{
"error": {
"code": "ERROR_CODE",
"message": "Human-readable error message",
"details": {}
}
}{
"error": {
"code": "ERROR_CODE",
"message": "Human-readable error message",
"details": {}
}
}GETGet a contact
Returns one contact. The ETag header is the version to send as If-Match on update or delete. Requires the `api_contacts_list` scope.
DELETEDelete a contact
Soft-deletes a contact. Contacts linked to a Clai user account cannot be deleted (`409 CONTACT_LINKED`). Requires the `api_contacts_delete` scope.