Python
import requests
url = "https://app.langwatch.ai/api/v1/roles"
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/roles', 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/roles \
--header 'Authorization: Bearer <token>'{
"roles": [
{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"permissions": [
"<string>"
],
"builtIn": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
]
}Roles
List roles
List the organization’s custom roles with their permission sets. Omitted builtIn: custom roles only. ?builtIn=true lists only the built-in roles admin, member and viewer, ?builtIn=false only the custom ones.
GET
/
api
/
v1
/
roles
Python
import requests
url = "https://app.langwatch.ai/api/v1/roles"
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/roles', 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/roles \
--header 'Authorization: Bearer <token>'{
"roles": [
{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"permissions": [
"<string>"
],
"builtIn": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
]
}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:
true, false Response
200 - application/json
Success
Show child attributes
Show child attributes
Last modified on October 12, 2026
Was this page helpful?