Skip to content

Update a contact

PATCH
/products/{productId}/contacts/{id}
curl --request PATCH \
--url https://api.motenya.app/v1/products/example/contacts/example \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "name": "example", "emails": [ "example" ], "phone": "example", "language": "example", "tags": [ "example" ], "custom": "example" }'

Only the fields sent change; emails and tags replace the whole list.

Requires crm:write.

productId
required
string
>= 1 characters <= 64 characters
id
required
string
>= 1 characters <= 64 characters
Media typeapplication/json
object
name
string | null
<= 200 characters
emails

Primary first; normalized to lowercase. Unique within the product.

Array<string> | null
<= 20 items
phone
string | null
<= 50 characters
language
string | null
<= 16 characters
tags
Array<string> | null
<= 30 items
custom

Custom field values keyed by field key; null clears one. See GET /products/{productId}/custom-fields.

object | null

Example generated

{
"name": "example",
"emails": [
"example"
],
"phone": "example",
"language": "example",
"tags": [
"example"
],
"custom": "example"
}

Success

Media typeapplication/json
object
id
required
string
>= 1 characters <= 64 characters
name
required
string | null
emails
required
Array<string>
phone
required
string | null
language
required
string | null
tags
required
Array<string>
custom
required
object
key
additional properties
source
required
string
externalId
required
string | null
clients
required
Array<object>
object
clientId
required
string
>= 1 characters <= 64 characters
name
required
string
kind
required
string
Allowed values: company individual
role
required
string | null
createdAt
required
string
updatedAt
required
string
key
additional properties

Example

{
"clients": [
{
"kind": "company"
}
]
}

Invalid request

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
field
string
details
Array<object>
object
code
required
string
message
required
string
field
string

Example

{
"error": {
"code": "SLUG_TAKEN"
}
}

Missing, invalid, revoked or expired API key

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
field
string
details
Array<object>
object
code
required
string
message
required
string
field
string

Example

{
"error": {
"code": "SLUG_TAKEN"
}
}

Missing scope, API turned off, published article without publish scope, or account suspended

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
field
string
details
Array<object>
object
code
required
string
message
required
string
field
string

Example

{
"error": {
"code": "SLUG_TAKEN"
}
}

Not found, or outside the knowledge bases this key may use

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
field
string
details
Array<object>
object
code
required
string
message
required
string
field
string

Example

{
"error": {
"code": "SLUG_TAKEN"
}
}

Slug or translation already exists

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
field
string
details
Array<object>
object
code
required
string
message
required
string
field
string

Example

{
"error": {
"code": "SLUG_TAKEN"
}
}

Rejected by validation (e.g. unknown language or category)

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
field
string
details
Array<object>
object
code
required
string
message
required
string
field
string

Example

{
"error": {
"code": "SLUG_TAKEN"
}
}

Rate limited; see Retry-After

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
field
string
details
Array<object>
object
code
required
string
message
required
string
field
string

Example

{
"error": {
"code": "SLUG_TAKEN"
}
}

Internal error