List virtual keys
import requests
url = "https://app.langwatch.ai/api/gateway/v1/virtual-keys"
headers = {"X-Auth-Token": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Auth-Token': '<api-key>'}};
fetch('https://app.langwatch.ai/api/gateway/v1/virtual-keys', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://app.langwatch.ai/api/gateway/v1/virtual-keys \
--header 'X-Auth-Token: <api-key>'{
"data": [
{
"id": "<string>",
"organization_id": "<string>",
"name": "<string>",
"description": "<string>",
"status": "active",
"purpose": "user",
"display_prefix": "<string>",
"principal_user_id": "<string>",
"trace_project_id": "<string>",
"trace_project_archived": true,
"external_id": "<string>",
"metadata": {},
"scopes": [
{
"scope_type": "organization",
"scope_id": "<string>"
}
],
"routing_policy_id": "<string>",
"routing_mode": "none",
"revision": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"last_used_at": "2023-11-07T05:31:56Z",
"revoked_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"config": "<unknown>"
}
],
"next_cursor": "<string>"
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"meta": {},
"trace_id": "<string>",
"span_id": "<string>"
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"meta": {},
"trace_id": "<string>",
"span_id": "<string>"
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"meta": {},
"trace_id": "<string>",
"span_id": "<string>"
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"meta": {},
"trace_id": "<string>",
"span_id": "<string>"
}
}Gateway: Virtual Keys
List virtual keys
Returns the virtual keys visible to the caller’s project credential: keys scoped to this project, to its team, or to the whole organization. Newest first, paged by cursor: follow next_cursor until it comes back null. Visibility is applied to each page after it is read, so a page can hold fewer than limit rows without meaning the walk is finished.
GET
/
api
/
gateway
/
v1
/
virtual-keys
List virtual keys
import requests
url = "https://app.langwatch.ai/api/gateway/v1/virtual-keys"
headers = {"X-Auth-Token": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Auth-Token': '<api-key>'}};
fetch('https://app.langwatch.ai/api/gateway/v1/virtual-keys', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://app.langwatch.ai/api/gateway/v1/virtual-keys \
--header 'X-Auth-Token: <api-key>'{
"data": [
{
"id": "<string>",
"organization_id": "<string>",
"name": "<string>",
"description": "<string>",
"status": "active",
"purpose": "user",
"display_prefix": "<string>",
"principal_user_id": "<string>",
"trace_project_id": "<string>",
"trace_project_archived": true,
"external_id": "<string>",
"metadata": {},
"scopes": [
{
"scope_type": "organization",
"scope_id": "<string>"
}
],
"routing_policy_id": "<string>",
"routing_mode": "none",
"revision": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"last_used_at": "2023-11-07T05:31:56Z",
"revoked_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"config": "<unknown>"
}
],
"next_cursor": "<string>"
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"meta": {},
"trace_id": "<string>",
"span_id": "<string>"
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"meta": {},
"trace_id": "<string>",
"span_id": "<string>"
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"meta": {},
"trace_id": "<string>",
"span_id": "<string>"
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"meta": {},
"trace_id": "<string>",
"span_id": "<string>"
}
}Authorizations
Project API key for sending traces and accessing project-scoped resources. Format: sk-lw-... (no underscore). Obtain one by creating a project via the Admin API or the LangWatch UI.
Query Parameters
Maximum string length:
500Required range:
x <= 200Exact match on the resource's external_id.
Maximum string length:
128Last modified on May 19, 2026
Was this page helpful?
⌘I