Skip to navigation

Create a Template

POST https://api.beconversive.com/api/v2/templates

Creates a message template in the account. Returns the ID of the new template, which you can use to retrieve, update or delete it.

curl -X POST https://api.beconversive.com/api/v2/templates \
-H "apiKey: <API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"name": "Welcome",
"text": "Hi, welcome!",
"type": "automation",
"channel": "sms",
"category": "only text"
}'

200 Created

{
"template_id": 102031
}

Authentication

NameTypeRequiredDescription
apiKeystringRequiredAPI key authentication via header.

Request body

NameTypeRequiredDescription
namestringRequiredTemplate name. Letters, digits, _, spaces and -. Must start and end with a letter, digit or _.
textstringRequiredMessage text of the template.
typestring or arrayRequiredautomation, campaign or conversation. Pass one value or a list; the first is the primary type.
channelstringRequiredChannel the template is for, e.g. sms, whatsapp, rcs. Cannot be changed later.
categorystringRequiredonly text, media message or rich media.
labelstringOptionalLabel name or ID. A new label is created if the name does not exist.
integrationstringOptionalIntegration the template belongs to, e.g. hubspot, salesforce, activecampaign, conversive.
record_typestringRequired with integrationRequired when integration is set. The integrationโ€™s record type, e.g. contacts, leads.
contentobjectOptionalChannel content for WhatsApp and RCS templates.
template_folder_idintegerOptionalFolder to place the template in.

Response

NameTypeDescription
template_idintegerID of the new template.

Errors

StatusErrorDescription
400 Bad RequestMISSING-RECORD-TYPEintegration was sent without record_type.
400 Bad RequestBAD-TEMPLATE-NAMEThe name contains characters that are not allowed.
401 UnauthorizedNO-API-KEY / FORBIDDEN-API-KEYThe API key is missing or not valid.
403 Forbiddenโ€”More than 25 requests in a minute. Wait a minute and retry.