Close a conversation

View as Markdown
Sets the conversation's `status` to `closed` and stamps `closed_at`. Closed conversations disappear from `GET /api/conversations` but remain readable by id. Any conversation of the workspace can be closed this way, not only webchat ones. Closing is not final. The next inbound message on the same thread (e.g. `POST /api/webchat/message` with the same `visitorId`) **reopens the same conversation**. Nothing is sent to the visitor. **Side effects.** Updates the conversation and writes an audit entry. **Idempotency.** Safe to retry. Closing an already-closed conversation returns 200 again and only moves `closed_at` forward. **Webhook events.** `audit.log_recorded` for subscribers that selected it explicitly. See [Webhooks](/webhooks). **Access** - **Required scope:** `write`. - **Rate limit:** General API — 120 requests/min per workspace (Starter), 200 (Growth), 300 (Business), 600 (Enterprise). The router applies it a second time on this route, with separate counters. See [Rate limits](/rate-limits). - **Plan:** Available on every plan.

Authentication

AuthorizationBearer
Workspace API key: `jl_` followed by 64 lowercase hex characters, created by the workspace owner in the dashboard (**Settings → API Keys**) and sent as `Authorization: Bearer jl_...`. The plaintext is shown once, at creation; Jelliu stores only a SHA-256 hash. A workspace can hold up to 25 active keys. | Scope | GET / HEAD | POST / PUT / PATCH / DELETE | Admin-only routes | | --- | --- | --- | --- | | `read` | Yes | No | No | | `write` | Yes | Yes | No | | `full` | Yes | Yes | Yes | Operations restricted to admins or owners reject keys without the `full` scope with `403`, and say so in their description. No key, whatever its scope, can mint or revoke API keys or rotate a webhook secret — that requires a signed-in owner session. A revoked key stops authenticating within about 10 seconds. See [Authentication](/authentication).

Path parameters

conversationIdstringRequiredformat: "uuid"
Id of the conversation to close. A value that is not a UUID returns 400.

Response

The conversation is closed.
dataobject

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
429
Too Many Requests Error