curl -X DELETE "https://api.nevia.cloud/v1/workspaces/01d4cnjjq40hnnh0nwmkg35nv2h/access/01d4cnjmn4fbb1r5btxb5mypv62/key" \
-H "Authorization: Bearer $TOKEN" \
-H "Idempotency-Key: 8f1c2a7e-3b4d-4c5e-9f0a-1b2c3d4e5f60"{
"key": {
"id": "01d4cnjq8r0tvwxyb3c4d5f6g7h",
"principal": "01d4cnjmn4fbb1r5btxb5mypv62",
"byok": true,
"created_by": "01d4cnjmn4fbb1r5btxb5mypv62",
"expires_at": "2026-09-10T12:34:56Z",
"last_used_at": "2026-09-10T12:34:56Z",
"created_at": "2026-09-10T12:34:56Z",
"revoked_at": "2026-09-10T12:34:56Z"
},
"operations": [
"01d4cnjm89yk0r3xtv80dy0x7by"
]
}Authorization
bearerAuth Send the token in the Authorization: Bearer <token> header. See Authenticate.
In: header
Path Parameters
Workspace id: 27 lowercase letters and digits.
^[A-Za-z0-9_-]{1,64}$Principal id: 27 lowercase letters and digits.
^[A-Za-z0-9_-]{1,64}$Header Parameters
Required for this non-idempotent request. Clients generate one key per action and preserve it across transport retries. Within the retained window, repeats return the recorded result and different input with the same key is 409. Keys expire 10 minutes after admission, or 120 seconds after success or terminal failure, whichever is earlier. Reusing an expired key can execute new work. The API tracks at most 100,000 requests across replicas. New keys at capacity receive 429 with Retry-After of 600–630 seconds.
1 <= length <= 255Behavior
The key is addressed through the principal, so no key id is needed. Every access token the principal holds at this moment is refused on its next request with 401 token_revoked. An expired key is revoked the same way, since the tokens it minted may still be in use. The principal keeps its access, and its key_state reads revoked until the next rotation. Revoking an already revoked key returns it again.
Response
application/jsonThe revoked key, as it stands after revocation.
Rotate the key
Rotate a private-key principal's key, issuing the next one and revoking the current one in the same step.
Get the current user
Get the user behind the token, each workspace they can use and each project they hold a grant on, with their role in each, including a workspace where they are a member scoped to projects (`scope: projects`).