Skip to content
gist.link ↗

purchaseNumber

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

Buy a number from the carrier and wire its webhooks.

phone:mutation:purchaseNumber

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 {
purchaseNumber(input: PurchaseNumberInput!): PhoneNumber!
}
Argument Type Required Description
input PurchaseNumberInput! Yes —

PhoneNumber! — 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 PurchaseNumber($input: PurchaseNumberInput!) { purchaseNumber(input: $input) { uuid status currency } }",
"variables": {
"input": {
"e164": "example"
}
}
}
JSON