API Reference
Auto-generated
Oauth Grants
API reference for oauth grants endpoints.
Auto-generated
This page was generated from the OpenAPI spec. Run
make generate-docs to refresh after spec changes.GET /api/v1/oauth-grants/limits
GET
/api/v1/oauth-grants/limitsList Grant Limits
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| X-Organization-Id | string | Optional | X-Organization-Id |
Request Example
Bash
curl -X GET https://api.alterlab.io/api/v1/oauth-grants/limits \
-H "Authorization: Bearer YOUR_SESSION_TOKEN" \
-H "Content-Type: application/json"Response Example
JSON
{
"grants": []
}DELETE /api/v1/oauth-grants/{grant_id}
DELETE
/api/v1/oauth-grants/{grant_id}Revoke Grant
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| grant_id | string | Required | OAuth grant UUID |
| X-Organization-Id | string | Optional | X-Organization-Id |
Request Example
Bash
curl -X DELETE https://api.alterlab.io/api/v1/oauth-grants/<grant_id> \
-H "Authorization: Bearer YOUR_SESSION_TOKEN" \
-H "Content-Type: application/json"Response Example
JSON
{
"status": "ok"
}GET /api/v1/oauth-grants/{grant_id}/limits
GET
/api/v1/oauth-grants/{grant_id}/limitsGet Grant Limits
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| grant_id | string | Required | OAuth grant UUID |
| X-Organization-Id | string | Optional | X-Organization-Id |
Request Example
Bash
curl -X GET https://api.alterlab.io/api/v1/oauth-grants/<grant_id>/limits \
-H "Authorization: Bearer YOUR_SESSION_TOKEN" \
-H "Content-Type: application/json"Response Example
JSON
{
"grant_id": "example",
"client_id": "example",
"client_name": "example",
"scope": "example",
"created_at": "example",
"last_used_at": "example"
}PUT /api/v1/oauth-grants/{grant_id}/limits
PUT
/api/v1/oauth-grants/{grant_id}/limitsSet Grant Limits
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| grant_id | string | Required | OAuth grant UUID |
| X-Organization-Id | string | Optional | X-Organization-Id |
| budget_limit_microcents | integer | Optional | budget_limit_microcents |
| request_limit | integer | Optional | request_limit |
| reset_period | "daily" | "weekly" | "monthly" | Optional | How often the counters reset.Default: monthly |
| enabled | boolean | Optional | Whether this limit is active.Default: True |
| approval_above_usd | number | Optional | approval_above_usd |
Request Example
Bash
curl -X PUT https://api.alterlab.io/api/v1/oauth-grants/<grant_id>/limits \
-H "Authorization: Bearer YOUR_SESSION_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"reset_period": "...",
"enabled": false
}'Response Example
JSON
{
"grant_id": "example",
"client_id": "example",
"client_name": "example",
"scope": "example",
"created_at": "example",
"last_used_at": "example"
}