Pular para o conteúdo principal

POST /contacts

Creates a new contact.

Required Parameters

ParameterTypeDescription
identifierStringThe identifier of the contact (e.g. phone number in WhatsApp)
sourceSourceThe source of the contact (e.g. whatsapp)
nameStringThe name of the contact

Optional Parameters

ParameterTypeDescription
tagsString[]A list of comma-separated values (e.g ['Call back', 'Interested'])
custom_fieldsString{}An object with the custom fields (e.g. {'Billing Address': 'Main Street 1'})
assigned_userStringEmail of the user that you want to assign to a contact
team_uuidStringUUID of the team that you want to assign to a contact
channel_uuidStringThe message will be sent from this channel (when omitted, it will use the default main channel)
bot_statusStringThe status of the bot for this contact. The status of the bot. Accepts either bot_start or bot_end.
info

When passing bot_status make sure that the bot is enabled in your account. Visit bots in your Callbell account to create and enable one.

If you have a bot enabled, the default status is bot_start meaning that the bot will reply whenever the contact writes. If this is not the intended behavior, you can set the status to bot_end to stop the bot from replying to the contact. This can be useful when you want to take over the conversation manually or when you want to stop the bot from replying to the contact for any other reason.

caution

When passing custom_fields or tags make sure that they exist in your account. See tags and custom_fields in your settings.

Same applies for assigned_user and team_uuid: either needs to exists in your account.

Example Request

curl -X POST "https://api.callbell.eu/v1/contacts" \
-H "Authorization: Bearer test_gshuPaZoeEG6ovbc8M79w0QyM" \
-H "Content-Type: application/json" \
-d '{
"source": "whatsapp",
"identifier": "123456789",
"name": "John Doe"
}'

Response

ParameterTypeDescription
contactContactThe contact which was created.

Example Response

response.json
{
"contact": [
{
"uuid": "414a6d692bd645ed803f2e7ce360d4c8",
"name": "John Doe",
"phoneNumber": "123456789",
"avatarUrl": null,
"createdAt": "2020-11-13T21:08:53Z",
"source": "whatsapp",
"href": "https://dash.callbell.eu/contacts/414a6d692bd645ed803f2e7ce360d4c8",
"tags": [],
"assignedUser": null,
"customFields": {}
}
]
}