Sign inGet Started

Create conversation

POST
/workspaces/{workspaceId}/conversations
Create a new conversation for a workspace, optionally specifying an initial message to be sent.
Cuerpo de la solicitud
name
string
obligatorio
Name of the conversation. If it's an email channel, this will correspond to the email subject.
description
string
Conversation description.
style
string
Possible values: default, directMessage, chatChannel, personalInbox, resource, groupInbox, support
visibility
string
Possible values: public, private, direct, group
accessibility
string
Possible values: open, invite-only, request-to-join, private
participants
array of object
A list of up to 5 conversation participants.
Mostrar parámetros secundarios
Create a participant of the type user, access key, flow, agent, bot, or action rule.
participants.id
string
obligatorio
The ID of the user, access key, flow, agent, bot, or action rule.
participants.type
string
obligatorio
Participant type.
Possible values: user, accessKey, flow, agent, bot, collaborationAutomation
initiatingParticipant
object
The participant who initiated the conversation. When both initiatingParticipant and initialMessage are provided, the initial message sender takes precedence.
Mostrar parámetros secundarios
Create a participant of the type user, access key, flow, agent, bot, or action rule.
initiatingParticipant.id
string
obligatorio
The ID of the user, access key, flow, agent, bot, or action rule.
initiatingParticipant.type
string
obligatorio
Participant type.
Possible values: user, accessKey, flow, agent, bot, collaborationAutomation
channelId
obligatorio
initialMessage
object
Mostrar parámetros secundarios
Initial message that will initiate the conversation.
initialMessage.reference
string
A customizable ID assigned to messages you send. This can be used to correlate messages with data from your own integrating services. Must be globally unique within a workspace.
initialMessage.sender
object
Message sender information for email.
Mostrar parámetros secundarios
initialMessage.sender.name
string
obligatorio
Sender name shown in the email "From" header.
initialMessage.sender.email
string
Sender email address.
initialMessage.sender.emailReplyToAddress
string
Sender email address to reply to.
initialMessage.recipients
array of object
List of recipients.
Mostrar parámetros secundarios
Create a new recipient by specifying an identifier key and identifier value. For more information on identifier keys and values, please refer to the "Conversation Participants" page.
initialMessage.recipients.identifierKey
string
Identifier key of the contact depending on which channel is being used.
initialMessage.recipients.identifierValue
string
obligatorio
Identifier of the contact, such as a phone number or email address.
initialMessage.recipients.platformAddressSelector
string
An expression to determine the contact's platform address (such as email or phone number) dynamically when sending messages in advanced use cases.
initialMessage.recipients.type
string
obligatorio
Whether the email address is in the email's "To", "CC", or "BCC" headers.
Possible values: to, cc, bcc
initialMessage.body
object
obligatorio
Mostrar parámetros secundarios
initialMessage.body.text
object
obligatorio
Mostrar parámetros secundarios
initialMessage.body.text.actions
array of object
Mostrar parámetros secundarios
initialMessage.body.text.actions.link
object
obligatorio
Mostrar parámetros secundarios
initialMessage.body.text.actions.link.metadata
object
Mostrar parámetros secundarios
initialMessage.body.text.actions.link.metadata.description
object
Mostrar parámetros secundarios
initialMessage.body.text.actions.link.metadata.description.label
string
obligatorio
initialMessage.body.text.actions.link.text
string
obligatorio
initialMessage.body.text.actions.link.url
string
obligatorio
initialMessage.body.text.actions.type
string
obligatorio
Possible values: link
initialMessage.body.text.attachments
array of object
Mostrar parámetros secundarios
initialMessage.body.text.attachments.content
string
initialMessage.body.text.attachments.contentId
string
initialMessage.body.text.attachments.contentType
string
initialMessage.body.text.attachments.filename
string
obligatorio
initialMessage.body.text.attachments.inline
boolean
initialMessage.body.text.attachments.mediaUrl
string
obligatorio
initialMessage.body.text.metadata
object
Mostrar parámetros secundarios
initialMessage.body.text.metadata.apple
object
Mostrar parámetros secundarios
initialMessage.body.text.metadata.apple.appClipPreview
boolean
initialMessage.body.text.metadata.apple.appClipRegion
string
initialMessage.body.text.metadata.apple.summaryText
string
initialMessage.body.text.metadata.headers
object
initialMessage.body.text.metadata.line
object
Mostrar parámetros secundarios
initialMessage.body.text.metadata.line.emoji
object
Mostrar parámetros secundarios
initialMessage.body.text.metadata.line.emoji.items
array of object
Mostrar parámetros secundarios
initialMessage.body.text.metadata.line.emoji.items.emojiId
string
obligatorio
initialMessage.body.text.metadata.line.emoji.items.index
integer
obligatorio
initialMessage.body.text.metadata.line.emoji.items.length
integer
initialMessage.body.text.metadata.line.emoji.items.productId
string
obligatorio
initialMessage.body.text.metadata.paymentDetails
object
Mostrar parámetros secundarios
initialMessage.body.text.metadata.paymentDetails.amount
string
obligatorio
initialMessage.body.text.metadata.paymentDetails.currency
string
obligatorio
initialMessage.body.text.metadata.paymentDetails.sessionIdentifier
string
initialMessage.body.text.metadata.paymentDetails.state
string
obligatorio
initialMessage.body.text.metadata.subject
string
initialMessage.body.text.metadata.telegram
object
Mostrar parámetros secundarios
initialMessage.body.text.metadata.telegram.parseMode
string
initialMessage.body.text.metadata.whatsapp
object
Mostrar parámetros secundarios
initialMessage.body.text.metadata.whatsapp.callPermissionExpiration
string
initialMessage.body.text.metadata.whatsapp.callPermissionResponse
string
Possible values: accept, reject
initialMessage.body.text.metadata.whatsapp.previewUrl
boolean
obligatorio
initialMessage.body.text.metadata.whatsapp.sharedContacts
array of object
Mostrar parámetros secundarios
initialMessage.body.text.metadata.whatsapp.sharedContacts.origin
string
obligatorio
initialMessage.body.text.metadata.whatsapp.sharedContacts.phones
array of object
Mostrar parámetros secundarios
initialMessage.body.text.metadata.whatsapp.sharedContacts.phones.phone
string
obligatorio
initialMessage.body.text.metadata.whatsapp.sharedContacts.phones.type
string
obligatorio
initialMessage.body.text.metadata.whatsapp.sharedContacts.phones.waId
string
obligatorio
initialMessage.body.text.metadata.whatsapp.sharedContacts.vcard
string
initialMessage.body.text.text
string
obligatorio
initialMessage.body.type
string
obligatorio
Possible values: text
initialMessage.draft
boolean
Whether this message is a draft.
attributes
object
A free-form object containing conversation attributes. You can use this field to store custom information along with the conversation.
Cuerpo de la respuesta
accessibility
string
obligatorio
Possible values: open, invite-only, request-to-join, private
activeParticipantCount
integer
obligatorio
assigneeId
string
attributes
object
category
string
channelId
string
obligatorio
createdAt
string
obligatorio
description
string
directory
string
featuredParticipants
array of object
obligatorio
Mostrar atributos secundarios
featuredParticipants.avatarUrl
string
featuredParticipants.contact
object
Mostrar atributos secundarios
featuredParticipants.contact.identifierKey
string
obligatorio
featuredParticipants.contact.identifierValue
string
obligatorio
featuredParticipants.contact.platformAddress
string
featuredParticipants.contact.platformAddressSelector
string
featuredParticipants.conversationId
string
featuredParticipants.createdAt
string
featuredParticipants.displayName
string
featuredParticipants.id
string
obligatorio
featuredParticipants.resourceUri
string
featuredParticipants.status
string
Possible values: invited, pending, active, inactive
featuredParticipants.type
string
obligatorio
Possible values: user, contact, agent, flow, bot, accessKey, channel, connector, collaborationAutomation
featuredParticipants.updatedAt
string
hasDraft
boolean
id
string
obligatorio
inbox
object
Mostrar atributos secundarios
inbox.id
string
obligatorio
inbox.identifier
string
obligatorio
inbox.ownerId
string
obligatorio
inbox.ownerType
string
obligatorio
Possible values: user, group
inbox.type
string
obligatorio
Possible values: personal, shared, support
initiatingParticipant
object
Mostrar atributos secundarios
initiatingParticipant.avatarUrl
string
initiatingParticipant.contact
object
Mostrar atributos secundarios
initiatingParticipant.contact.identifierKey
string
obligatorio
initiatingParticipant.contact.identifierValue
string
obligatorio
initiatingParticipant.contact.platformAddress
string
initiatingParticipant.contact.platformAddressSelector
string
initiatingParticipant.conversationId
string
initiatingParticipant.createdAt
string
initiatingParticipant.displayName
string
initiatingParticipant.id
string
obligatorio
initiatingParticipant.resourceUri
string
initiatingParticipant.status
string
Possible values: invited, pending, active, inactive
initiatingParticipant.type
string
obligatorio
Possible values: user, contact, agent, flow, bot, accessKey, channel, connector, collaborationAutomation
initiatingParticipant.updatedAt
string
lastMessage
object
Mostrar atributos secundarios
lastMessage.createdAt
string
obligatorio
lastMessage.draft
boolean
obligatorio
lastMessage.id
string
obligatorio
lastMessage.preview
object
obligatorio
Mostrar atributos secundarios
lastMessage.preview.text
string
lastMessage.recipients
array of object
Mostrar atributos secundarios
lastMessage.recipients.contactAnnotation
object
Annotations add extra information to a sender or receiver. For email messages, the name annotation overrides the display name.
Mostrar atributos secundarios
lastMessage.recipients.contactAnnotation.name
string
lastMessage.recipients.countryCode
string
lastMessage.recipients.id
string
The ID of the contact.
lastMessage.recipients.identifierKey
string
The identifier key for finding the contact (e.g. emailaddress, phonenumber). For WhatsApp channels with BSUID support, use whatsappbsuid to send to a contact by their Business-Scoped User ID.
lastMessage.recipients.identifierValue
string
The identifier value for finding the contact.
lastMessage.recipients.identifiers
array of object
Additional identifiers to augment the contact during resolution.
Mostrar atributos secundarios
lastMessage.recipients.identifiers.identifierKey
string
obligatorio
The identifier key for finding the contact (e.g. emailaddress, phonenumber).
lastMessage.recipients.identifiers.identifierValue
string
obligatorio
The identifier value for finding the contact.
lastMessage.recipients.platformAddress
string
The resolved platform address used to deliver the message (e.g. phone number or email address).
lastMessage.recipients.platformAddressSelector
string
An expression that defines how we resolve the platform address from a contact. Optional override for the default resolution logic.
lastMessage.recipients.receiverExpression
string
lastMessage.recipients.receiverValue
string
lastMessage.recipients.type
string
The type of the receiver (e.g. to, cc, bcc for email).
lastMessage.sender
object
Mostrar atributos secundarios
lastMessage.sender.email
string
lastMessage.sender.name
string
lastMessage.sender.avatarUrl
string
lastMessage.sender.contact
object
Mostrar atributos secundarios
lastMessage.sender.contact.identifierKey
string
obligatorio
lastMessage.sender.contact.identifierValue
string
obligatorio
lastMessage.sender.contact.platformAddress
string
lastMessage.sender.contact.platformAddressSelector
string
lastMessage.sender.conversationId
string
lastMessage.sender.createdAt
string
lastMessage.sender.displayName
string
lastMessage.sender.id
string
obligatorio
lastMessage.sender.resourceUri
string
lastMessage.sender.status
string
Possible values: invited, pending, active, inactive
lastMessage.sender.type
string
obligatorio
Possible values: user, contact, agent, flow, bot, accessKey, channel, connector, collaborationAutomation
lastMessage.sender.updatedAt
string
lastMessage.status
string
obligatorio
Possible values: accepted, processing, sent, sending_failed, delivered, delivery_failed, deleted
lastMessage.type
string
obligatorio
Possible values: text, html, image, file, gif, location, carousel, list, section, authentication, action, comment
lastMessageIncomingAt
string
lastMessageOutgoingAt
string
name
string
obligatorio
participants
array of object
Mostrar atributos secundarios
participants.contact
object
Mostrar atributos secundarios
participants.contact.identifierKey
string
obligatorio
participants.contact.identifierValue
string
obligatorio
participants.contact.platformAddress
string
participants.contact.platformAddressSelector
string
participants.id
string
obligatorio
participants.type
string
obligatorio
Possible values: user, contact, agent, flow, bot, accessKey, channel, connector, collaborationAutomation
pendingParticipantCount
integer
platformStyle
string
obligatorio
Possible values: direct, email, direct-multiple, direct-threaded, group-multiple
privateAttributes
string
read
boolean
referral
object
Mostrar atributos secundarios
referral.caption
string
referral.mediaType
string
referral.mediaUrl
string
referral.sourceId
string
obligatorio
referral.sourceType
string
referral.sourceUrl
string
referral.text
string
referral.timestamp
string
referral.title
string
referral.username
string
resource
object
Mostrar atributos secundarios
resource.id
string
obligatorio
resource.type
string
obligatorio
Possible values: task, task-conversation, reimbursement, sales-lead, sales-opportunity, sales-account, expense, project
resourceUri
string
starred
boolean
status
string
obligatorio
Possible values: deleted, active, closed, spam, archived
style
string
obligatorio
Possible values: default, directMessage, chatChannel, personalInbox, resource, groupInbox, support
summary
string
tags
array of string
updatedAt
string
obligatorio
visibility
string
obligatorio
Possible values: public, private, direct, group
Ejemplo de código
curl -X POST 'https://api.bird.com/workspaces/{workspaceId}/conversations' \
  -H 'Authorization: AccessKey YOUR_ACCESS_KEY'

Examples

Starting a conversation with a simple message

Ejemplo de código
curl -X POST "https://api.bird.com/workspaces/a1405560-c8d3-4b1a-877d-3f449ad95352/conversations" \
-H "Content-Type: application/json" \
-H "Authorization: AccessKey abcd" \
-d '{
  "name": "Email Subject",
  "channelId": "25431165-c486-4a94-94f6-b3633c9af905",
  "participants": [
    {
      "type": "contact",
      "identifierKey": "emailaddress",
      "identifierValue": "john.doe@bird.com"
    }
  ],
  "initialMessage": {
    "body": {
      "type": "text",
      "text": {
        "text": "Hey, listen!"
      }
    },
    "recipients": [
      {
        "identifierKey": "emailaddress",
        "identifierValue": "john.doe@bird.com",
        "type": "to"
      }
    ]
  },
  "attributes": {
    "my-custom-attribute": "123"
  }
}'

Starting a conversation with an email template message

Ejemplo de código
curl -X POST "https://api.bird.com/workspaces/a1405560-c8d3-4b1a-877d-3f449ad95352/conversations" \
-H "Content-Type: application/json" \
-H "Authorization: AccessKey abcd" \
-d '{
  "name": "Email Subject",
  "channelId": "25431165-c486-4a94-94f6-b3633c9af905",
  "participants": [
    {
      "type": "contact",
      "identifierKey": "emailaddress",
      "identifierValue": "john.doe@bird.com"
    }
  ],
  "initialMessage": {
    "template": {
      "projectId": "5d9084b3-7cdb-4c87-bf7c-8871a1f21695",
      "version": "b33761d9-ece1-48e3-b542-b5bbf93bd8c3",
      "locale": "en",
      "parameters": [
        {
          "type": "string",
          "key": "myVariable",
          "value": "yay"
        }
      ]
    },
    "recipients": [
      {
        "identifierKey": "emailaddress",
        "identifierValue": "john.doe@bird.com",
        "type": "to"
      }
    ]
  },
  "attributes": {
    "my-custom-attribute": "123"
  }
}'

Starting a conversation with a WhatsApp template message

Ejemplo de código
curl -X POST "https://api.bird.com/workspaces/a1405560-c8d3-4b1a-877d-3f449ad95352/conversations" \
-H "Content-Type: application/json" \
-H "Authorization: AccessKey abcd" \
-d '{
  "name": "Ticket name",
  "channelId": "199f0353-fcb8-41b2-afd6-614c6baf3850",
  "participants": [
    {
      "type": "contact",
      "identifierKey": "phonenumber",
      "identifierValue": "+31612345678"
    }
  ],
  "initialMessage": {
    "template": {
      "projectId": "4720942c-9bde-4934-ab77-f600743894a1",
      "version": "5c0e4db5-20f2-4224-86f4-fce052997608",
      "locale": "en",
      "parameters": [
        {
          "type": "string",
          "key": "age",
          "value": "20"
        }
      ]
    },
    "recipients": [
      {
        "identifierKey": "phonenumber",
        "identifierValue": "+31612345678",
        "type": "to"
      }
    ]
  },
  "attributes": {
    "my-custom-attribute": "123"
  }
}'