Sign inGet started

Create conversation

POST
/workspaces/{workspaceId}/conversations
Create a new conversation for a workspace, optionally specifying an initial message to be sent.
Anfrage-Payload
name
string
erforderlich
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.
Untergeordnete Parameter anzeigen
Create a participant of the type user, access key, flow, agent, bot, or action rule.
participants.id
string
erforderlich
The ID of the user, access key, flow, agent, bot, or action rule.
participants.type
string
erforderlich
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.
Untergeordnete Parameter anzeigen
Create a participant of the type user, access key, flow, agent, bot, or action rule.
initiatingParticipant.id
string
erforderlich
The ID of the user, access key, flow, agent, bot, or action rule.
initiatingParticipant.type
string
erforderlich
Participant type.
Possible values: user, accessKey, flow, agent, bot, collaborationAutomation
channelId
erforderlich
initialMessage
object
Untergeordnete Parameter anzeigen
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.
Untergeordnete Parameter anzeigen
initialMessage.sender.name
string
erforderlich
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.
Untergeordnete Parameter anzeigen
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
erforderlich
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
erforderlich
Whether the email address is in the email's "To", "CC", or "BCC" headers.
Possible values: to, cc, bcc
initialMessage.body
object
erforderlich
Untergeordnete Parameter anzeigen
initialMessage.body.text
object
erforderlich
Untergeordnete Parameter anzeigen
initialMessage.body.text.actions
array of object
Untergeordnete Parameter anzeigen
initialMessage.body.text.actions.link
object
erforderlich
Untergeordnete Parameter anzeigen
initialMessage.body.text.actions.link.metadata
object
Untergeordnete Parameter anzeigen
initialMessage.body.text.actions.link.metadata.description
object
Untergeordnete Parameter anzeigen
initialMessage.body.text.actions.link.metadata.description.label
string
erforderlich
initialMessage.body.text.actions.link.text
string
erforderlich
initialMessage.body.text.actions.link.url
string
erforderlich
initialMessage.body.text.actions.type
string
erforderlich
Possible values: link
initialMessage.body.text.attachments
array of object
Untergeordnete Parameter anzeigen
initialMessage.body.text.attachments.content
string
initialMessage.body.text.attachments.contentId
string
initialMessage.body.text.attachments.contentType
string
initialMessage.body.text.attachments.filename
string
erforderlich
initialMessage.body.text.attachments.inline
boolean
initialMessage.body.text.attachments.mediaUrl
string
erforderlich
initialMessage.body.text.metadata
object
Untergeordnete Parameter anzeigen
initialMessage.body.text.metadata.apple
object
Untergeordnete Parameter anzeigen
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
Untergeordnete Parameter anzeigen
initialMessage.body.text.metadata.line.emoji
object
Untergeordnete Parameter anzeigen
initialMessage.body.text.metadata.line.emoji.items
array of object
Untergeordnete Parameter anzeigen
initialMessage.body.text.metadata.line.emoji.items.emojiId
string
erforderlich
initialMessage.body.text.metadata.line.emoji.items.index
integer
erforderlich
initialMessage.body.text.metadata.line.emoji.items.length
integer
initialMessage.body.text.metadata.line.emoji.items.productId
string
erforderlich
initialMessage.body.text.metadata.paymentDetails
object
Untergeordnete Parameter anzeigen
initialMessage.body.text.metadata.paymentDetails.amount
string
erforderlich
initialMessage.body.text.metadata.paymentDetails.currency
string
erforderlich
initialMessage.body.text.metadata.paymentDetails.sessionIdentifier
string
initialMessage.body.text.metadata.paymentDetails.state
string
erforderlich
initialMessage.body.text.metadata.subject
string
initialMessage.body.text.metadata.telegram
object
Untergeordnete Parameter anzeigen
initialMessage.body.text.metadata.telegram.parseMode
string
initialMessage.body.text.metadata.whatsapp
object
Untergeordnete Parameter anzeigen
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
erforderlich
initialMessage.body.text.metadata.whatsapp.sharedContacts
array of object
Untergeordnete Parameter anzeigen
initialMessage.body.text.metadata.whatsapp.sharedContacts.origin
string
erforderlich
initialMessage.body.text.metadata.whatsapp.sharedContacts.phones
array of object
Untergeordnete Parameter anzeigen
initialMessage.body.text.metadata.whatsapp.sharedContacts.phones.phone
string
erforderlich
initialMessage.body.text.metadata.whatsapp.sharedContacts.phones.type
string
erforderlich
initialMessage.body.text.metadata.whatsapp.sharedContacts.phones.waId
string
erforderlich
initialMessage.body.text.metadata.whatsapp.sharedContacts.vcard
string
initialMessage.body.text.text
string
erforderlich
initialMessage.body.type
string
erforderlich
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.
Antwort-Payload
accessibility
string
erforderlich
Possible values: open, invite-only, request-to-join, private
activeParticipantCount
integer
erforderlich
assigneeId
string
attributes
object
category
string
channelId
string
erforderlich
createdAt
string
erforderlich
description
string
directory
string
featuredParticipants
array of object
erforderlich
Untergeordnete Attribute anzeigen
featuredParticipants.avatarUrl
string
featuredParticipants.contact
object
Untergeordnete Attribute anzeigen
featuredParticipants.contact.identifierKey
string
erforderlich
featuredParticipants.contact.identifierValue
string
erforderlich
featuredParticipants.contact.platformAddress
string
featuredParticipants.contact.platformAddressSelector
string
featuredParticipants.conversationId
string
featuredParticipants.createdAt
string
featuredParticipants.displayName
string
featuredParticipants.id
string
erforderlich
featuredParticipants.resourceUri
string
featuredParticipants.status
string
Possible values: invited, pending, active, inactive
featuredParticipants.type
string
erforderlich
Possible values: user, contact, agent, flow, bot, accessKey, channel, connector, collaborationAutomation
featuredParticipants.updatedAt
string
hasDraft
boolean
id
string
erforderlich
inbox
object
Untergeordnete Attribute anzeigen
inbox.id
string
erforderlich
inbox.identifier
string
erforderlich
inbox.ownerId
string
erforderlich
inbox.ownerType
string
erforderlich
Possible values: user, group
inbox.type
string
erforderlich
Possible values: personal, shared, support
initiatingParticipant
object
Untergeordnete Attribute anzeigen
initiatingParticipant.avatarUrl
string
initiatingParticipant.contact
object
Untergeordnete Attribute anzeigen
initiatingParticipant.contact.identifierKey
string
erforderlich
initiatingParticipant.contact.identifierValue
string
erforderlich
initiatingParticipant.contact.platformAddress
string
initiatingParticipant.contact.platformAddressSelector
string
initiatingParticipant.conversationId
string
initiatingParticipant.createdAt
string
initiatingParticipant.displayName
string
initiatingParticipant.id
string
erforderlich
initiatingParticipant.resourceUri
string
initiatingParticipant.status
string
Possible values: invited, pending, active, inactive
initiatingParticipant.type
string
erforderlich
Possible values: user, contact, agent, flow, bot, accessKey, channel, connector, collaborationAutomation
initiatingParticipant.updatedAt
string
lastMessage
object
Untergeordnete Attribute anzeigen
lastMessage.createdAt
string
erforderlich
lastMessage.draft
boolean
erforderlich
lastMessage.id
string
erforderlich
lastMessage.preview
object
erforderlich
Untergeordnete Attribute anzeigen
lastMessage.preview.text
string
lastMessage.recipients
array of object
Untergeordnete Attribute anzeigen
lastMessage.recipients.contactAnnotation
object
Annotations add extra information to a sender or receiver. For email messages, the name annotation overrides the display name.
Untergeordnete Attribute anzeigen
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.
Untergeordnete Attribute anzeigen
lastMessage.recipients.identifiers.identifierKey
string
erforderlich
The identifier key for finding the contact (e.g. emailaddress, phonenumber).
lastMessage.recipients.identifiers.identifierValue
string
erforderlich
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
Untergeordnete Attribute anzeigen
lastMessage.sender.email
string
lastMessage.sender.name
string
lastMessage.sender.avatarUrl
string
lastMessage.sender.contact
object
Untergeordnete Attribute anzeigen
lastMessage.sender.contact.identifierKey
string
erforderlich
lastMessage.sender.contact.identifierValue
string
erforderlich
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
erforderlich
lastMessage.sender.resourceUri
string
lastMessage.sender.status
string
Possible values: invited, pending, active, inactive
lastMessage.sender.type
string
erforderlich
Possible values: user, contact, agent, flow, bot, accessKey, channel, connector, collaborationAutomation
lastMessage.sender.updatedAt
string
lastMessage.status
string
erforderlich
Possible values: accepted, processing, sent, sending_failed, delivered, delivery_failed, deleted
lastMessage.type
string
erforderlich
Possible values: text, html, image, file, gif, location, carousel, list, section, authentication, action, comment
lastMessageIncomingAt
string
lastMessageOutgoingAt
string
name
string
erforderlich
participants
array of object
Untergeordnete Attribute anzeigen
participants.contact
object
Untergeordnete Attribute anzeigen
participants.contact.identifierKey
string
erforderlich
participants.contact.identifierValue
string
erforderlich
participants.contact.platformAddress
string
participants.contact.platformAddressSelector
string
participants.id
string
erforderlich
participants.type
string
erforderlich
Possible values: user, contact, agent, flow, bot, accessKey, channel, connector, collaborationAutomation
pendingParticipantCount
integer
platformStyle
string
erforderlich
Possible values: direct, email, direct-multiple, direct-threaded, group-multiple
privateAttributes
string
read
boolean
referral
object
Untergeordnete Attribute anzeigen
referral.caption
string
referral.mediaType
string
referral.mediaUrl
string
referral.sourceId
string
erforderlich
referral.sourceType
string
referral.sourceUrl
string
referral.text
string
referral.timestamp
string
referral.title
string
referral.username
string
resource
object
Untergeordnete Attribute anzeigen
resource.id
string
erforderlich
resource.type
string
erforderlich
Possible values: task, task-conversation, reimbursement, sales-lead, sales-opportunity, sales-account, expense, project
resourceUri
string
starred
boolean
status
string
erforderlich
Possible values: deleted, active, closed, spam, archived
style
string
erforderlich
Possible values: default, directMessage, chatChannel, personalInbox, resource, groupInbox, support
summary
string
tags
array of string
updatedAt
string
erforderlich
visibility
string
erforderlich
Possible values: public, private, direct, group
Codebeispiel
curl -X POST 'https://api.bird.com/workspaces/{workspaceId}/conversations' \
  -H 'Authorization: AccessKey YOUR_ACCESS_KEY'

Examples

Starting a conversation with a simple message

Codebeispiel
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

Codebeispiel
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

Codebeispiel
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"
  }
}'