List grants
import requests
url = "https://app.langwatch.ai/api/v1/grants"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.langwatch.ai/api/v1/grants', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://app.langwatch.ai/api/v1/grants \
--header 'Authorization: Bearer <token>'{
"grants": [
{
"id": "<string>",
"principal": {
"type": "user",
"id": "<string>",
"name": "<string>"
},
"role": {
"id": "<string>",
"name": "<string>",
"builtIn": true
},
"scope": {
"type": "organization",
"id": "<string>",
"name": "<string>"
},
"status": "active",
"expiresAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z"
}
],
"nextCursor": "<string>"
}Grants
List grants
List the organization’s grants, oldest first unless order=newest, each naming its principal (user, group or API key), role and scope. Filter by principal, role, scope or status; status is derived from expiresAt. Pages by cursor: pass nextCursor back as cursor until it is null.
GET
/
api
/
v1
/
grants
List grants
import requests
url = "https://app.langwatch.ai/api/v1/grants"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.langwatch.ai/api/v1/grants', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://app.langwatch.ai/api/v1/grants \
--header 'Authorization: Bearer <token>'{
"grants": [
{
"id": "<string>",
"principal": {
"type": "user",
"id": "<string>",
"name": "<string>"
},
"role": {
"id": "<string>",
"name": "<string>",
"builtIn": true
},
"scope": {
"type": "organization",
"id": "<string>",
"name": "<string>"
},
"status": "active",
"expiresAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z"
}
],
"nextCursor": "<string>"
}Authorizations
Admin API key for organization-level operations (managing projects, API keys). Create one in Settings > API Keys or via POST /api/api-keys. Format: sk-lw-{id}_{secret}.
Query Parameters
Available options:
user, group, apiKey Required string length:
1 - 128Required string length:
1 - 128Available options:
organization, team, project Required string length:
1 - 128Available options:
active, expired Required range:
1 <= x <= 200Pattern:
^\d{1,16}\.[A-Za-z0-9_-]{1,256}$Available options:
newest, oldest Last modified on October 12, 2026
Was this page helpful?