Approvals
Available from Phase 3
/api/v1/approvalsAn app token (sk_live_, sk_test_, pk_live_), a browser token (a 5-minute ES256 JWT) or an agent token (sa_live_).
In: header
Query Parameters
1 <= value <= 200501 <= lengthResponse Body
application/json
application/json
curl -X GET "https://example.com/api/v1/approvals"{ "data": [ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "opId": "string", "status": "pending", "reason": "string", "requestedBy": { "userId": "2c4a230c-5085-4924-a3e1-25fb4fc5965b", "tokenId": "07dfef4c-e677-4ce6-87a3-cd348338445f" }, "expiresAt": "2019-08-24T14:15:22Z", "decidedBy": "3a741861-b09d-4f52-b451-be998c2bf2d1", "decidedAt": "2019-08-24T14:15:22Z", "result": "string" } ], "nextCursor": "string"}/api/v1/approvals/{id}An app token (sk_live_, sk_test_, pk_live_), a browser token (a 5-minute ES256 JWT) or an agent token (sa_live_).
In: header
Path Parameters
uuidResponse Body
application/json
application/json
curl -X GET "https://example.com/api/v1/approvals/497f6eca-6276-4993-bfeb-53cbbbba6f08"{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "opId": "string", "status": "pending", "reason": "string", "requestedBy": { "userId": "2c4a230c-5085-4924-a3e1-25fb4fc5965b", "tokenId": "07dfef4c-e677-4ce6-87a3-cd348338445f" }, "expiresAt": "2019-08-24T14:15:22Z", "decidedBy": "3a741861-b09d-4f52-b451-be998c2bf2d1", "decidedAt": "2019-08-24T14:15:22Z", "result": "string"}/api/v1/approvals/{id}/decideAuthorization
consoleSession The console session cookie. Its real name comes from the auth library (ADR-002).
In: cookie
Path Parameters
uuidHeader Parameters
Required for app and agent tokens on mutations. A replay within 24 hours returns the stored response.
1 <= lengthRequest Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X POST "https://example.com/api/v1/approvals/497f6eca-6276-4993-bfeb-53cbbbba6f08/decide" \ -H "Content-Type: application/json" \ -d '{ "decision": "approved" }'nullBandwise is an independent product built on TypeSafe's System One models. It is not TypeSafe's documentation. For the System One models themselves, see docs.typesafe.ai.