getOrCreateConversation

Retrieves the Conversation object containing given tags. If the conversation does not exist, it will be created. Tags will be updated if they are set in the request body.

POST/v1/chat/conversations/get-or-create

Authorization

AuthorizationBearer
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Header parameters

x-bp-authenticated-principalstring
Authenticated principal. Injected by the authentication middleware.
x-bot-idstring
Bot id
x-integration-id?string
Integration id
x-integration-alias?string
Integration alias

Request body

Conversation data

channelstring
Channel name(max length: 200)
tagsobject
Tags for the Conversation. Set to null or empty string to remove.
integrationName?stringdeprecated
[DEPRECATED] To create a conversation from within a bot, call an action of the integration instead.(max length: 200)
properties?object
**EXPERIMENTAL** - Optional shared properties. Set individual properties to null or empty string to remove them.
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

Returns a Conversation object if a valid identifier was provided. Returns an error otherwise

conversationobject
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.
metaobject