Skip to content

Get an AI grant.

GET
/api/admin/ai-grants/{id}
Code sample: Shell / cURL
curl --request GET \
--url https://auth.example.com/api/admin/ai-grants/example \
--header 'Authorization: Bearer <token>'

Returns one AI grant by id for the current tenant.

id
required
string

AI grant id.

AI grant detail response.

Media type application/json
object
grant
required
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
key
additional properties
Example
{
"grant": {
"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"
}

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"
}