Skip to the content

Concepts

Errors and limits

Every error says what happened, in plain words, with a code your code can act on.

The shape of an error

Errors are application/problem+json (RFC 9457). Act on code; show detail and hint to people. Some carry an app_url to finish in SignalVan.

{
  "type": "https://api.signalvan.com/problems/not_entitled",
  "title": "Not enough credits",
  "status": 402,
  "detail": "This needs 600 credits and your account has 120 available. Add credits in SignalVan to continue.",
  "code": "not_entitled",
  "hint": "Lower max_credits, or top up in the app.",
  "app_url": "https://www.signalvan.com/settings/billing",
  "needed": 600,
  "available": 120,
  "next_step": "add_credits"
}

Every code

StatusCodeWhenWhat to do
400invalidA field is not validFix the field named in detail
401unauthorizedNo key, or a revoked or expired oneCheck the key; make a new one
402not_entitledNot enough creditsLower max_credits or top up
403scope_missingThe key lacks a permissionMake a key with it
404not_foundUnknown, or not yoursCheck the id and the website
409plan_expiredThe plan is over 15 minutes oldPlan again
409busyTwo lead searches already runningWait for one, then start
409idempotency_conflictSame Idempotency-Key, another bodyUse a new key
422needs_inputThe plan needs a settingPlan again with it
429rate_limitedToo many requestsWait Retry-After seconds
503unavailableA short outageRetry with backoff

Rate limits

300a minuteReads, per key
60a minutePlans and starts, per key
2at onceLead searches running per website

Every answer carries the IETF RateLimit headers, so your code can slow down before it is refused. Over the limit, the answer is 429 with Retry-After.

RateLimit-Policy: "default";q=300;w=60
RateLimit: "default";r=287;t=41

HTTP/1.1 429 Too Many Requests
Retry-After: 12

Retrying safely

Send an Idempotency-Key with every plan and start: the same request with the same key returns the first answer for 24 hours, so a network blip never starts a lead search twice.