sendWhatsAppTestMessage
Requires permission settings:integration:update.
Sends a real WhatsApp test message to a phone number for one trigger, using a provider, so a template can be checked. 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 SendWhatsAppTestMessage($input: SendWhatsAppTestMessageInput!) {
sendWhatsAppTestMessage(input: $input) {
detail
ok
providerMessageId
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "mutation SendWhatsAppTestMessage($input: SendWhatsAppTestMessageInput!) {\n sendWhatsAppTestMessage(input: $input) {\n detail\n ok\n providerMessageId\n }\n}",
"variables": {
"input": {
"toPhone": "string"
}
}
}
EOF
Variables:
{
"input": {
"toPhone": "string"
}
}
Response:
{
"data": {
"sendWhatsAppTestMessage": {
"detail": "string",
"ok": true,
"providerMessageId": "string"
}
}
}
sendWhatsAppTestMessage(
input: SendWhatsAppTestMessageInput!
): WhatsAppTestResultGql!
Arguments
sendWhatsAppTestMessage.input ● SendWhatsAppTestMessageInput! non-null input
The phone number to send to, the trigger, an optional provider and the values for the message body.
Type
WhatsAppTestResultGql object
The result of a test message.