Create conversation
Examples
Starting a conversation with a simple message
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": "[email protected]"
}
],
"initialMessage": {
"body": {
"type": "text",
"text": {
"text": "Hey, listen!"
}
},
"recipients": [
{
"identifierKey": "emailaddress",
"identifierValue": "[email protected]",
"type": "to"
}
]
},
"attributes": {
"my-custom-attribute": "123"
}
}'
Starting a conversation with an email template message
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": "[email protected]"
}
],
"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": "[email protected]",
"type": "to"
}
]
},
"attributes": {
"my-custom-attribute": "123"
}
}'
Starting a conversation with a WhatsApp template message
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"
}
}'
Last updated
Was this helpful?