Skip to main content

updateWhatsAppTrigger

Requires permission settings:integration:update.

Switches one WhatsApp trigger on or off and maps it to a message template. The template must exist in the provider account, and a template must be chosen before a trigger can be enabled. 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 UpdateWhatsAppTrigger($input: UpdateWhatsAppTriggerInput!) {
updateWhatsAppTrigger(input: $input) {
id
defaultCountryCode
channelName
displayName
apiKeyLast4
channelId
capabilities {
createTemplate
requiresChannel
}
}
}

Variables:

{
"input": {
"enabled": true,
"triggerKey": "string"
}
}

Response:

{
"data": {
"updateWhatsAppTrigger": {
"id": "id",
"defaultCountryCode": "string",
"channelName": "string",
"displayName": "string",
"apiKeyLast4": "string",
"channelId": "string",
"capabilities": {
"createTemplate": true,
"requiresChannel": true
}
}
}
}
updateWhatsAppTrigger(
input: UpdateWhatsAppTriggerInput!
provider: WhatsAppProvider
): WhatsAppConfigGql!

Arguments​

updateWhatsAppTrigger.input ● UpdateWhatsAppTriggerInput! non-null input​

The trigger, the template name and whether the trigger is enabled.

updateWhatsAppTrigger.provider ● WhatsAppProvider enum​

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

Type​

WhatsAppConfigGql object​

The organization's WhatsApp setup. The API key is never returned in full.