Reference

Build on the Lucra API.

Drag a sticker to move it, or use the arrow keys while focused.

Introduction

Requests, IDs, lists, errors, and retries.

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

Terminal
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.

PrefixResource
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

JSON
{
  "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.

JSON
{
  "status": 422,
  "code": "invalid_request",
  "detail": "type: expected one of \"organic\"|\"paid_ads\"",
  "fix": "Fix `type` in the request body.",
  "retryable": false
}
StatusMeans
401Missing or invalid key
403The key can't do this, or can't reach that account
404Not found
409A conflict, or a setup step left (requirement_…)
422Invalid request; its errors array lists every field
429Rate limited; wait for Retry-After

OpenAPI

The full spec is at https://api.onlucra.com/v1/openapi.json. Browse every endpoint.