upsertWhatsAppConfig
Requires permission settings:integration:update.
Creates or updates the WhatsApp configuration for a provider. Entering a new API key clears the verification, so the connection must be tested again. 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 UpsertWhatsAppConfig($input: UpsertWhatsAppConfigInput!) {
upsertWhatsAppConfig(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 UpsertWhatsAppConfig($input: UpsertWhatsAppConfigInput!) {\n upsertWhatsAppConfig(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": {}
}
}
EOF
Variables:
{
"input": {}
}
Response:
{
"data": {
"upsertWhatsAppConfig": {
"id": "id",
"defaultCountryCode": "string",
"channelName": "string",
"displayName": "string",
"apiKeyLast4": "string",
"channelId": "string",
"capabilities": {
"createTemplate": true,
"requiresChannel": true
}
}
}
}
upsertWhatsAppConfig(
input: UpsertWhatsAppConfigInput!
): WhatsAppConfigGql!
Arguments
upsertWhatsAppConfig.input ● UpsertWhatsAppConfigInput! non-null input
The provider, API key and provider settings such as the channel.
Type
WhatsAppConfigGql object
The organization's WhatsApp setup. The API key is never returned in full.