---
title: "Close a conversation"
method: POST
path: "/assistant/conversations/{id}/close"
tags: ["assistant"]
---

# Close a conversation

`POST /assistant/conversations/{id}/close`

## Request

- Base URL: `https://api.gogoscreen.com/api/v1`
- URL: `https://api.gogoscreen.com/api/v1/assistant/conversations/{id}/close`
- Auth: HTTP bearer

End a conversation. It keeps its messages and can still be read; it takes no further questions, and the next one starts a new thread. Closing a conversation that is already closed answers the same thing, so a double click is not an error.

## Path parameters

- `id` string, uuid, required

## Headers

- `Idempotency-Key` string, required

## Response `200`

Close a conversation

- object
  - `conversation` object, required
    - `createdAt` string, date-time, required
    - `id` string, required: The conversation's id. Pass it as `conversationId` to keep asking in the same thread.
    - `lastMessageAt` string, date-time, nullable, required: When the thread was last written to. Null on a conversation with no messages yet.
    - `messageCount` integer, required: How many questions the customer has asked in this thread. The per-conversation cap counts this, not the replies.
    - `status` 'open' | 'closed' | 'handed_off', required: `open` takes another question. `closed` and `handed_off` both refuse one with 409 `conversation_closed`; start a new conversation.

## Other responses

- `400`: `validation_failed` — That request is not valid. · `idempotency_key_required` — This operation needs an Idempotency-Key header: a string of up to 128 characters, unique to this request, so a retry cannot do the work twice.
- `401`: `unauthorized` — Authentication is required.
- `403`: `forbidden_scope` — This credential does not carry the scope this operation needs. · `feature_disabled` — That feature is not available.
- `404`: `not_found` — No such resource. · `conversation_not_found` — No such conversation.
- `409`: `idempotency_conflict` — That idempotency key was already used with a different request. · `idempotency_in_progress` — That idempotency key is still being processed. · `conflict` — That request conflicts with the current state.
- `429`: `rate_limited` — Too many requests. Try again shortly.
- `500`: `internal_error` — Something went wrong. Try again.

---

[API](https://skmtc.dev/gogoscreen/apis/gogoscreen-api.md) · [All operations](https://skmtc.dev/gogoscreen/apis/gogoscreen-api/llms.txt) · [OpenAPI document](https://skmtc.dev/gogoscreen/apis/gogoscreen-api/revisions/2fd812319d75?raw)
