Skip to content

Update a conversation

PATCH
/api/v1/conversations/{id}
curl --request PATCH \
--url https://digize.com/api/v1/conversations/example \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: 5f1c2a8e-3b7d-4c55-9a0e-1f2d3c4b5a69' \
--header 'x-api-key: <x-api-key>' \
--data '{ "status": "open", "unread": true, "assigneeId": "example" }'

Closes or reopens a conversation, marks it read or unread, or assigns it to a member (null for nobody).

Needs the crm:write permission.

id
required
string
>= 1 characters <= 64 characters
Idempotency-Key
string
>= 1 characters <= 255 characters

Makes the request safe to send again: for 24 hours the same key and request answer the first response without repeating the change.

Example

5f1c2a8e-3b7d-4c55-9a0e-1f2d3c4b5a69
Media typeapplication/json
object
status
string
Allowed values: open closed
unread
boolean
assigneeId
Any of:
string
>= 1 characters <= 64 characters

Done

Media typeapplication/json
object
id
required
string
contact
required
object
id
required
string
name
required
string
firstName
required
string
email
required
string | null
phone
required
string | null
channel
required
string
Allowed values: sms email
address
required

The workspace’s number or address the contact writes to.

string
subject
required

Emails only.

string | null
status
required
string
Allowed values: open closed
assigneeId
required

The member answering it, by user id.

string | null
unread
required
boolean
lastMessage
required
Any of:
object
kind
required
string
Allowed values: message call
direction
required
string
Allowed values: in out
authorKind
required
string
Allowed values: contact team automation system
body
required

The start of it, on one line.

string
status
required
string
Allowed values: pending queued sent delivered failed undelivered received
sentAt
required
string format: date-time
lastMessageAt
required
string format: date-time
optedOut
required

A text conversation whose contact replied STOP: nothing can be texted to them until they reply START.

boolean
createdAt
required
string format: date-time

Example

{
"channel": "sms",
"status": "open",
"lastMessage": {
"kind": "message",
"direction": "in",
"authorKind": "contact",
"status": "pending"
}
}

What was sent isn’t valid (invalid).

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

No key, or one that’s unknown, off or expired.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

The key doesn’t have the permission this needs.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

Nothing has that id (not_found).

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

A request with the same Idempotency-Key is still running (conflict).

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

The Idempotency-Key was used with a different request.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

Over the rate limit; see retry-after.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}