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": {
    "id": "<string>",
    "name": "<string>",
    "enabled": true,
    "avatar_url": "<string>",
    "deleted": true,
    "config": {
      "conversation": {
        "welcome_banner": "<string>",
        "suggested_messages": [
          "<string>"
        ],
        "auto_intro_message": "<string>",
        "enable_auto_csat": true
      }
    }
  },
  "assistant_integration": {
    "id": "<string>",
    "enabled": true
  },
  "assigned_user": {
    "id": "<string>",
    "name": "<string>",
    "email": "jsmith@example.com",
    "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_auto_resolve": true,
      "enable_auto_follow_ups": true,
      "enable_auto_csat": true,
      "enable_private_chats": true
    },
    "knowledge_scope": "all",
    "timezone": "<string>",
    "instructions": "<string>"
  },
  "follow_up_at": "2023-11-07T05:31:56Z",
  "csat_score": 3,
  "last_contact_message_at": "2023-11-07T05:31:56Z"
}

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,
telegram_bot,
gmail,
slack_bot,
twilio,
telnyx,
email,
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
object

Schema for a public assistant

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

follow_up_at
string<date-time> | null

Scheduled follow-up datetime

csat_score
integer | null

Customer satisfaction score (1-5)

Required range: 1 <= x <= 5
last_contact_message_at
string<date-time> | null