An enrollment token
Call the API with an API key that holds qurl:agent. Set target: connector and bind the token to the connector id with one claim, and it can enroll that connector and nothing else — safe to hand to whoever runs the install. For an agent, set target: agent and leave claims out, or add a connector claim to restrict the agent to one connector.
expires_in is optional and defaults to 24 hours, which is also the ceiling. Mint the token close to when it will be used. Do not send scopes: a token’s scopes are server-assigned from its target.
# QURL_API_KEY is an account key with qurl:agent.
curl -X POST https://api.layerv.ai/v1/api-keys \
-H "Authorization: Bearer $QURL_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"kind": "enrollment_token",
"name": "prod-dashboard connector enrollment",
"target": "connector",
"claims": [{ "type": "connector", "id": "prod-dashboard" }],
"expires_in": "2h"
}'
{
"data": {
"key_id": "key_def456abc123",
"api_key": "lv_live_b7k2...",
"key_prefix": "lv_live_b7k2",
"kind": "enrollment_token",
"target": "connector",
"claims": [{ "type": "connector", "id": "prod-dashboard" }],
"name": "prod-dashboard connector enrollment",
"scopes": ["qurl:agent", "qurl:write"],
"status": "active",
"created_at": "2026-08-04T10:30:00Z",
"expires_at": "2026-08-04T12:30:00Z"
},
"meta": { "request_id": "req_def456" }
}