Skip to content
gist.link ↗

sendMessage

Mutation Phone API — POST https://phone.api.gist.link/graphql

Queue an outbound SMS (delivery is async via Messenger).

phone:mutation:sendMessage

The calling IAM key must hold this permission (or a wildcard that covers it: phone:mutation:* or phone:*) and the access token must have been minted with audience=phone. See Permissions.

type Mutation {
sendMessage(input: SendMessageInput!): SmsMessage!
}
Argument Type Required Description
input SendMessageInput! Yes —

SmsMessage! — see the Phone types reference.

Terminal window
curl https://phone.api.gist.link/graphql \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H 'Content-Type: application/json' \
-d @- <<'JSON'
{
"query": "mutation SendMessage($input: SendMessageInput!) { sendMessage(input: $input) { uuid direction contactE164 body mediaUrls status isRead createdAt } }",
"variables": {
"input": {
"numberUuid": "01a01234-abcd-7000-9000-0123456789ab",
"to": "example",
"body": "example"
}
}
}
JSON