Skip to content
gist.link ↗

setAutoRecharge

Mutation Billing API — POST https://billing.api.gist.link/graphql

Configure (or disable) automatic credit top-ups when the balance runs low. Any org member.

billing:mutation:setAutoRecharge

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

type Mutation {
setAutoRecharge(input: AutoRechargeInput!): CreditWallet!
}
Argument Type Required Description
input AutoRechargeInput! Yes —

CreditWallet! — see the Billing types reference.

Terminal window
curl https://billing.api.gist.link/graphql \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H 'Content-Type: application/json' \
-d @- <<'JSON'
{
"query": "mutation SetAutoRecharge($input: AutoRechargeInput!) { setAutoRecharge(input: $input) { uuid created_at updated_at } }",
"variables": {
"input": {
"enabled": true,
"threshold_minor": 10,
"amount_minor": 10
}
}
}
JSON