Skip to main content

createWhatsAppTemplate

Requires permission settings:integration:update.

Submits a new message template, with optional header, footer and buttons, to the WhatsApp provider for approval. Requires permission to update integrations.

Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.

Example:

mutation CreateWhatsAppTemplate($input: CreateWhatsAppTemplateInput!) {
createWhatsAppTemplate(input: $input) {
name
approvalStatus
detail
ok
templateId
}
}

Variables:

{
"input": {
"body": "string",
"bodyText": [
"string"
],
"buttons": [
{
"text": "string",
"type": "string"
}
],
"category": "string",
"displayName": "string",
"language": "string"
}
}

Response:

{
"data": {
"createWhatsAppTemplate": {
"name": "string",
"approvalStatus": "string",
"detail": "string",
"ok": true,
"templateId": "string"
}
}
}
createWhatsAppTemplate(
input: CreateWhatsAppTemplateInput!
provider: WhatsAppProvider
): WhatsAppCreateTemplateResultGql!

Arguments​

createWhatsAppTemplate.input ● CreateWhatsAppTemplateInput! non-null input​

The template's name, language, category, header, body, footer and buttons.

createWhatsAppTemplate.provider ● WhatsAppProvider enum​

The WhatsApp provider to use. Omit it to use the organization's enabled provider, else its most recently edited one.

Type​

WhatsAppCreateTemplateResultGql object​

The result of creating a template.