List AI grants.
GET
/api/admin/ai-grants
Code sample: Shell / cURL
curl --request GET \ --url 'https://auth.example.com/api/admin/ai-grants?page=1&limit=20' \ --header 'Authorization: Bearer <token>'Lists AI grants for the current tenant with pagination and optional filtering by client id, AI principal, and active state.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Query Parameters
Section titled “Query Parameters ” page
integer
Page number, starting at 1.
limit
integer
Page size, clamped to 100 by the handler.
client_id
string
Filter by OAuth client id.
ai_principal
string
Filter by AI principal substring.
is_active
boolean
Filter by active state.
Responses
Section titled “ Responses ”AI grant list response.
Media type application/json
object
grants
required
Array<object>
object
id
required
string
tenant_id
required
string
client_id
required
string
ai_principal
required
string
scopes
required
Space-separated AI scopes.
string
scope_targets
object | array | null
is_active
required
boolean
expires_at
integer | null format: int64
created_by
string | null
created_at
required
integer format: int64
updated_at
required
integer format: int64
revoked_at
integer | null format: int64
revoked_by
string | null
key
additional properties
pagination
required
object
page
required
integer
limit
required
integer
total
required
integer
total_pages
required
integer
key
additional properties
key
additional properties
Example
{ "grants": [ { "id": "grant_123", "tenant_id": "default", "client_id": "client_123", "ai_principal": "assistant:billing-agent", "scopes": "ai:read ai:execute", "scope_targets": { "projects": [ "proj_123" ] }, "is_active": true, "expires_at": 1770007200, "created_by": "admin_123", "created_at": 1770000000, "updated_at": 1770000000, "revoked_at": null, "revoked_by": null } ]}Error response.
Media type application/json
object
error
string
message
string
error_description
string
key
additional properties
Example generated
{ "error": "example", "message": "example", "error_description": "example"}Error response.
Media type application/json
object
error
string
message
string
error_description
string
key
additional properties
Example generated
{ "error": "example", "message": "example", "error_description": "example"}Error response.
Media type application/json
object
error
string
message
string
error_description
string
key
additional properties
Example generated
{ "error": "example", "message": "example", "error_description": "example"}