Skip to main content
PATCH
/
chats
/
{chat_id}
/
state
/
assign
Assign Conversation
curl --request PATCH \
  --url https://api.useinvent.com/chats/{chat_id}/state/assign \
  --header 'Content-Type: application/json' \
  --data '
{
  "member_id": "<string>"
}
'
{
  "id": "<string>",
  "state": "OPEN",
  "integration_id": "internal",
  "assistant_id": "<string>",
  "assistant_integration_id": "<string>",
  "conversation_id": "<string>",
  "ai_enabled": true,
  "admin_unseen_count": 123,
  "user_unseen_count": 123,
  "assistant_integration": {
    "id": "<string>",
    "enabled": true
  },
  "assigned_user": {
    "id": "<string>",
    "name": "<string>",
    "email": "[email protected]",
    "avatar": "<string>",
    "seen_at": "2023-11-07T05:31:56Z"
  },
  "assigned_at": "2023-11-07T05:31:56Z",
  "assistant_config": {
    "language": "auto",
    "model": "<string>",
    "stt": {
      "model": "<string>"
    },
    "tts": {
      "model": "<string>",
      "voice_id": "<string>"
    },
    "conversation": {
      "thread_mode": "new",
      "enable_memories": true,
      "enable_transfer_to_human_tool": true,
      "welcome_banner": "<string>",
      "suggested_messages": [
        "<string>"
      ],
      "auto_intro_message": "<string>",
      "enable_end_conversation_tool": true,
      "enable_block_contact_tool": true,
      "enable_private_chats": true
    },
    "knowledge_scope": "all",
    "instructions": "<string>"
  }
}

Path Parameters

chat_id
string
required

Chat ID

Body

Schema for assigning or unassigning a conversation to/from an agent

member_id
string | null
required

Member ID to assign. Set to null to unassign.

Response

200 - application/json

Schema for the chat state

id
string
required
state
enum<string>
required

The state status of the chat

Available options:
OPEN,
SNOOZED,
CLOSED
integration_id
enum<string>
required

ID of the connection integration

Available options:
internal,
custom,
whatsapp_bot,
messenger_bot,
instagram_dm,
twilio,
telnyx,
slack_bot,
telegram_bot,
gmail,
google_calendar
assistant_id
string | null
required

The ID of the assistant used in the chat

assistant_integration_id
string | null
required

The ID of the assistant integration used in the chat

conversation_id
string
required

The ID of the conversation associated with the chat

ai_enabled
boolean
required

Whether AI is enabled for the chat

admin_unseen_count
number
required

The number of unseen messages in the chat

user_unseen_count
number
required

The number of unseen messages in the chat

assistant_integration
object

Schema for a public assistant integration

assigned_user
object

The assigned user for the conversation

assigned_at
string<date-time> | null
assistant_config
object

Schema for the configuration of an assistant