Docs menu

Update conversation

PATCH /v1/organisations/{organisation_id}/spaces/{space_id}/conversations/{conversation_id}

Renames the caller's chat or pins it to the top of listConversations.

Authentication

Send an API key, or an access token from your organisation’s identity provider, in the Authorization header. How API keys work

Scope the API key needs: conversations:write

Security schemes in the OpenAPI document: session_cookie (cookie __Host-ivy_session)bearer (bearer)api_key (bearer)

Parameters

  • organisation_id path string required
  • space_id path string required
  • conversation_id path string required

Request body

application/json UpdateConversation required

  • assignee string | null

    An active participant's key; an empty string clears it. Assigning an agent mentions it with instruction, and its turn acts for the caller.

  • channel_id string | null

    Moves a private conversation into this channel of the space, never back (needs the inviting right). Not a channel bound to Slack or Teams; an invited channel only when every person taking part is its member.

  • instruction string | null

    With an agent assignee: what the agent should do (1-20000 characters).

  • last_read integer (int64) | null

    The caller's read position: the index of the last message they read (0-based, at most the last message's).

  • notify NotifyLevel | null
  • pinned boolean | null

    For the caller alone once conversations with people are on.

  • status ConversationStatus | null
  • title string | null

    1-200 characters.

  • visibility ConversationVisibility | null

Responses

  • 200 application/json Conversation

    The chat

  • 401 application/json ErrorBody

    unauthenticated

  • 403 application/json ErrorBody

    workspace_content_restricted, invalid_origin, insufficient_scope; not_a_channel_member: moving into an open channel the caller hasn't joined, other than the default channel and the space's agent conversations channel

  • 404 application/json ErrorBody

    No such chat of the caller's in this space

  • 409 application/json ErrorBody

    workspace_archived

  • 422 application/json ErrorBody

    validation_failed: title must be 1-200 characters

  • 429 application/json ErrorBody

    rate_limited: the API key's requests per minute are used up; retry after Retry-After seconds

  • 500 application/json ErrorBody

    internal

  • 503 application/json ErrorBody

    unavailable: the database is briefly unavailable; retry after Retry-After seconds

Error codes

Errors come back as an ErrorBody whose code is one of these.

  • 401 unauthenticated
  • 403 workspace_content_restrictedinvalid_origininsufficient_scopenot_a_channel_member
  • 404 not_found generic code for this status
  • 409 workspace_archived
  • 422 validation_failed
  • 429 rate_limited
  • 500 internal
  • 503 unavailable

Examples

curl
curl -X PATCH "$IVY_API_URL/v1/organisations/$ORGANISATION_ID/spaces/$SPACE_ID/conversations/$CONVERSATION_ID" \
  -H "Authorization: Bearer $IVY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
JavaScript SDK
import { client, updateConversation } from "@spacivapp/ivy-sdk";

client.setConfig({
  baseUrl: process.env.IVY_API_URL,
  headers: { Authorization: `Bearer ${process.env.IVY_API_KEY}` },
});

const { data, error, response } = await updateConversation({
  path: { organisation_id: organisationId, space_id: spaceId, conversation_id: conversationId },
  body: {},
});
Example request body
{
  "assignee": "string",
  "channel_id": "channel_123",
  "instruction": "string",
  "last_read": 1,
  "notify": "all",
  "pinned": false,
  "status": "open",
  "title": "string",
  "visibility": "private"
}
Example response (200)
{
  "agent_id": "agent_123",
  "answer_mode": "every_message",
  "archived_at": "2026-01-15T09:30:00Z",
  "assignee": "string",
  "can_post": false,
  "channel_id": "channel_123",
  "chat_origin": {
    "binding_id": "binding_123",
    "channel_name": "Ada Lovelace",
    "platform": "slack"
  },
  "created_at": "2026-01-15T09:30:00Z",
  "created_by": {
    "id": "id_123",
    "type": "user"
  },
  "id": "id_123",
  "kind": "direct",
  "last_message_at": "2026-01-15T09:30:00Z",
  "last_read": 1,
  "last_reply_at": "2026-01-15T09:30:00Z",
  "last_reply_by": {
    "id": "id_123",
    "type": "user"
  },
  "latest_replies": [
    {
      "author": {
        "id": "id_123",
        "type": {}
      },
      "author_name": "Ada Lovelace",
      "author_platform": "slack",
      "created_at": "2026-01-15T09:30:00Z",
      "excerpt": "string",
      "mentions": [
        "string"
      ],
      "message_id": "message_123",
      "text": "Hello, Ivy",
      "text_cut": false
    }
  ],
  "mentioned": false,
  "notify": "all",
  "participant_keys": [
    "string"
  ],
  "peer_key": "string",
  "pinned": false,
  "post": {
    "author": {
      "id": "id_123",
      "type": {}
    },
    "author_name": "Ada Lovelace",
    "author_platform": "slack",
    "created_at": "2026-01-15T09:30:00Z",
    "excerpt": "string",
    "mentions": [
      "string"
    ],
    "message_id": "message_123",
    "text": "Hello, Ivy",
    "text_cut": false
  },
  "reply_count": 0,
  "run_state": "working",
  "space_id": "space_123",
  "status": "open",
  "title": "string",
  "unread_count": 0,
  "updated_at": "2026-01-15T09:30:00Z",
  "visibility": "private",
  "workspace_id": "workspace_123"
}