REST API
Create a scoped workspace API key, make your first request, send website form submissions, and handle limits, webhooks and errors.
What the REST API is
The REST API lets your own servers and scripts read and write contacts, companies, deals, tasks, invoices and activities over HTTPS, with JSON in and out. It is for developers: syncing a billing system, posting leads from a website form, or filling a data warehouse.
Every request carries a workspace API key. The key has scopes, so a form that only creates contacts cannot read your deals.
Before you begin
| You need | Why |
|---|---|
| A workspace admin | Only admins can open the API page and create keys. |
| A server or script | Keep the key on your server. Never put it in a web page or a mobile app, where anyone can read it. |
Create an API key
Open the API page
Go to SettingsWorkspaceAPI.
Click Create API key
In the API keys card, click Create API key.
Name the key and pick scopes
Give it a name and tick the scopes it needs. You must pick at least one.
Create API Key
Create a new API key for external integrations. You will see the full key once after creation.
- Every endpoint, read and write. Only for trusted server tools.
- Read access to every record type.
- Inbound
- Send submissions to an Inbound external form. Cannot read, change or delete anything.
- Recruiting
- Send job applications from your own website. Cannot read, change or delete anything.
- Records
- 1Name: say which app uses the key, so you know what breaks if you revoke it.
- 2Scopes: Submit forms can send form entries and nothing else. Under Records, each type has Read and Write; Write also covers update and delete, and the top checkbox of a group ticks both.
Create and copy the key
Click Create. The key starts with lmb_. Copy it into your password manager or your server's secret store before you close the dialog: it is shown only once and cannot be recovered.
Make your first request
All endpoints live under one base URL. Send the key as a Bearer token. The examples read the key from an environment variable, so it never lands in your shell history.
https://api.lumenbase.io/functions/v1curl "https://api.lumenbase.io/functions/v1/v1-public-contacts-crud?page=1&per_page=25" \
-H "Authorization: Bearer $LUMENBASE_API_KEY"The answer has data.items with up to 25 contacts and data.pagination with page, per_page, total and total_pages. Ask for up to 100 per page.
curl -X POST "https://api.lumenbase.io/functions/v1/v1-public-contacts" \
-H "Authorization: Bearer $LUMENBASE_API_KEY" \
-H "Content-Type: application/json" \
-H "X-Idempotency-Key: signup-2026-09-25-anna-larsen" \
-d '{
"email": "anna.larsen@northwind.example",
"first_name": "Anna",
"last_name": "Larsen",
"company_name": "Northwind Advisory",
"source": "website-form"
}'Lumenbase matches an existing contact by email, then phone. A new contact answers 201; a match is updated and answers 200. The company is matched or created from company_name.
{
"success": true,
"data": {
"contact_id": "3f6c1a52-8d0e-4b8f-9a61-2c7e5b0d4a19",
"company_id": "a1b2c3d4-0000-4000-8000-000000000001",
"is_new_contact": true,
"is_new_company": true,
"message": "New contact created successfully"
},
"meta": { "request_id": "req_...", "api_version": "1", "timestamp": "2026-09-25T10:00:00.000Z" }
}X-Idempotency-Key on POST /v1-public-contacts and POST /v1-public-activities. A retry with the same key within 24 hours returns the first answer instead of creating a second record. The other endpoints ignore it. Form submissions use external_id instead (below).Send website form submissions
For a contact form on your site, or in a form tool, use the Inbound endpoint rather than creating contacts yourself. Each submission runs the lead journey set in Inbound: contact, company, Leads board, owner, notice, response target and follow-up task.
Create the form in Inbound
Go to InboundForms, open the Forms tab, click New form and choose Connect an external form, then publish it. Its Connection tab shows the endpoint and the Form ID, and can create the key.
Use a key that can only submit
Give the key only Inbound, Submit forms (inbound:submit). It cannot read, change or delete anything, so a leaked key costs at most spam, which the spam hold catches.
Post each submission
curl -X POST "https://api.lumenbase.io/functions/v1/v1-public-inbound-submissions" \
-H "Authorization: Bearer $LUMENBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"form_id": "website-contact",
"external_id": "wpforms-48213",
"email": "anna.larsen@northwind.example",
"name": "Anna Larsen",
"company": "Northwind Advisory",
"message": "We need a CRM for 20 sellers."
}'form_id is the Form ID or the form's long id. Both work. Email is required. Common names such as your-email, full_name or organization are read on their own, and any other key is kept as an answer. Send external_id with your own submission id, so a retry is answered 200 duplicate instead of being stored twice.
| You get | What it means |
|---|---|
202 accepted | Stored, and the lead journey ran. |
202 held | Stored, but held as likely spam or a test. No CRM data is created until someone chooses Not spam in Inbound -> Forms -> Entries -> Spam and tests. |
200 duplicate | That external_id was already received, or, without one, the same answers came again within 10 minutes. Nothing new was stored. |
409 FORM_NOT_PUBLISHED | Publish the form first. |
403 EXTERNAL_FORMS_DISABLED | External forms are off in InboundSetupLead capture. |
The answer names the submission and nothing else. Every entry, and what the journey did with it, is on the Entries tab of Inbound Forms. The full walkthrough is in Inbound.
Send job applications
When candidates apply on your own careers site, send each application here instead of by email. It is the same path the hosted career page uses: the applicant becomes or matches a contact, the CV is checked, and the workspace confirmation email goes out when it is turned on.
Use a key with only jobs:apply
That scope sends applications and nothing else, so a key on your web server cannot read or change anything in the CRM. The API has no CORS, which means it cannot be called from a browser: send the request from your own server.
Post the application
curl -X POST "https://api.lumenbase.io/functions/v1/v1-public-job-applications" \
-H "Authorization: Bearer $LUMENBASE_API_KEY" \
-F "post=truck-driver-northwind" \
-F "first_name=Anna" -F "last_name=Larsen" \
-F "email=anna.larsen@example.se" -F "consent=true" \
-F "consent_text=I agree to the agency storing my application." \
-F "cv=@cv.pdf;type=application/pdf"post is the job's address on your career page, not its title. The CV must be a PDF, DOC or DOCX file of at most 5 MB, and the request needs a Content-Length. One address can apply once per job, so a retry after a lost answer is answered 409 instead of creating a second application.
| You get | What it means |
|---|---|
201 created | Stored, with the application id in the answer. |
400 VALIDATION_ERROR | A field is missing or invalid, or the CV is empty or not a PDF, DOC or DOCX. details.fields names the field. |
413 PAYLOAD_TOO_LARGE | The body or the CV is larger than allowed. |
404 NOT_FOUND | No published job has that post, or it is closed. |
409 CONFLICT | This address already applied for this job. |
429 RATE_LIMIT_EXCEEDED | The workspace allowance or the five-an-hour limit for one address is used up. Retry-After says how long to wait. |
503 SERVICE_UNAVAILABLE | The CV could not be stored, so nothing was saved. Send it again. |
Endpoints and scopes
| Resource | Endpoint | Scopes |
|---|---|---|
| Contacts | /v1-public-contacts-crud | contacts:read, contacts:write |
| Contacts, create or update | /v1-public-contacts | contacts:write |
| Contacts, up to 100 at once | /v1-public-contacts-batch | contacts:write |
| Companies | /v1-public-companies | companies:read, companies:write |
| Deals | /v1-public-deals | deals:read, deals:write |
| Tasks | /v1-public-tasks | tasks:read, tasks:write |
| Invoices | /v1-public-invoices | invoices:read, invoices:write |
| Activities | /v1-public-activities-crud | activities:read, activities:write |
| Activities, create | /v1-public-activities | activities:write |
| Inbound form submissions | /v1-public-inbound-submissions | inbound:submit |
| Job applications | /v1-public-job-applications | jobs:apply |
Read one record with ?id=, and update or delete it with PATCH or DELETE on the same URL. Activities can be read and deleted, not edited. Read everything covers every read scope. Full access covers everything, so give it only to code you fully trust. Older keys may carry Contact Ingest or Activity Ingest under Legacy: each grants read and write, so swap it for the Write scope when the key only sends data in. Request and response fields are in the API reference.
Limits
| Limit | Value |
|---|---|
| Requests per resource | 100 a minute, per workspace |
| Contacts per day | 10,000 records. A batch of 100 spends 100, and reading spends none |
| Activities per day | 50,000 records, counted the same way |
| Requests per month | 2,000,000 per workspace, across the API and inbound capture. Website tracking has its own limits and does not spend it |
| Page size | Up to 100 records (default 25) |
| Job applications from one address | Five an hour, shared with the hosted career page |
| Idempotency keys | Kept 24 hours |
Inbound form submissions are their own bucket with the same limits, 100 a minute and 10,000 a day, so a form surge does not spend the contacts allowance. Each answer carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset, plus X-DailyLimit-Remaining on contacts, activities and inbound submissions and X-MonthlyLimit-* on every metered call. Slow down before Remaining reaches 0.
Get told when records change
To hear about changes instead of polling, add a webhook under SettingsWorkspaceIntegrationsWebhooks. Lumenbase then posts an event to your HTTPS endpoint when a contact, company, deal, task or invoice is created or updated, when a contact or activity is deleted, and when an activity is logged. Changes reach it whether they came from the app, the API, an agent or a sync. Zapier works the same way: see Zapier setup.
A Bemanning workspace can also pick job posts (job.published, job.updated, job.closed) and applications (application.received, application.stage_changed). The record in data.record holds the job's id, slug, title, status, location and dates, or the application's id, stage, applicant name, contact id and job. The details are in Jobs API and webhooks.
event_type instead of event, timestamp instead of occurred_at, and the job or application fields from data.record. The delivery header is now X-Lumenbase-Delivery-Id.Each delivery carries X-Lumenbase-Event, X-Lumenbase-Delivery-Id (use it to skip repeats) and X-Lumenbase-Signature: sha256= followed by the HMAC-SHA256 of the raw body, keyed with your webhook secret.
{
"id": "6f1c0d2e-3b4a-4c5d-8e9f-0a1b2c3d4e5f",
"event_type": "application.received",
"entity_type": "application",
"entity_id": "9a8b7c6d-5e4f-4a3b-9c2d-1e0f9a8b7c6d",
"sequence": 1,
"timestamp": "2026-11-03T09:14:02.511Z",
"data": {
"record": {
"id": "9a8b7c6d-5e4f-4a3b-9c2d-1e0f9a8b7c6d",
"stage": "applied",
"name": "Sara Ek",
"candidate_id": "4e5f6a7b-8c9d-4e0f-a1b2-c3d4e5f6a7b8",
"contact_id": null,
"job_slug": "lagerarbetare-goteborg",
"job_title": "Lagerarbetare"
},
"changed_fields": [],
"previous": {},
"source": "database"
}
}import crypto from 'node:crypto';
// rawBody: the request body exactly as received, before JSON parsing.
export function isFromLumenbase(rawBody, signatureHeader, secret) {
const expected = 'sha256=' + crypto.createHmac('sha256', secret).update(rawBody).digest('hex');
const a = Buffer.from(expected);
const b = Buffer.from(signatureHeader ?? '');
return a.length === b.length && crypto.timingSafeEqual(a, b);
}Troubleshooting
| You get | What it means | Fix |
|---|---|---|
401 Missing Authorization header | No key was sent. | Add Authorization: Bearer lmb_.... |
401 Invalid Authorization header format | The word Bearer is missing. | Send "Bearer", a space, then the key. |
401 Invalid API key | The key is mistyped, cut off, or revoked. | Paste the full key again. If you lost it, create a new one. |
403 API key does not have 'deals:read' scope | The key lacks that scope. | Edit the key and tick the scope named in error.details.required_scope. |
429 RATE_LIMIT_EXCEEDED | Over 100 requests a minute on one resource, over a daily record cap, or over the monthly ceiling. error.details.window names which. | Wait the seconds in the Retry-After header, then retry. A refused request spends nothing, so the retry is free. |
503 SERVICE_UNAVAILABLE | A database step did not answer in time. | Retry reads. Retry an ingest with the same X-Idempotency-Key. |
meta.request_id, also sent as the X-Request-Id header. Log it and quote it when you contact support.Quick reference
- Create and revoke keys
- SettingsWorkspaceAPI
- Auth header
Authorization: Bearer lmb_...- Base URL
https://api.lumenbase.io/functions/v1- Full reference
- lumenbase.io/api
Was this article helpful?
