Skip to main content

setWhatsAppEnabled

Requires permission settings:integration:update.

Turns WhatsApp sending on or off for a provider. A connection must have been verified before it can be enabled, and enabling one provider turns the others off, since only one is enabled at a time. 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 SetWhatsAppEnabled($enabled: Boolean!) {
setWhatsAppEnabled(enabled: $enabled) {
id
defaultCountryCode
channelName
displayName
apiKeyLast4
channelId
capabilities {
createTemplate
requiresChannel
}
}
}

Variables:

{
"enabled": true
}

Response:

{
"data": {
"setWhatsAppEnabled": {
"id": "id",
"defaultCountryCode": "string",
"channelName": "string",
"displayName": "string",
"apiKeyLast4": "string",
"channelId": "string",
"capabilities": {
"createTemplate": true,
"requiresChannel": true
}
}
}
}
setWhatsAppEnabled(
enabled: Boolean!
provider: WhatsAppProvider
): WhatsAppConfigGql!

Arguments​

setWhatsAppEnabled.enabled ● Boolean! non-null scalar​

True to turn sending on, false to turn it off.

setWhatsAppEnabled.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.