Skip to content

Close a chat

POST /v1/contacts/{id}/close

Closes the contact’s chat.

Needs chats:write.

id string · uuid

The contact’s ID.

Idempotency-Key string

Makes this request safe to retry. See Retrying safely.

1 to 255 characters.

The bot answers the customer again, even if an agent is still assigned. The chat opens again when the customer writes, or with POST /v1/contacts/{id}/reopen.

Closing a closed chat changes nothing and still returns 200. chat.closed is sent only if the chat was open. The request takes no body: send none, or {}.

200 The chat object. The chat as it is now. contact is null unless your key also has contacts:read.

Besides the ones every request can get:

404not_foundThere is no contact with this ID in your workspace.
409idempotency_in_progressA request with the same Idempotency-Key is still running.
422idempotency_mismatchThe Idempotency-Key was used before for a different request, or by another of your API keys.