One REST API runs everything in Lucra; the app is built on it too. Use it directly, through the SDK, or as tools over MCP.
Your first request
curl https://api.onlucra.com/v1/programs \
-H "Authorization: Bearer $LUCRA_API_KEY" \
-H "Lucra-Version: 2026-10-01"
Get a key in Settings → API and MCP. Every request sends Lucra-Version, so your integration keeps working as the API grows.
IDs
IDs start with a prefix naming the resource, like prog_00lhuAJjQgdtNt5WnqTBc95. Treat the rest as opaque.
| Prefix | Resource |
|---|---|
acct_ | account |
ad_ | ad |
adauth_ | ad authorization |
adset_ | ad set |
agac_ | agreement acceptance |
agr_ | agreement |
appl_ | application |
camp_ | campaign |
conn_ | connection |
crtr_ | creator |
dep_ | deposit |
emb_ | embed |
ern_ | earning |
evt_ | webhook event |
file_ | file |
key_ | key |
msg_ | message |
pay_ | payment |
post_ | post |
pout_ | payout |
prod_ | product |
prog_ | program |
ret_ | retainer |
rfnd_ | refund |
smpl_ | sample |
sub_ | submission |
thr_ | thread |
txn_ | transaction |
wdr_ | withdrawal |
Responses
{
"id": "prog_00lhuAJjQgdtNt5WnqTBc95",
"name": "Spring launch",
"status": "open",
"version": 3,
"createdAt": "2026-10-01T15:04:05.000Z"
}
- References are bare IDs:
program,creator,account. - Money is in cents beside a
currency; rates are percents. - Times are UTC ISO 8601 and end in
At. - Enums can grow, so handle values you don't know.
Lists
Lists take limit (up to 100) and cursor, and return data with a nextCursor (null on the last page). Filter by field name, like status=pending,approved, or by createdAfter and createdBefore.
Nothing is deleted: set status to archived. Lists leave archived items out unless you ask for them.
Changes
Send a resource's version with a PATCH to change it only if nobody else has; a stale one returns 409 version_conflict.
Idempotency
Send an Idempotency-Key on a write and a retry returns the first response instead of writing twice. Writes that move money require one.
Errors
Errors carry a stable code, a readable detail, and a fix when there's a clear next step.
{
"status": 422,
"code": "invalid_request",
"detail": "type: expected one of \"organic\"|\"paid_ads\"",
"fix": "Fix `type` in the request body.",
"retryable": false
}
| Status | Means |
|---|---|
| 401 | Missing or invalid key |
| 403 | The key can't do this, or can't reach that account |
| 404 | Not found |
| 409 | A conflict, or a setup step left (requirement_…) |
| 422 | Invalid request; its errors array lists every field |
| 429 | Rate limited; wait for Retry-After |
OpenAPI
The full spec is at https://api.onlucra.com/v1/openapi.json. Browse every endpoint.