Start a new chat with a contact on one of its custom channels. The chat is seeded with the contact channel as the sole member; the admin is not a chat member. Any initial message is authored as the contact.
curl --request POST \
--url https://api.useinvent.com/orgs/{org_id}/contacts/{contact_id}/channels/{channel_id}/chats \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"assistant_id": "<string>",
"title": "<string>",
"message": [
{
"type": "text",
"text": "<string>",
"start_timestamp": 123,
"end_timestamp": 123
}
]
}
'{
"id": "<string>",
"title": "<string>",
"model": "<string>",
"members": [
{
"id": "<string>",
"role": "ADMIN",
"user": {
"id": "<string>",
"name": "<string>",
"avatar": "<string>"
},
"session": {
"id": "<string>"
},
"contact_channel": {
"id": "<string>",
"type": "internal",
"user_id": "<string>",
"avatar": "<string>",
"name": "<string>",
"username": "<string>",
"email": "jsmith@example.com",
"phone": "<string>",
"country": "<string>",
"agent": "<string>",
"ip": "<string>",
"language": "<string>",
"contact": {
"id": "<string>",
"name": "<string>",
"blocked": true,
"is_admin": true
},
"link": "<string>"
}
}
],
"temporary": true,
"visibility": "PRIVATE",
"pinned": true,
"status": "RUNNING",
"shared_url": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"tools": [
{
"name": "<string>",
"display_name": "<string>",
"action_name": "<string>",
"description": "<string>",
"icon": "StepFormIcon",
"icon_url": "<string>",
"parameters": {},
"enabled_by_default": true,
"callback": "<string>",
"validation": "<string>"
}
],
"features": {
"web_search": {},
"reasoning": {
"effort": "low"
}
},
"org_id": "<string>",
"state": {
"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,
"has_connection": 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,
"enable_update_contact_tool": 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"
},
"link": "<string>",
"last_message": {
"id": "<string>",
"role": "user",
"model": "<string>",
"status": "RUNNING",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"messages": [
{
"role": "system",
"parts": [
{
"type": "text",
"text": "<string>",
"audio": {
"id": "<string>",
"file_path": "<string>",
"file_filename": "document.pdf",
"file_size": 1024,
"file_mimetype": "application/pdf",
"file_url": "<string>",
"created_at": "2023-11-07T05:31:56Z"
},
"start_timestamp": 123,
"end_timestamp": 123
}
]
}
],
"tools": [
{
"name": "<string>",
"display_name": "<string>",
"action_name": "<string>",
"description": "<string>",
"icon": "StepFormIcon",
"icon_url": "<string>",
"parameters": {},
"enabled_by_default": true,
"callback": "<string>",
"validation": "<string>"
}
],
"features": {
"web_search": {},
"reasoning": {
"effort": "low"
}
},
"member": {
"id": "<string>",
"role": "ADMIN",
"user": {
"id": "<string>",
"name": "<string>",
"avatar": "<string>"
},
"session": {
"id": "<string>"
},
"contact_channel": {
"id": "<string>",
"type": "internal",
"user_id": "<string>",
"avatar": "<string>",
"name": "<string>",
"username": "<string>",
"email": "jsmith@example.com",
"phone": "<string>",
"country": "<string>",
"agent": "<string>",
"ip": "<string>",
"language": "<string>",
"contact": {
"id": "<string>",
"name": "<string>",
"blocked": true,
"is_admin": true
},
"link": "<string>"
}
},
"error": "<string>",
"broadcast_id": "<string>",
"is_broadcast_message": true,
"usage": {
"input_tokens": 123,
"output_tokens": 123,
"total_tokens": 123,
"reasoning_tokens": 123,
"input_tokens_cache_read": 123,
"input_tokens_cache_write": 123,
"turns": [
{
"input_tokens": 123,
"output_tokens": 123,
"total_tokens": 123,
"reasoning_tokens": 123,
"input_tokens_cache_read": 123,
"input_tokens_cache_write": 123
}
]
}
},
"referral": {
"type": "messenger_ad",
"parts": [
{
"type": "file",
"url": "<string>",
"kind": "voice",
"file": {
"id": "<string>",
"file_path": "<string>",
"file_filename": "document.pdf",
"file_size": 1024,
"file_mimetype": "application/pdf",
"file_url": "<string>",
"created_at": "2023-11-07T05:31:56Z"
},
"auto_consume": true,
"start_timestamp": 123,
"end_timestamp": 123
}
],
"ref": "<string>",
"ad_id": "<string>",
"source": "<string>",
"referer_uri": "<string>",
"ads_context_data": {
"ad_title": "<string>",
"photo_url": "<string>",
"video_url": "<string>",
"post_id": "<string>",
"product_id": "<string>"
}
}
}Documentation Index
Fetch the complete documentation index at: https://docs.useinvent.com/llms.txt
Use this file to discover all available pages before exploring further.
Bearer token authentication using your API key
Org ID
Contact ID
Channel ID
The assistant that will handle this chat
The title of the chat
256Optional initial message. Authored as the contact, not the admin.
1User message parts
Show child attributes
The title of the chat
The model used for the chat
The members of the chat
Show child attributes
Whether the chat is temporary and would be deleted after 24 hours of last activity
The visibility of the chat
PRIVATE, PUBLIC_READ, PUBLIC_WRITE Whether the chat is pinned in the user interface
The status of the chat
RUNNING, COMPLETED, FAILED, CANCELED The shared URL of the chat, if it is shared
The tools available in the chat
Show child attributes
Enabled features for the model
Show child attributes
Schema for the chat state
Show child attributes
The link to the chat in the integration
The chat message schema
Show child attributes
Referral/commerce event data from Meta platforms — ads, products, orders.
Show child attributes
Was this page helpful?
curl --request POST \
--url https://api.useinvent.com/orgs/{org_id}/contacts/{contact_id}/channels/{channel_id}/chats \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"assistant_id": "<string>",
"title": "<string>",
"message": [
{
"type": "text",
"text": "<string>",
"start_timestamp": 123,
"end_timestamp": 123
}
]
}
'{
"id": "<string>",
"title": "<string>",
"model": "<string>",
"members": [
{
"id": "<string>",
"role": "ADMIN",
"user": {
"id": "<string>",
"name": "<string>",
"avatar": "<string>"
},
"session": {
"id": "<string>"
},
"contact_channel": {
"id": "<string>",
"type": "internal",
"user_id": "<string>",
"avatar": "<string>",
"name": "<string>",
"username": "<string>",
"email": "jsmith@example.com",
"phone": "<string>",
"country": "<string>",
"agent": "<string>",
"ip": "<string>",
"language": "<string>",
"contact": {
"id": "<string>",
"name": "<string>",
"blocked": true,
"is_admin": true
},
"link": "<string>"
}
}
],
"temporary": true,
"visibility": "PRIVATE",
"pinned": true,
"status": "RUNNING",
"shared_url": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"tools": [
{
"name": "<string>",
"display_name": "<string>",
"action_name": "<string>",
"description": "<string>",
"icon": "StepFormIcon",
"icon_url": "<string>",
"parameters": {},
"enabled_by_default": true,
"callback": "<string>",
"validation": "<string>"
}
],
"features": {
"web_search": {},
"reasoning": {
"effort": "low"
}
},
"org_id": "<string>",
"state": {
"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,
"has_connection": 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,
"enable_update_contact_tool": 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"
},
"link": "<string>",
"last_message": {
"id": "<string>",
"role": "user",
"model": "<string>",
"status": "RUNNING",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"messages": [
{
"role": "system",
"parts": [
{
"type": "text",
"text": "<string>",
"audio": {
"id": "<string>",
"file_path": "<string>",
"file_filename": "document.pdf",
"file_size": 1024,
"file_mimetype": "application/pdf",
"file_url": "<string>",
"created_at": "2023-11-07T05:31:56Z"
},
"start_timestamp": 123,
"end_timestamp": 123
}
]
}
],
"tools": [
{
"name": "<string>",
"display_name": "<string>",
"action_name": "<string>",
"description": "<string>",
"icon": "StepFormIcon",
"icon_url": "<string>",
"parameters": {},
"enabled_by_default": true,
"callback": "<string>",
"validation": "<string>"
}
],
"features": {
"web_search": {},
"reasoning": {
"effort": "low"
}
},
"member": {
"id": "<string>",
"role": "ADMIN",
"user": {
"id": "<string>",
"name": "<string>",
"avatar": "<string>"
},
"session": {
"id": "<string>"
},
"contact_channel": {
"id": "<string>",
"type": "internal",
"user_id": "<string>",
"avatar": "<string>",
"name": "<string>",
"username": "<string>",
"email": "jsmith@example.com",
"phone": "<string>",
"country": "<string>",
"agent": "<string>",
"ip": "<string>",
"language": "<string>",
"contact": {
"id": "<string>",
"name": "<string>",
"blocked": true,
"is_admin": true
},
"link": "<string>"
}
},
"error": "<string>",
"broadcast_id": "<string>",
"is_broadcast_message": true,
"usage": {
"input_tokens": 123,
"output_tokens": 123,
"total_tokens": 123,
"reasoning_tokens": 123,
"input_tokens_cache_read": 123,
"input_tokens_cache_write": 123,
"turns": [
{
"input_tokens": 123,
"output_tokens": 123,
"total_tokens": 123,
"reasoning_tokens": 123,
"input_tokens_cache_read": 123,
"input_tokens_cache_write": 123
}
]
}
},
"referral": {
"type": "messenger_ad",
"parts": [
{
"type": "file",
"url": "<string>",
"kind": "voice",
"file": {
"id": "<string>",
"file_path": "<string>",
"file_filename": "document.pdf",
"file_size": 1024,
"file_mimetype": "application/pdf",
"file_url": "<string>",
"created_at": "2023-11-07T05:31:56Z"
},
"auto_consume": true,
"start_timestamp": 123,
"end_timestamp": 123
}
],
"ref": "<string>",
"ad_id": "<string>",
"source": "<string>",
"referer_uri": "<string>",
"ads_context_data": {
"ad_title": "<string>",
"photo_url": "<string>",
"video_url": "<string>",
"post_id": "<string>",
"product_id": "<string>"
}
}
}