LeadArc Docsv1

Markdown for agents

This page as plain markdown, ready to paste into an LLM.

.md

Errors

One error shape at every status, and the full code list from the server's own catalog.

One shape, every time

json
{
  "error": {
    "code": "insufficient_scope",
    "message": "This endpoint needs the leads:write scope.",
    "required_scope": "leads:write"
  }
}

Branch on code. message is for humans reading logs and can change. Optional fields:

FieldWhen it appears
paramA validation failure. Names the parameter or body field at fault.
required_scopeOn insufficient_scope. Names the scope needed.
retry_afterOn a 429. Seconds to wait, same as the retry-after header.

Every field the error body can carry: code, message, param, required_scope, retry_after.

Errors any endpoint can return

These happen before the handler runs, so any call can return them.

missing_authorization malformed_key invalid_key key_revoked key_expired owner_deactivated test_keys_unsupported insufficient_scope rate_limited too_many_concurrent internal_error

All codes

21 codes, grouped by status.

400

CodeMeaning
invalid_requestA parameter or body field is missing, the wrong type, or out of range. param names it.
invalid_cursorThis endpoint did not issue that cursor. Start again without it.
invalid_idThe id failed its signature check, or is the wrong kind for this slot.
unsupported_filterA query parameter this endpoint does not accept, or a value outside its list. The message says what is allowed.
unsupported_sortOnly order=asc|desc exists.

401

CodeMeaning
missing_authorizationNo Authorization header.
malformed_keyThe header is there but is not a Bearer key of the right shape.
invalid_keyNo such key, or the secret is wrong. The same error for both, on purpose.
key_revokedThe key was revoked. Make a new one.
key_expiredThe key is past its expiry date.
owner_deactivatedThe person who owns this key was deactivated.

403

CodeMeaning
insufficient_scopeThe key lacks the scope this endpoint needs. required_scope names it.
workspace_forbiddenUnknown workspace, or one this key cannot reach. The same error for both.
test_keys_unsupportedA lak_test_ key was used. Test keys are rejected in v1.

404

CodeMeaning
not_foundNo such object, or it belongs to another workspace. The same error for both, so an id cannot be used to probe.

409

CodeMeaning
conflictThe write would break a uniqueness rule.

422

CodeMeaning
unprocessableValid JSON, but it breaks a rule. For example a member who cannot be assigned here.

429

CodeMeaning
rate_limitedThis minute's limit is used up. retry_after gives the seconds to wait.
too_many_concurrentToo many requests in flight on this key. Use fewer workers.

500

CodeMeaning
internal_errorOur bug. The message carries no detail; the real error is in our logs.

502

CodeMeaning
upstream_errorEmailBison, Google or Microsoft failed on a call we made for you.

How to handle them

Base URL https://api.leadarc.io/v1. Generated from the API source.