keys
GET
https://lucidace.com /v1/keys/lookup Whether an account key (`lc_pat_...`) with this display prefix is active or revoked. Looks only among the caller's own keys; instance admins see every key and the owner's email.
Parameters
prefixstringqueryrequiredThe key's display prefix, e.g.
lc_pat_AbCdCode samples
cURL
curl -X GET "https://lucidace.com/v1/keys/lookup?prefix=<prefix>"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200
Example
{
"created_at": "2024-01-01T00:00:00Z",
"name": "string",
"owner_email": "string",
"revoked_at": "2024-01-01T00:00:00Z",
"status": "string"
}Schema
created_atstringnamestringowner_emailstringInstance admins only.
revoked_atstringstatusstringrequiredactive, revoked or unknown (also for keys of other users, unless the caller is an instance admin).400
404
GET
https://lucidace.com /v1/keys/self The calling key's kind, scopes, reach, environment and expiry. Sessions and other non-key callers get 404.
Code samples
cURL
curl -X GET "https://lucidace.com/v1/keys/self" \
-H "Authorization: Bearer $LUCIDACE_API_KEY"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200
Example
{
"environment": "string",
"expires_at": "2024-01-01T00:00:00Z",
"kind": "string",
"name": "string",
"org_ids": [
"string"
],
"prefix": "string",
"project_id": "string",
"scopes": [
"string"
]
}Schema
environmentstringSDK keys: the environment the key serves (its binding, else the project default);
null for personal and account keys.expires_atstringkindstringrequiredpublic, secret or personal (project keys); account for an account key.namestringrequiredorg_idsarrayAccount keys: the orgs the key is limited to;
null means every org the owner belongs to.prefixstringrequiredproject_idstringProject keys: the project the key belongs to.
scopesstring[]requiredAn empty list on a legacy secret key means it reads the whole project.
401
404 The caller is not authenticated by a key
GET
https://lucidace.com /v1/me/keys Scope adminThe caller's account keys (metadata only, newest first).
Code samples
cURL
curl -X GET "https://lucidace.com/v1/me/keys"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 Page of AccountKey
Example
{
"data": [
{
"created_at": "2024-01-01T00:00:00Z",
"expires_at": "2024-01-01T00:00:00Z",
"id": "string",
"key_prefix": "string",
"last_used_at": "2024-01-01T00:00:00Z",
"name": "string",
"org_ids": [
"string"
],
"revoked_at": "2024-01-01T00:00:00Z",
"scopes": [
"string"
],
"user_id": "string"
}
],
"next_cursor": "string"
}Schema
dataAccountKey[]requiredShow child parameters
created_atstringrequiredexpires_atstringidstringrequiredkey_prefixstringrequiredlast_used_atstringnamestringrequiredorg_idsstring[]requiredEmpty = every org the owner belongs to.
revoked_atstringscopesstring[]requireduser_idstringrequirednext_cursorstring404
POST
https://lucidace.com /v1/me/keys Scope adminThe secret is in the response once (as `value`, and `secret` as a deprecated alias) and cannot be fetched again. `?dry_run=true` validates without creating (200, no secret); an `Idempotency-Key` retry within 24h returns the first response without the secret.
Parameters
dry_runbooleanqueryvalidate only
Idempotency-Keystringheaderreplay-safe retries for 24h
Request body
application/json
expires_atstringnamestringrequiredorg_idsstring[]Optional: only these orgs (each must be one the caller belongs to). Empty = all of them.
scopesstring[]requiredOrg administration scopes (
members:read|write, roles:read|write, audit:read, billing:read, sso:read|write, scim:read|write) are capped by the creator's role in each org; admin opens every org route the creator's role allows. At least one: org:read, org:write, project:read, project:write and the project scopes (*:read, flag:write, ...). *:read and *:write also read orgs and project settings. Applied to every project the owner can access. See GET /v1/scopes.{
"expires_at": "2024-01-01T00:00:00Z",
"name": "string",
"org_ids": [
"string"
],
"scopes": [
"string"
]
}Code samples
cURL
curl -X POST "https://lucidace.com/v1/me/keys" \
-H "Idempotency-Key: <value>" \
-H "Content-Type: application/json" \
-d '{"expires_at":"2024-01-01T00:00:00Z","name":"string","org_ids":["string"],"scopes":["string"]}'TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 dry run
201
Example
{
"created_at": "2024-01-01T00:00:00Z",
"expires_at": "2024-01-01T00:00:00Z",
"id": "string",
"key_prefix": "string",
"last_used_at": "2024-01-01T00:00:00Z",
"name": "string",
"org_ids": [
"string"
],
"revoked_at": "2024-01-01T00:00:00Z",
"scopes": [
"string"
],
"user_id": "string",
"secret": "string",
"value": "string"
}Schema
created_atstringrequiredexpires_atstringidstringrequiredkey_prefixstringrequiredlast_used_atstringnamestringrequiredorg_idsstring[]requiredEmpty = every org the owner belongs to.
revoked_atstringscopesstring[]requireduser_idstringrequiredsecretstringrequiredDeprecated alias of
value.valuestringrequiredShown once; only its SHA-256 is stored. Same field name as every other key create.
400
404
409 idempotency key reused
DELETE
https://lucidace.com /v1/me/keys/{key_id} Scope adminParameters
key_idstringpathrequiredCode samples
cURL
curl -X DELETE "https://lucidace.com/v1/me/keys/{key_id}"TypeScript
Python
Go
PHP
Ruby
Java
Responses
204
404
POST
https://lucidace.com /v1/me/keys/{key_id}/rotate Scope adminIssues a replacement with the same name, scopes, org list and expiry, and revokes the old key.
Parameters
key_idstringpathrequiredCode samples
cURL
curl -X POST "https://lucidace.com/v1/me/keys/{key_id}/rotate"TypeScript
Python
Go
PHP
Ruby
Java
GET
https://lucidace.com /v1/orgs/{org_id}/keys Scope adminEvery key in the org with its owner, project, scopes and last use (newest first), for owners and admins auditing access. Secrets are never included.
Parameters
org_idstringpathrequiredkindstringquerypublic, secret or personal
include_revokedbooleanquerylimitintegerquerycursorstringqueryCode samples
cURL
curl -X GET "https://lucidace.com/v1/orgs/{org_id}/keys"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 Page of OrgKey
Example
{
"data": [
{
"created_at": "2024-01-01T00:00:00Z",
"created_by": "string",
"environment": "string",
"expires_at": "2024-01-01T00:00:00Z",
"id": "string",
"key_prefix": "string",
"kind": "string",
"last_used_at": "2024-01-01T00:00:00Z",
"legacy_read_all": true,
"name": "string",
"org_id": "string",
"project_id": "string",
"public_value": "string",
"revoked_at": "2024-01-01T00:00:00Z",
"scopes": [
"string"
],
"owner_email": "string",
"project_name": "string"
}
],
"next_cursor": "string"
}Schema
dataOrgKey[]requiredShow child parameters
created_atstringrequiredcreated_bystringenvironmentstringEnvironment an SDK key is bound to.
null means unbound: it serves the project's default environment, looked up when the key is used (so it follows a change of default); personal keys are never bound.expires_atstringidstringrequiredkey_prefixstringrequiredkindstringrequiredlast_used_atstringlegacy_read_allbooleanrequiredA secret key with no scopes: it reads the whole project (issued before secret keys needed explicit scopes). Rotate it to a scoped key.
namestringrequiredorg_idstringrequiredproject_idstringrequiredpublic_valuestringThe full key, kept only for
public keys (they ship in web pages); null for secret and personal keys, which are shown once, and for public keys minted before this was stored.revoked_atstringscopesstring[]requiredowner_emailstringproject_namestringrequirednext_cursorstring400
403
404
GET
https://lucidace.com /v1/projects/{project_id}/environments Scope settings:readThe project's environments, for choosing what a new SDK key is bound to.
Parameters
project_idstringpathrequiredCode samples
cURL
curl -X GET "https://lucidace.com/v1/projects/{project_id}/environments"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 oldest first
Example
{
"data": [
{
"id": "string",
"is_default": true,
"name": "string"
}
],
"next_cursor": "string"
}Schema
dataobject[]requiredShow child parameters
idstringrequiredis_defaultbooleanrequirednamestringrequirednext_cursorstring404
GET
https://lucidace.com /v1/projects/{project_id}/keys Scope adminKey metadata only (prefix, scopes, last use); secrets are never returned after creation.
Parameters
project_idstringpathrequiredinclude_revokedbooleanqueryalso list revoked keys (
revoked_at set); default falselimitintegerquerycursorstringqueryCode samples
cURL
curl -X GET "https://lucidace.com/v1/projects/{project_id}/keys"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 Page of ApiKey; revoked keys only with include_revoked=true
Example
{
"data": [
{
"created_at": "2024-01-01T00:00:00Z",
"created_by": "string",
"environment": "string",
"expires_at": "2024-01-01T00:00:00Z",
"id": "string",
"key_prefix": "string",
"kind": "string",
"last_used_at": "2024-01-01T00:00:00Z",
"legacy_read_all": true,
"name": "string",
"org_id": "string",
"project_id": "string",
"public_value": "string",
"revoked_at": "2024-01-01T00:00:00Z",
"scopes": [
"string"
]
}
],
"next_cursor": "string"
}Schema
dataApiKey[]requiredShow child parameters
created_atstringrequiredcreated_bystringenvironmentstringEnvironment an SDK key is bound to.
null means unbound: it serves the project's default environment, looked up when the key is used (so it follows a change of default); personal keys are never bound.expires_atstringidstringrequiredkey_prefixstringrequiredkindstringrequiredlast_used_atstringlegacy_read_allbooleanrequiredA secret key with no scopes: it reads the whole project (issued before secret keys needed explicit scopes). Rotate it to a scoped key.
namestringrequiredorg_idstringrequiredproject_idstringrequiredpublic_valuestringThe full key, kept only for
public keys (they ship in web pages); null for secret and personal keys, which are shown once, and for public keys minted before this was stored.revoked_atstringscopesstring[]requirednext_cursorstring403
404
Updated