Skip to content
GasketDocs

Request an action

POST /v1/actions

POST/v1/actionsscope actions:write

Body fieldTypeNotes
agent_idstringRequired. agt_…
servicestringRequired. Letters, numbers, _ . -
operationstringRequired.
amountnumberOptional. Compared with when.amount_gt.
inputobjectOptional, ≤ 16 KB. Recorded.
idempotency_keystringOptional, ≤ 128 chars. Repeats return the same action, free.
curl https://usegasket.xyz/api/v1/actions \
  -H "Authorization: Bearer $GASKET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "agent_id": "agt_...",
    "service": "stripe",
    "operation": "refund.create",
    "amount": 75,
    "input": { "charge": "ch_..." },
    "idempotency_key": "refund-ch_123"
  }'

Returns 201 for a new action, 200 for an idempotent repeat. The x-gasket-balance-micros header has your balance after the charge.

Something wrong or missing? Tell us · Stuck? Help center