Skip to main content

Create a conversation

Conversation can be created in a folder, if provided. To add a message while creating the conversation, add content and message format to the request parameters.

Parameters

title
string
required
Title of the conversation.
visibility
enum
required
The visibility of the conversation. This field cannot be used if the client is included in the message field, and it will default to shared. One of private, internal, shared.
role
enum
Only when visibility is internal. Used as the default role for all team members. If a user has a directly attached role, it will override this one. One of conversation_admin, conversation_manager, conversation_commenter, conversation_viewer.
folder
string
ID of the folder in which the conversation will be created.
message
associative array
If provided, a message will be created within the conversation.

Returns

Returns the created conversation object. Throws an error if some parameters are not valid.

post
/api/conversations
curl -X POST https://{workspace}.kitchen.co/api/conversations \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'X-Requested-With: XMLHttpRequest' \
-H 'Authorization: Bearer {API_KEY}'
Response
{
"archived_at": null,
"created_at": "2024-03-07T07:47:02+00:00",
"id": "convr_1lbg89ha9ttb5dmxuldku3nx",
"latest_message_created_at": null,
"latest_message": null,
"messages_count": 0,
"status": "open",
"title": "New Conversation",
"updated_at": "2024-03-07T07:47:02+00:00",
"visibility": "shared"
}