Skip to main content
The REST API gives scripts and server-side agents the same tools an AI app gets over MCP. Every endpoint is listed below this page, generated from the live server.

API keys

Create a key under Settings > MCP / API > API keys > Create key. Give it a name, pick its access and set an expiry if you want one. The key starts with lb_ and is shown once, right after you create it. LeadBeast stores only a hash. Send it as a bearer token:
A key belongs to one project and acts as the user who created it. Revoke it from the same page. It stops working immediately.

Scopes

A key gets only the access you give it. Full access grants every scope, Read only grants the four read scopes, and Custom lets you pick. Each endpoint in the reference names its scope. A call outside the key’s scopes returns 403 with reason_code: insufficient_scope.

Requests

  • GET endpoints take their arguments as query parameters.
  • POST, PATCH and DELETE take a JSON body with Content-Type: application/json. The body is capped at 64 KB.
  • Path parameters are ids from a list endpoint: a campaign id from GET /campaigns, a lead id from GET /leads.
  • Send X-Request-Id to have your own id echoed back. Otherwise the server generates one.

Idempotency

Write endpoints accept an Idempotency-Key header of 8 to 128 characters of your choosing. Repeating a call with the same key replays the first result instead of acting again, so a retry after a timeout never sends twice.
A replayed response carries "replayed": true in meta.

Responses

Every response is one of two shapes.
data.status says what happened to the work. completed means done. queued means the work went to the sending queue, so read the conversation or campaign again to see delivery. The other values, the reason_code list and the HTTP codes are on Errors and limits.

Pagination

List endpoints take limit (1 to 100, default 20) and page (default 1). They return items, total and next_page. next_page is null on the last page.

Activity

Settings > MCP / API > Activity lists every call with the endpoint, the key that made it, and its status.