POST
/
v1
/
chat
/
conversations
/
get-or-create
curl --request POST \
  --url https://api.botpress.cloud/v1/chat/conversations/get-or-create \
  --header 'Content-Type: application/json' \
  --data '{
  "channel": "<string>",
  "tags": {},
  "integrationName": "<string>",
  "discriminateByTags": [
    "<string>"
  ]
}'
{
  "conversation": {
    "id": "<string>",
    "currentTaskId": "<string>",
    "currentWorkflowId": "<string>",
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z",
    "channel": "<string>",
    "integration": "<string>",
    "tags": {}
  }
}

Body

application/json
Conversation data
channel
string
required

Channel name

Maximum length: 200
tags
object
required

Tags for the Conversation

integrationName
string
deprecated

[DEPRECATED] To create a conversation from within a bot, call an action of the integration instead.

Maximum length: 200
discriminateByTags
string[]

Optional 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.

Response

200
application/json
Returns a [Conversation](#schema_conversation) object if a valid identifier was provided. Returns [an error](#errors) otherwise
conversation
object
required

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.