keys
https://lucidace.com /v1/projects/{project_id}/keys The secret is in the response once and cannot be fetched again.
Give each integration the narrowest key. Rights requests and erasure (a Cookie Munch executor's secretKey, a GDPR deletion handler): {"kind":"secret","name":"erasure","scopes":["privacy:execute"]}. That key may call persons/bulk_delete, DELETE persons/{id} and the /privacy/* rights routes of this project and nothing else; never hand an executor an admin key. Server events: {"kind":"secret","scopes":["capture"]}. Minting needs an account key (lc_pat_) or a session; GET /v1/whoami shows what any key can do.
A read-only key for the query API: {"kind":"secret","scopes":["query:read"]} reads every project resource (insights, persons, replays, flags, experiments) and writes nothing. ?dry_run=true validates without creating (200, no secret). An Idempotency-Key retry within 24h returns the first response without the secret (replayed: true); rotate to get a new one.
Parameters
project_idstringpathrequireddry_runbooleanqueryIdempotency-KeystringheaderRequest body
application/json
environmentstringexpires_atstringkindstringrequiredpublic, secret or personal.namestringrequiredscopesstring[]capture for send-only). Fine-grained <resource>:read|write for insight, dashboard, replay, flag, experiment, cohort, person, connector, settings, plus pii:read, *:read, *:write, pipeline:read, pipeline:write, profiles:read (the gateway profile API), privacy:execute (rights requests and person erasure, nothing else), capture (secret keys: send events, read nothing), admin, delegate and the older broad query:read / draft:write. See GET /v1/scopes.{
"environment": "string",
"expires_at": "2024-01-01T00:00:00Z",
"kind": "string",
"name": "string",
"scopes": [
"string"
]
}Code samples
cURL
curl -X POST "https://lucidace.com/v1/projects/{project_id}/keys" \
-H "Idempotency-Key: <value>" \
-H "Content-Type: application/json" \
-d '{"environment":"string","expires_at":"2024-01-01T00:00:00Z","kind":"string","name":"string","scopes":["string"]}'TypeScript
Python
Go
PHP
Ruby
Java
Responses
Example
{
"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"
],
"secret": "string",
"value": "string"
}Schema
created_atstringrequiredcreated_bystringenvironmentstringnull 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_allbooleanrequirednamestringrequiredorg_idstringrequiredproject_idstringrequiredpublic_valuestringpublic 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[]requiredsecretstringrequireddeprecatedvalue, kept for older clients. On a public key it is NOT a secret (it equals public_value); read value and tell the keys apart by kind.valuestringrequiredlc_pk_… for kind: public (ships in web pages), lc_sk_… for kind: secret (server only). Shown once for secret keys; only its SHA-256 is stored.https://lucidace.com /v1/projects/{project_id}/keys/{key_id} Scope adminParameters
project_idstringpathrequiredkey_idstringpathrequiredCode samples
cURL
curl -X DELETE "https://lucidace.com/v1/projects/{project_id}/keys/{key_id}"TypeScript
Python
Go
PHP
Ruby
Java
Responses
https://lucidace.com /v1/projects/{project_id}/keys/{key_id}/rotate Issues a replacement with the same name, kind, scopes and expiry, and revokes the old key.
Parameters
project_idstringpathrequiredkey_idstringpathrequiredCode samples
cURL
curl -X POST "https://lucidace.com/v1/projects/{project_id}/keys/{key_id}/rotate"TypeScript
Python
Go
PHP
Ruby
Java
https://lucidace.com /v1/scopes The scope catalogue, for key and OAuth app forms.
Code samples
cURL
curl -X GET "https://lucidace.com/v1/scopes"TypeScript
Python
Go
PHP
Ruby
Java
Responses
Example
[
{
"level": "string",
"name": "string",
"resource": "string"
}
]Schema
levelstringrequiredread, write, admin or delegate.namestringrequiredresourcestring* for all, null for special scopes.https://lucidace.com /v1/whoami `GET /v1/whoami`: the same answer as `GET /v1/keys/self`, under the name other platforms use.
Code samples
cURL
curl -X GET "https://lucidace.com/v1/whoami" \
-H "Authorization: Bearer $LUCIDACE_API_KEY"TypeScript
Python
Go
PHP
Ruby
Java
Responses
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
environmentstringnull for personal and account keys.expires_atstringkindstringrequiredpublic, secret or personal (project keys); account for an account key.namestringrequiredorg_idsarraynull means every org the owner belongs to.prefixstringrequiredproject_idstringscopesstring[]required