Skip to main content

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:

mutation UpsertWhatsAppConfig($input: UpsertWhatsAppConfigInput!) {
upsertWhatsAppConfig(input: $input) {
id
defaultCountryCode
channelName
displayName
apiKeyLast4
channelId
capabilities {
createTemplate
requiresChannel
}
}
}

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.