curl --request POST \
--url https://api.botpress.cloud/v1/chat/conversations/get-or-create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-bot-id: <x-bot-id>' \
--data '
{
"channel": "<string>",
"tags": {},
"integrationName": "<string>",
"discriminateByTags": [
"<string>"
]
}
'{
"conversation": {
"id": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"channel": "<string>",
"integration": "<string>",
"tags": {},
"currentTaskId": "<string>",
"currentWorkflowId": "<string>"
}
}Retrieves the Conversation object for a valid identifier. If the conversation does not exist, it will be created.
curl --request POST \
--url https://api.botpress.cloud/v1/chat/conversations/get-or-create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-bot-id: <x-bot-id>' \
--data '
{
"channel": "<string>",
"tags": {},
"integrationName": "<string>",
"discriminateByTags": [
"<string>"
]
}
'{
"conversation": {
"id": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"channel": "<string>",
"integration": "<string>",
"tags": {},
"currentTaskId": "<string>",
"currentWorkflowId": "<string>"
}
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Bot id
Integration id
Integration alias
Conversation data
Channel name
200Tags for the Conversation
Show child attributes
500[DEPRECATED] To create a conversation from within a bot, call an action of the integration instead.
200Optional list of tag names to use for strict matching when looking up existing conversations. If provided, all specified tags must match exactly for a conversation to be considered a match. For example, with an existing conversation whose tags are {"foo": "a", "bar": "b", baz: "c"}: Without this parameter, ALL tags must match exactly. With ["bar","baz"], all listed tags must match their values, and other tags are not considered.
500Returns a Conversation object if a valid identifier was provided. Returns an error otherwise
The Conversation object represents an exchange of messages between one or more users. A Conversation is always linked to an integration's channels. For example, a Slack channel represents a conversation.
Show child attributes
Id of the Conversation
28 - 36Creation date of the Conversation in ISO 8601 format
Updating date of the Conversation in ISO 8601 format
Name of the channel where the Conversation is happening
Name of the integration that created the Conversation
Set of Tags that you can attach to a Conversation. The set of Tags available on a Conversation is restricted by the list of Tags defined previously by the Bot. Individual keys can be unset by posting an empty value to them.
Show child attributes
Was this page helpful?