Request an action
POST /v1/actions
POST/v1/actionsscope actions:write
| Body field | Type | Notes |
|---|---|---|
| agent_id | string | Required. agt_… |
| service | string | Required. Letters, numbers, _ . - |
| operation | string | Required. |
| amount | number | Optional. Compared with when.amount_gt. |
| input | object | Optional, ≤ 16 KB. Recorded. |
| idempotency_key | string | Optional, ≤ 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