LeadBind Docs

API

The three ways your code talks to LeadBind: the REST API, the MCP server, and the lead webhook.

LeadBind has three HTTP surfaces, shaped differently on purpose.

Surface Direction Shape
REST API Data out, actions, and instant event subscriptions Plain JSON over GET, POST, PATCH, DELETE at /api/v1
Lead webhook Data in Plain POST, JSON or form-encoded
/api/mcp Data out, and actions JSON-RPC 2.0 (Model Context Protocol)

Pushing leads in is deliberately dumb, because a hundred form builders and lead vendors need to hit it and none of them are going to implement a protocol. The REST API is what Zapier, Make, n8n and your own code use. MCP is what an AI assistant uses. The REST API and MCP take the same keys and run the same rules, because the REST API runs every action through the same handlers.

Calling the MCP endpoint directly

You do not need an assistant or the CLI. It is one POST with a bearer token.

Endpoint: https://leadbind.org/api/mcp Auth: Authorization: Bearer lb_live_.... Create one under Menu, then Lead sources, then AI access (leadbind.org/agent/ai-access). See Keys and permissions.

List what you can call

curl -X POST https://leadbind.org/api/mcp \
  -H "Authorization: Bearer $LEADBIND_KEY" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'

Call one

curl -X POST https://leadbind.org/api/mcp \
  -H "Authorization: Bearer $LEADBIND_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc":"2.0","id":2,
    "method":"tools/call",
    "params":{"name":"get_next_actions","arguments":{}}
  }'

The tool's own JSON comes back as a string inside result.content[0].text, so parse that field:

{
  "jsonrpc": "2.0",
  "id": 2,
  "result": {
    "content": [
      { "type": "text", "text": "{\n  \"summary\": \"3 lead(s) contacted but untouched...\",\n  \"stale_leads\": [ ... ]\n}" }
    ]
  }
}

Every tool, its inputs, and what it returns: Tools reference.

The two tools that are the whole point

Reading data is table stakes. These two let your own code drive the phone and get you paid.

Place a real call from your own number (needs a key with the dial scope):

curl -X POST https://leadbind.org/api/mcp \
  -H "Authorization: Bearer $LEADBIND_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc":"2.0","id":3,
    "method":"tools/call",
    "params":{"name":"place_call","arguments":{
      "phone":"8325550134","name":"Maria Lopez",
      "idempotency_key":"call-maria-2026-08-31"
    }}
  }'

Make a card payment link for a customer (needs write). The call returns the link and does not text it, so you send the link yourself. The money goes to your own connected payout account:

curl -X POST https://leadbind.org/api/mcp \
  -H "Authorization: Bearer $LEADBIND_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc":"2.0","id":4,
    "method":"tools/call",
    "params":{"name":"request_payment","arguments":{
      "amountCents":25000,"description":"Roof deposit",
      "idempotency_key":"deposit-maria-2026-08-31"
    }}
  }'

Every write takes idempotency_key. The caller is usually an AI, and an AI retries on a timeout; the same key returns the original result instead of placing a second call or creating a second charge. Pass dry_run: true on any write to see what it would do and change nothing.

Errors

Two kinds, and they look different on purpose.

A protocol error is a JSON-RPC error object. Nothing ran.

Code HTTP Means
-32001 401 No key was sent, or the key is not valid (revoked, expired, or copied incompletely). The message links to where a new key is made.
-32003 403 Your key lacks the scope that tool needs
-32029 429 Rate limit for that scope. Wait the Retry-After seconds.
-32602 200 Unknown tool name, a missing required argument, or an argument of the wrong type, such as dry_run sent as the string "true"

A tool error is a normal result with "isError": true and { "error": "..." } in content[0].text. The tool ran and could not do what you asked; the sentence says what to change. A read that could not reach the data says so here and never comes back as an empty list.

-32003 is not a bug. Read, write, and calling are separate grants, and keys cannot be upgraded after creation. Create a new key with the scope you need.

Rules that will not change

Every call is scoped to the account that owns the key. The one exception is an organization key, held by an owner or manager of an organization, which can also act on the other seats in that organization. Call list_accounts to see them and pass the account_id you want. See Keys and permissions.

Call recordings and transcripts are never returned. Not by any tool, at any scope. Responses are filtered on the way out, not merely omitted from the tool list. See What we send.

A key cannot mint another key. That needs your login, so a leaked key cannot escalate into permanent access.

Which surface do you want?

  • Getting leads in from a form or vendor → Lead webhook
  • Asking questions in plain language → connect an assistant
  • Scripting or a terminal → the CLI, which is a wrapper over exactly the calls above
  • Zapier, Make, n8n, or your own code → the REST API
  • Placing calls or taking payments from code → the MCP curl examples here

Docs your code can read

Every page is available as raw markdown: add .md to any URL. The full index is at docs.leadbind.org/llms.txt.

That exists so an assistant holding your key can also read the documentation and answer its own questions, rather than guessing at a tool signature.

Was this page helpful?