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:
- GraphQL
- cURL
mutation UpdateWhatsAppTrigger($input: UpdateWhatsAppTriggerInput!) {
updateWhatsAppTrigger(input: $input) {
id
defaultCountryCode
channelName
displayName
apiKeyLast4
channelId
capabilities {
createTemplate
requiresChannel
}
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "mutation UpdateWhatsAppTrigger($input: UpdateWhatsAppTriggerInput!) {\n updateWhatsAppTrigger(input: $input) {\n id\n defaultCountryCode\n channelName\n displayName\n apiKeyLast4\n channelId\n capabilities {\n createTemplate\n requiresChannel\n }\n }\n}",
"variables": {
"input": {
"enabled": true,
"triggerKey": "string"
}
}
}
EOF
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.