{"openapi":"3.1.0","info":{"title":"Relay API","version":"0.1.0","description":"Relay runs LinkedIn outreach (connection requests, messages, InMails, profile views, follows, likes, endorsements)\nfrom your senders' own accounts, with safety limits per sender, and reports every outcome as events.\n\n**Start with** `GET /v1/workspace` (who am I, which scopes), then the [guide](/docs/guide): quickstart, sequences, guardrails, webhooks.\n\n**Auth:** `Authorization: Bearer rl_live_…` (one key per workspace; scopes read / write / send / approve; optionally pinned to one sender).\n**Retries:** every write accepts `Idempotency-Key`. **Errors:** `{\"error\":{\"code\",\"message\",\"hint\",\"details\"}}`; `hint` says what to do next.\n**MCP:** the same capabilities are exposed as MCP tools at `/mcp` (API key, or OAuth sign-in for AI apps)."},"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","bearerFormat":"rl_live_…","description":"A workspace API key."}},"schemas":{}},"paths":{"/auth/login":{"post":{"summary":"Sign in (web app)","tags":["Auth"],"description":"Starts a browser session (httpOnly cookie). Programs and AIs should use an API key instead.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"password":{"type":"string","minLength":1,"maxLength":500}},"required":["email","password"]}}}},"security":[],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}}},"/auth/logout":{"post":{"summary":"Sign out","tags":["Auth"],"security":[],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}}},"/auth/password":{"post":{"summary":"Change your password (web app)","tags":["Auth"],"description":"Needs the session cookie and the current password. Every other session of this user is signed out; this one stays.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"current":{"type":"string","minLength":1,"maxLength":500},"new":{"type":"string","minLength":12,"maxLength":500,"description":"At least 12 characters."}},"required":["current","new"]}}}},"security":[],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}}},"/auth/me":{"get":{"summary":"The signed-in user and their workspaces","tags":["Auth"],"security":[],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}}},"/v1/workspace":{"get":{"summary":"The workspace this credential belongs to","tags":["Workspace"],"description":"Start here: it tells an API key or AI which workspace it is acting in, and the caller's scopes.\n\nRequires the `read` scope.","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}},"patch":{"summary":"Update workspace settings","tags":["Workspace"],"description":"settings.approval_required = true makes every campaign need POST /approve before /start. settings.default_proxy_country (ISO 3166-1 alpha-2, e.g. \"GB\"; null clears it) is the country a LinkedIn account's connection sits in when a connect link names none.\n\nRequires the `write` scope.\n\nAccepts an `Idempotency-Key` header.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"timezone":{"type":"string"},"settings":{"type":"object","properties":{"approval_required":{"type":"boolean"},"default_proxy_country":{"description":"ISO 3166-1 alpha-2 country used by connect links that name none; null clears it.","anyOf":[{"type":"string","maxLength":8},{"type":"null"}]}},"additionalProperties":{}}}}}}},"parameters":[{"schema":{"type":"string","maxLength":200},"in":"header","name":"idempotency-key","required":false,"description":"Makes the request safe to retry: the same key returns the first response."}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}}},"/v1/workspaces/{id}/limits":{"patch":{"summary":"Set how many LinkedIn accounts a workspace may connect (organisation owners and admins only)","tags":["Workspace"],"description":"max_senders is the number of senders the workspace may hold (every sender that is not removed takes a spot; a reconnect never needs one); null removes the cap. Only an organisation owner or admin signed in to the app can call this: a workspace admin, an API key or a connected AI app is refused. GET /v1/workspace shows sender_limit {max, used}.\n\nRequires the `write` scope.\n\nAccepts an `Idempotency-Key` header.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"max_senders":{"anyOf":[{"type":"integer","minimum":0,"maximum":1000},{"type":"null"}]}},"required":["max_senders"]}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true,"description":"Workspace id or slug, in the caller's organisation."},{"schema":{"type":"string","maxLength":200},"in":"header","name":"idempotency-key","required":false,"description":"Makes the request safe to retry: the same key returns the first response."}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}}},"/v1/api-keys":{"get":{"summary":"List API keys","tags":["Workspace"],"description":"Keys are shown by prefix only.\n\nRequires the `read` scope.","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}},"post":{"summary":"Create an API key (people only)","tags":["Workspace"],"description":"Only from a signed-in session: a key cannot mint keys. The full key is returned once. Scopes: read (see everything), write (change leads, campaigns, settings, write per-lead drafts), send (start campaigns, approve campaigns, send replies), approve (approve or reject per-lead drafts; never given by default, and a key never approves a draft it wrote). sender_id pins the key to one sender. budgets: the key's daily budgets (defaults drafts_per_day 300, enrollments_per_day 1000, campaign_starts_per_day 5).\n\nRequires the `write` scope.\n\nAccepts an `Idempotency-Key` header.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"scopes":{"minItems":1,"type":"array","items":{"type":"string","enum":["read","write","send","approve"]}},"sender_id":{"type":["string","null"]},"budgets":{"type":"object","properties":{"drafts_per_day":{"type":"integer","minimum":0,"maximum":2000},"enrollments_per_day":{"type":"integer","minimum":0,"maximum":5000},"campaign_starts_per_day":{"type":"integer","minimum":0,"maximum":25}},"additionalProperties":false,"description":"Daily budgets of an API key (UTC day)."}},"required":["name"]}}}},"parameters":[{"schema":{"type":"string","maxLength":200},"in":"header","name":"idempotency-key","required":false,"description":"Makes the request safe to retry: the same key returns the first response."}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}}},"/v1/api-keys/{id}":{"patch":{"summary":"Set an API key's daily budgets (workspace admins, in the app)","tags":["Workspace"],"description":"What the key may do in a UTC day: drafts_per_day (default 300, at most 2000), enrollments_per_day (default 1000, at most 5000), campaign_starts_per_day (default 5, at most 25). Only what is given changes. A key can never change a budget, its own included.\n\nRequires the `write` scope.\n\nAccepts an `Idempotency-Key` header.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"budgets":{"type":"object","properties":{"drafts_per_day":{"type":"integer","minimum":0,"maximum":2000},"enrollments_per_day":{"type":"integer","minimum":0,"maximum":5000},"campaign_starts_per_day":{"type":"integer","minimum":0,"maximum":25},"lead_credits_per_day":{"description":"Lead credits the key may spend in a UTC day (default 500). Only where Find leads is enabled.","type":"integer","minimum":0,"maximum":5000}},"additionalProperties":false}},"required":["budgets"]}}}},"parameters":[{"schema":{"type":"string","minLength":3,"maxLength":80},"in":"path","name":"id","required":true,"description":"API key id"},{"schema":{"type":"string","maxLength":200},"in":"header","name":"idempotency-key","required":false,"description":"Makes the request safe to retry: the same key returns the first response."}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}},"delete":{"summary":"Revoke an API key","tags":["Workspace"],"description":"Requires the `write` scope.\n\nAccepts an `Idempotency-Key` header.","parameters":[{"schema":{"type":"string","minLength":3,"maxLength":80},"in":"path","name":"id","required":true,"description":"API key id"},{"schema":{"type":"string","maxLength":200},"in":"header","name":"idempotency-key","required":false,"description":"Makes the request safe to retry: the same key returns the first response."}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}}},"/v1/members":{"get":{"summary":"List workspace members","tags":["Workspace"],"description":"Includes the organisation's owners and admins (via = organization): they can open every workspace.\n\nRequires the `read` scope.","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}},"post":{"summary":"Add or change a member (admins)","tags":["Workspace"],"description":"Without a password, the answer carries a one-time `invite` link (7 days) to pass on: Relay sends no email.\n\nRequires the `write` scope.\n\nAccepts an `Idempotency-Key` header.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"name":{"type":"string","maxLength":120},"role":{"type":"string","enum":["admin","member","viewer"]},"password":{"type":"string","minLength":10,"maxLength":200}},"required":["email","role"]}}}},"parameters":[{"schema":{"type":"string","maxLength":200},"in":"header","name":"idempotency-key","required":false,"description":"Makes the request safe to retry: the same key returns the first response."}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}}},"/v1/senders":{"get":{"summary":"List senders with health, limits and today's usage","tags":["Senders"],"description":"Each sender carries `today`: what it has done, its caps (warm-up included) and what remains, so you can plan volume before starting a campaign.\n\nRequires the `read` scope.","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":["string","null"]},"status":{"type":"string","enum":["connecting","ok","checkpoint","disconnected","errored","restricted","paused","removed"]},"status_reason":{"type":["string","null"]},"account_type":{"type":"string"},"profile_url":{"type":["string","null"]},"member_id":{"type":["string","null"]},"timezone":{"type":"string"},"hours":{"type":"object","properties":{"days":{"minItems":1,"type":"array","items":{"type":"integer","minimum":1,"maximum":7},"description":"ISO weekdays the sender works: 1 = Monday … 7 = Sunday."},"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"Local start time, HH:MM."},"end":{"type":"string","pattern":"^([01]\\d|2[0-4]):[0-5]\\d$","description":"Local end time, HH:MM (24:00 allowed)."}},"required":["days","start","end"],"additionalProperties":false,"description":"A sender's working hours, in the sender's own time zone."},"limits":{"type":"object","properties":{"invites_per_day":{"type":"integer","minimum":0,"maximum":100,"description":"Connection requests per day after warm-up."},"invites_per_week":{"type":"integer","minimum":0,"maximum":300,"description":"Connection requests per rolling 7 days."},"messages_per_day":{"type":"integer","minimum":0,"maximum":200},"inmails_per_day":{"type":"integer","minimum":0,"maximum":100},"profile_views_per_day":{"type":"integer","minimum":0,"maximum":150},"follows_per_day":{"type":"integer","minimum":0,"maximum":100},"likes_per_day":{"type":"integer","minimum":0,"maximum":100},"endorsements_per_day":{"type":"integer","minimum":0,"maximum":50},"withdrawals_per_day":{"type":"integer","minimum":0,"maximum":100},"connection_checks_per_day":{"type":"integer","minimum":0,"maximum":250},"lookups_per_day":{"type":"integer","minimum":0,"maximum":250,"description":"Profile lookups a day: reading a lead's LinkedIn profile to resolve their id, check the connection or pending invite before an invite, a profile view or an endorsement. Counted separately from profile_views_per_day (a visit the lead is notified of)."},"warmup":{"type":"object","properties":{"enabled":{"type":"boolean"},"start_invites_per_day":{"type":"integer","minimum":0,"maximum":100,"description":"Invites per day on the first day of warm-up."},"step_per_day":{"type":"integer","minimum":0,"maximum":20,"description":"Added each day until invites_per_day is reached."}},"required":["enabled","start_invites_per_day","step_per_day"],"additionalProperties":false},"min_gap_seconds":{"type":"integer","minimum":30,"maximum":7200,"description":"Smallest random gap between two actions of this sender."},"max_gap_seconds":{"type":"integer","minimum":60,"maximum":14400,"description":"Largest random gap between two actions of this sender."}},"required":["invites_per_day","invites_per_week","messages_per_day","inmails_per_day","profile_views_per_day","follows_per_day","likes_per_day","endorsements_per_day","withdrawals_per_day","connection_checks_per_day","lookups_per_day","warmup","min_gap_seconds","max_gap_seconds"],"additionalProperties":false,"description":"Effective limits (defaults + overrides): what the engine enforces."},"limits_override":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Only the values changed from the defaults."},"cooldown_until":{"type":["string","null"]},"warmup_started_at":{"type":["string","null"]},"connected_at":{"type":["string","null"]},"last_action_at":{"type":["string","null"]},"freeze_rules":{"type":"object","properties":{"weekly_invites":{"type":"boolean","description":"When the sender reaches invites_per_week, freeze its invitations until Monday 00:00 in the sender's time zone (other actions continue)."},"actions_per_day":{"type":"integer","minimum":0,"maximum":1000,"description":"Total actions a day across every kind; reaching it freezes the sender until its next local day. 0 turns the rule off."},"pushback_hours":{"minItems":1,"maxItems":3,"type":"array","items":{"type":"integer","minimum":1,"maximum":720},"description":"How long LinkedIn pushback (rate or limit errors) freezes the sender: first, second and third time within 7 days."},"pending_invites_max":{"type":"integer","minimum":0,"maximum":3000,"description":"Pending (unanswered) invitations at which invitations freeze and the oldest are withdrawn first. 0 turns the rule off."},"pending_invites_margin":{"type":"integer","minimum":0,"maximum":500,"description":"Invitations resume once pending invitations are this many below pending_invites_max."}},"required":["weekly_invites","actions_per_day","pushback_hours","pending_invites_max","pending_invites_margin"],"additionalProperties":false,"description":"Effective freezing rules (defaults + overrides)."},"freeze":{"type":"object","properties":{"state":{"type":"string","enum":["none","frozen","partly_frozen"],"description":"none · frozen (everything waits) · partly_frozen (some kinds wait, e.g. invitations)."},"active":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"rule":{"type":"string","enum":["weekly_invites","daily_actions","pushback","pending_invites","disconnected","manual"],"description":"What froze the sender: weekly invite limit · total actions a day · LinkedIn pushback · too many pending invitations · disconnected or verification · by hand."},"kinds":{"type":"array","items":{"type":"string"},"description":"['all'] or the action kinds that wait."},"reason":{"type":"string"},"since":{"type":"string"},"until":{"description":"null: until its condition clears or someone unfreezes it.","type":["string","null"]},"note":{"type":["string","null"]},"created_by":{"type":"string"},"lifted_at":{"type":["string","null"]},"lifted_by":{"type":["string","null"]}},"required":["id","rule","kinds","reason","since","until","note","created_by"],"additionalProperties":false,"description":"A freeze: something holding a sender (or some of its actions) back."},"description":"Freezes in force now."},"history":{"description":"Freezes of the last 60 days, newest first (on GET /v1/senders/{id}).","type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"rule":{"type":"string","enum":["weekly_invites","daily_actions","pushback","pending_invites","disconnected","manual"],"description":"What froze the sender: weekly invite limit · total actions a day · LinkedIn pushback · too many pending invitations · disconnected or verification · by hand."},"kinds":{"type":"array","items":{"type":"string"},"description":"['all'] or the action kinds that wait."},"reason":{"type":"string"},"since":{"type":"string"},"until":{"description":"null: until its condition clears or someone unfreezes it.","type":["string","null"]},"note":{"type":["string","null"]},"created_by":{"type":"string"},"lifted_at":{"type":["string","null"]},"lifted_by":{"type":["string","null"]}},"required":["id","rule","kinds","reason","since","until","note","created_by"],"additionalProperties":false,"description":"A freeze: something holding a sender (or some of its actions) back."}}},"required":["state","active"],"additionalProperties":false},"pending_invites":{"description":"Pending (sent, unanswered) invitations: read from LinkedIn at the account safety check and tracked locally from then on (a sender connected before the check existed is still counted every few hours).","type":["number","null"]},"safety":{"type":"object","properties":{"status":{"type":"string","enum":["ready","too_many_pending","not_checked"],"description":"ready · too_many_pending (200 or more pending invitations: invitations are capped at 10 a day; 500 or more: paused until fewer than 300) · not_checked (the account has not been read yet; a newly connected sender sends no invitations until it is, a sender connected before this check existed works as before)."},"line":{"type":"string","description":"The one status line to show: \"Ready\", \"Too many pending invites (N): withdraw old ones first\" or \"Not checked\"."},"state":{"type":"string","enum":["legacy","unchecked","checked"],"description":"legacy: connected before the account safety check existed, untouched until it is reconnected or checked by hand · unchecked: waiting for its first check · checked."},"checked_at":{"type":["string","null"]},"plan":{"anyOf":[{"type":"string","enum":["free","premium","sales_navigator","recruiter","unknown"]},{"type":"null"}],"description":"The LinkedIn plan at the check. It does not change the limits."},"connections":{"description":"Connections at the check. Fewer than 100, or unknown, starts the sender on lower invitation limits.","type":["number","null"]},"pending_at_check":{"type":["number","null"]},"pending_before_relay":{"description":"Pending invitations at the check that Relay did not send.","type":["number","null"]},"unknown":{"type":"array","items":{"type":"string"},"description":"Facts LinkedIn did not give at the check (plan, connections); each is treated as the most careful case."},"old_invites":{"type":"object","properties":{"older_than_days":{"type":"number"},"count":{"type":"number"}},"required":["older_than_days","count"],"additionalProperties":false,"description":"Invitations from before Relay, pending longer than three weeks, that can be withdrawn (POST /v1/senders/{id}/pending-invites/withdraw)."},"withdrawals":{"type":"object","properties":{"queued":{"type":"number"},"withdrawn":{"type":"number"},"unknown":{"type":"number","description":"Withdrawals with no known outcome; never retried, settled by the next check."},"stopped":{"description":"Why the queue stopped (LinkedIn pushback, a restriction, a disconnect, a freeze, an unknown outcome). A person starts it again.","type":["string","null"]}},"required":["queued","withdrawn","unknown","stopped"],"additionalProperties":false}},"required":["status","line","state","checked_at","plan","connections","pending_at_check","pending_before_relay","unknown","old_invites","withdrawals"],"additionalProperties":false,"description":"The account safety check: one read of the account when it connects, the sender's starting limits, and the withdrawal of old pending invitations."},"proxy_country":{"description":"ISO 3166-1 alpha-2 country chosen for the account's connection on its last connect link; null: automatic.","type":["string","null"]},"proxy_country_applied":{"description":"Whether that country was sent to the provider and accepted (null: no country chosen).","type":["boolean","null"]},"proxy_country_actual":{"description":"The country the account's connection really sits in, read back after the last connect or reconnect; null: not known. It can differ from proxy_country.","type":["string","null"]},"signed_out_at":{"description":"Since when the account is signed out of LinkedIn, restricted or held at a verification (status_reason has LinkedIn's raw answer); null while it works.","type":["string","null"]},"reads":{"description":"Today's reads of this account (the sender's local day).","type":"object","properties":{"background":{"type":"number","description":"Requests Relay made on its own schedule today (inbox, accepted invitations)."},"background_cap":{"type":"number"},"lookups":{"type":"number","description":"Profile lookups today."},"lookups_cap":{"type":"number"},"calls":{"type":"number","description":"Every request made for this account today."}},"required":["background","background_cap","lookups","lookups_cap","calls"],"additionalProperties":false},"today":{"type":"object","properties":{"day":{"type":"string","description":"The sender's local date."},"used":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}},"caps":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"},"description":"Today's caps (invite cap includes warm-up)."},"remaining":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}},"invites_this_week":{"type":"number"},"invites_week_cap":{"type":"number"},"activity":{"type":"array","items":{"type":"object","properties":{"at":{"type":"string"},"kind":{"type":"string","description":"An action kind (invite, message, inmail, view_profile, follow, like_post, endorse, withdraw_invite, check_connection) accepted (an invite was accepted) or reply."}},"required":["at","kind"],"additionalProperties":false},"description":"What the sender did today (sent actions) and what came back (accepted invites, replies), oldest first, in the sender's local day. Draws the day line."}},"required":["day","used","caps","remaining","invites_this_week","invites_week_cap","activity"],"additionalProperties":false}},"required":["id","name","status","status_reason","account_type","profile_url","member_id","timezone","hours","limits","limits_override","cooldown_until","warmup_started_at","connected_at","last_action_at","freeze_rules","freeze","pending_invites","safety","proxy_country","proxy_country_applied","today"],"additionalProperties":{},"description":"A LinkedIn account the workspace sends from."}}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}}},"/v1/senders/{id}":{"get":{"summary":"Get a sender","tags":["Senders"],"description":"Requires the `read` scope.","parameters":[{"schema":{"type":"string","minLength":3,"maxLength":80},"in":"path","name":"id","required":true,"description":"Sender id"}],"responses":{"200":{"description":"A LinkedIn account the workspace sends from.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":["string","null"]},"status":{"type":"string","enum":["connecting","ok","checkpoint","disconnected","errored","restricted","paused","removed"]},"status_reason":{"type":["string","null"]},"account_type":{"type":"string"},"profile_url":{"type":["string","null"]},"member_id":{"type":["string","null"]},"timezone":{"type":"string"},"hours":{"type":"object","properties":{"days":{"minItems":1,"type":"array","items":{"type":"integer","minimum":1,"maximum":7},"description":"ISO weekdays the sender works: 1 = Monday … 7 = Sunday."},"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"Local start time, HH:MM."},"end":{"type":"string","pattern":"^([01]\\d|2[0-4]):[0-5]\\d$","description":"Local end time, HH:MM (24:00 allowed)."}},"required":["days","start","end"],"additionalProperties":false,"description":"A sender's working hours, in the sender's own time zone."},"limits":{"type":"object","properties":{"invites_per_day":{"type":"integer","minimum":0,"maximum":100,"description":"Connection requests per day after warm-up."},"invites_per_week":{"type":"integer","minimum":0,"maximum":300,"description":"Connection requests per rolling 7 days."},"messages_per_day":{"type":"integer","minimum":0,"maximum":200},"inmails_per_day":{"type":"integer","minimum":0,"maximum":100},"profile_views_per_day":{"type":"integer","minimum":0,"maximum":150},"follows_per_day":{"type":"integer","minimum":0,"maximum":100},"likes_per_day":{"type":"integer","minimum":0,"maximum":100},"endorsements_per_day":{"type":"integer","minimum":0,"maximum":50},"withdrawals_per_day":{"type":"integer","minimum":0,"maximum":100},"connection_checks_per_day":{"type":"integer","minimum":0,"maximum":250},"lookups_per_day":{"type":"integer","minimum":0,"maximum":250,"description":"Profile lookups a day: reading a lead's LinkedIn profile to resolve their id, check the connection or pending invite before an invite, a profile view or an endorsement. Counted separately from profile_views_per_day (a visit the lead is notified of)."},"warmup":{"type":"object","properties":{"enabled":{"type":"boolean"},"start_invites_per_day":{"type":"integer","minimum":0,"maximum":100,"description":"Invites per day on the first day of warm-up."},"step_per_day":{"type":"integer","minimum":0,"maximum":20,"description":"Added each day until invites_per_day is reached."}},"required":["enabled","start_invites_per_day","step_per_day"],"additionalProperties":false},"min_gap_seconds":{"type":"integer","minimum":30,"maximum":7200,"description":"Smallest random gap between two actions of this sender."},"max_gap_seconds":{"type":"integer","minimum":60,"maximum":14400,"description":"Largest random gap between two actions of this sender."}},"required":["invites_per_day","invites_per_week","messages_per_day","inmails_per_day","profile_views_per_day","follows_per_day","likes_per_day","endorsements_per_day","withdrawals_per_day","connection_checks_per_day","lookups_per_day","warmup","min_gap_seconds","max_gap_seconds"],"additionalProperties":false,"description":"Effective limits (defaults + overrides): what the engine enforces."},"limits_override":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Only the values changed from the defaults."},"cooldown_until":{"type":["string","null"]},"warmup_started_at":{"type":["string","null"]},"connected_at":{"type":["string","null"]},"last_action_at":{"type":["string","null"]},"freeze_rules":{"type":"object","properties":{"weekly_invites":{"type":"boolean","description":"When the sender reaches invites_per_week, freeze its invitations until Monday 00:00 in the sender's time zone (other actions continue)."},"actions_per_day":{"type":"integer","minimum":0,"maximum":1000,"description":"Total actions a day across every kind; reaching it freezes the sender until its next local day. 0 turns the rule off."},"pushback_hours":{"minItems":1,"maxItems":3,"type":"array","items":{"type":"integer","minimum":1,"maximum":720},"description":"How long LinkedIn pushback (rate or limit errors) freezes the sender: first, second and third time within 7 days."},"pending_invites_max":{"type":"integer","minimum":0,"maximum":3000,"description":"Pending (unanswered) invitations at which invitations freeze and the oldest are withdrawn first. 0 turns the rule off."},"pending_invites_margin":{"type":"integer","minimum":0,"maximum":500,"description":"Invitations resume once pending invitations are this many below pending_invites_max."}},"required":["weekly_invites","actions_per_day","pushback_hours","pending_invites_max","pending_invites_margin"],"additionalProperties":false,"description":"Effective freezing rules (defaults + overrides)."},"freeze":{"type":"object","properties":{"state":{"type":"string","enum":["none","frozen","partly_frozen"],"description":"none · frozen (everything waits) · partly_frozen (some kinds wait, e.g. invitations)."},"active":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"rule":{"type":"string","enum":["weekly_invites","daily_actions","pushback","pending_invites","disconnected","manual"],"description":"What froze the sender: weekly invite limit · total actions a day · LinkedIn pushback · too many pending invitations · disconnected or verification · by hand."},"kinds":{"type":"array","items":{"type":"string"},"description":"['all'] or the action kinds that wait."},"reason":{"type":"string"},"since":{"type":"string"},"until":{"description":"null: until its condition clears or someone unfreezes it.","type":["string","null"]},"note":{"type":["string","null"]},"created_by":{"type":"string"},"lifted_at":{"type":["string","null"]},"lifted_by":{"type":["string","null"]}},"required":["id","rule","kinds","reason","since","until","note","created_by"],"additionalProperties":false,"description":"A freeze: something holding a sender (or some of its actions) back."},"description":"Freezes in force now."},"history":{"description":"Freezes of the last 60 days, newest first (on GET /v1/senders/{id}).","type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"rule":{"type":"string","enum":["weekly_invites","daily_actions","pushback","pending_invites","disconnected","manual"],"description":"What froze the sender: weekly invite limit · total actions a day · LinkedIn pushback · too many pending invitations · disconnected or verification · by hand."},"kinds":{"type":"array","items":{"type":"string"},"description":"['all'] or the action kinds that wait."},"reason":{"type":"string"},"since":{"type":"string"},"until":{"description":"null: until its condition clears or someone unfreezes it.","type":["string","null"]},"note":{"type":["string","null"]},"created_by":{"type":"string"},"lifted_at":{"type":["string","null"]},"lifted_by":{"type":["string","null"]}},"required":["id","rule","kinds","reason","since","until","note","created_by"],"additionalProperties":false,"description":"A freeze: something holding a sender (or some of its actions) back."}}},"required":["state","active"],"additionalProperties":false},"pending_invites":{"description":"Pending (sent, unanswered) invitations: read from LinkedIn at the account safety check and tracked locally from then on (a sender connected before the check existed is still counted every few hours).","type":["number","null"]},"safety":{"type":"object","properties":{"status":{"type":"string","enum":["ready","too_many_pending","not_checked"],"description":"ready · too_many_pending (200 or more pending invitations: invitations are capped at 10 a day; 500 or more: paused until fewer than 300) · not_checked (the account has not been read yet; a newly connected sender sends no invitations until it is, a sender connected before this check existed works as before)."},"line":{"type":"string","description":"The one status line to show: \"Ready\", \"Too many pending invites (N): withdraw old ones first\" or \"Not checked\"."},"state":{"type":"string","enum":["legacy","unchecked","checked"],"description":"legacy: connected before the account safety check existed, untouched until it is reconnected or checked by hand · unchecked: waiting for its first check · checked."},"checked_at":{"type":["string","null"]},"plan":{"anyOf":[{"type":"string","enum":["free","premium","sales_navigator","recruiter","unknown"]},{"type":"null"}],"description":"The LinkedIn plan at the check. It does not change the limits."},"connections":{"description":"Connections at the check. Fewer than 100, or unknown, starts the sender on lower invitation limits.","type":["number","null"]},"pending_at_check":{"type":["number","null"]},"pending_before_relay":{"description":"Pending invitations at the check that Relay did not send.","type":["number","null"]},"unknown":{"type":"array","items":{"type":"string"},"description":"Facts LinkedIn did not give at the check (plan, connections); each is treated as the most careful case."},"old_invites":{"type":"object","properties":{"older_than_days":{"type":"number"},"count":{"type":"number"}},"required":["older_than_days","count"],"additionalProperties":false,"description":"Invitations from before Relay, pending longer than three weeks, that can be withdrawn (POST /v1/senders/{id}/pending-invites/withdraw)."},"withdrawals":{"type":"object","properties":{"queued":{"type":"number"},"withdrawn":{"type":"number"},"unknown":{"type":"number","description":"Withdrawals with no known outcome; never retried, settled by the next check."},"stopped":{"description":"Why the queue stopped (LinkedIn pushback, a restriction, a disconnect, a freeze, an unknown outcome). A person starts it again.","type":["string","null"]}},"required":["queued","withdrawn","unknown","stopped"],"additionalProperties":false}},"required":["status","line","state","checked_at","plan","connections","pending_at_check","pending_before_relay","unknown","old_invites","withdrawals"],"additionalProperties":false,"description":"The account safety check: one read of the account when it connects, the sender's starting limits, and the withdrawal of old pending invitations."},"proxy_country":{"description":"ISO 3166-1 alpha-2 country chosen for the account's connection on its last connect link; null: automatic.","type":["string","null"]},"proxy_country_applied":{"description":"Whether that country was sent to the provider and accepted (null: no country chosen).","type":["boolean","null"]},"proxy_country_actual":{"description":"The country the account's connection really sits in, read back after the last connect or reconnect; null: not known. It can differ from proxy_country.","type":["string","null"]},"signed_out_at":{"description":"Since when the account is signed out of LinkedIn, restricted or held at a verification (status_reason has LinkedIn's raw answer); null while it works.","type":["string","null"]},"reads":{"description":"Today's reads of this account (the sender's local day).","type":"object","properties":{"background":{"type":"number","description":"Requests Relay made on its own schedule today (inbox, accepted invitations)."},"background_cap":{"type":"number"},"lookups":{"type":"number","description":"Profile lookups today."},"lookups_cap":{"type":"number"},"calls":{"type":"number","description":"Every request made for this account today."}},"required":["background","background_cap","lookups","lookups_cap","calls"],"additionalProperties":false},"today":{"type":"object","properties":{"day":{"type":"string","description":"The sender's local date."},"used":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}},"caps":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"},"description":"Today's caps (invite cap includes warm-up)."},"remaining":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}},"invites_this_week":{"type":"number"},"invites_week_cap":{"type":"number"},"activity":{"type":"array","items":{"type":"object","properties":{"at":{"type":"string"},"kind":{"type":"string","description":"An action kind (invite, message, inmail, view_profile, follow, like_post, endorse, withdraw_invite, check_connection) accepted (an invite was accepted) or reply."}},"required":["at","kind"],"additionalProperties":false},"description":"What the sender did today (sent actions) and what came back (accepted invites, replies), oldest first, in the sender's local day. Draws the day line."}},"required":["day","used","caps","remaining","invites_this_week","invites_week_cap","activity"],"additionalProperties":false}},"required":["id","name","status","status_reason","account_type","profile_url","member_id","timezone","hours","limits","limits_override","cooldown_until","warmup_started_at","connected_at","last_action_at","freeze_rules","freeze","pending_invites","safety","proxy_country","proxy_country_applied","today"],"additionalProperties":{},"description":"A LinkedIn account the workspace sends from."}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}},"patch":{"summary":"Set a sender's limits, working hours or time zone","tags":["Senders"],"description":"An API key can only make a sender more careful (lower caps, longer gaps, narrower hours, stricter freezing rules); raising a limit, loosening a freezing rule or widening the hours with a key is 403 and done by a person in the app. Limits merge: send only what changes. Example: {\"limits\":{\"invites_per_day\":20,\"invites_per_week\":80},\"hours\":{\"days\":[1,2,3,4,5],\"start\":\"08:30\",\"end\":\"17:30\"},\"timezone\":\"Europe/Paris\"}.\n\nRequires the `write` scope.\n\nAccepts an `Idempotency-Key` header.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"timezone":{"description":"IANA time zone, e.g. Europe/London. Working hours are in this zone.","type":"string"},"hours":{"type":"object","properties":{"days":{"minItems":1,"type":"array","items":{"type":"integer","minimum":1,"maximum":7},"description":"ISO weekdays the sender works: 1 = Monday … 7 = Sunday."},"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"Local start time, HH:MM."},"end":{"type":"string","pattern":"^([01]\\d|2[0-4]):[0-5]\\d$","description":"Local end time, HH:MM (24:00 allowed)."}},"required":["days","start","end"],"description":"A sender's working hours, in the sender's own time zone."},"limits":{"type":"object","properties":{"invites_per_day":{"type":"integer","minimum":0,"maximum":100,"description":"Connection requests per day after warm-up."},"invites_per_week":{"type":"integer","minimum":0,"maximum":300,"description":"Connection requests per rolling 7 days."},"messages_per_day":{"type":"integer","minimum":0,"maximum":200},"inmails_per_day":{"type":"integer","minimum":0,"maximum":100},"profile_views_per_day":{"type":"integer","minimum":0,"maximum":150},"follows_per_day":{"type":"integer","minimum":0,"maximum":100},"likes_per_day":{"type":"integer","minimum":0,"maximum":100},"endorsements_per_day":{"type":"integer","minimum":0,"maximum":50},"withdrawals_per_day":{"type":"integer","minimum":0,"maximum":100},"connection_checks_per_day":{"type":"integer","minimum":0,"maximum":250},"lookups_per_day":{"type":"integer","minimum":0,"maximum":250,"description":"Profile lookups a day: reading a lead's LinkedIn profile to resolve their id, check the connection or pending invite before an invite, a profile view or an endorsement. Counted separately from profile_views_per_day (a visit the lead is notified of)."},"warmup":{"type":"object","properties":{"enabled":{"type":"boolean"},"start_invites_per_day":{"type":"integer","minimum":0,"maximum":100,"description":"Invites per day on the first day of warm-up."},"step_per_day":{"type":"integer","minimum":0,"maximum":20,"description":"Added each day until invites_per_day is reached."}}},"min_gap_seconds":{"type":"integer","minimum":30,"maximum":7200,"description":"Smallest random gap between two actions of this sender."},"max_gap_seconds":{"type":"integer","minimum":60,"maximum":14400,"description":"Largest random gap between two actions of this sender."}},"description":"Only the limits to change; everything else keeps its current value."},"freeze_rules":{"description":"Only the freezing rules to change, e.g. {\"actions_per_day\":150,\"pending_invites_max\":400}.","type":"object","properties":{"weekly_invites":{"type":"boolean","description":"When the sender reaches invites_per_week, freeze its invitations until Monday 00:00 in the sender's time zone (other actions continue)."},"actions_per_day":{"type":"integer","minimum":0,"maximum":1000,"description":"Total actions a day across every kind; reaching it freezes the sender until its next local day. 0 turns the rule off."},"pushback_hours":{"minItems":1,"maxItems":3,"type":"array","items":{"type":"integer","minimum":1,"maximum":720},"description":"How long LinkedIn pushback (rate or limit errors) freezes the sender: first, second and third time within 7 days."},"pending_invites_max":{"type":"integer","minimum":0,"maximum":3000,"description":"Pending (unanswered) invitations at which invitations freeze and the oldest are withdrawn first. 0 turns the rule off."},"pending_invites_margin":{"type":"integer","minimum":0,"maximum":500,"description":"Invitations resume once pending invitations are this many below pending_invites_max."}}},"account_type":{"type":"string","enum":["classic","sales_navigator","recruiter"]}}}}}},"parameters":[{"schema":{"type":"string","minLength":3,"maxLength":80},"in":"path","name":"id","required":true,"description":"Sender id"},{"schema":{"type":"string","maxLength":200},"in":"header","name":"idempotency-key","required":false,"description":"Makes the request safe to retry: the same key returns the first response."}],"responses":{"200":{"description":"A LinkedIn account the workspace sends from.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":["string","null"]},"status":{"type":"string","enum":["connecting","ok","checkpoint","disconnected","errored","restricted","paused","removed"]},"status_reason":{"type":["string","null"]},"account_type":{"type":"string"},"profile_url":{"type":["string","null"]},"member_id":{"type":["string","null"]},"timezone":{"type":"string"},"hours":{"type":"object","properties":{"days":{"minItems":1,"type":"array","items":{"type":"integer","minimum":1,"maximum":7},"description":"ISO weekdays the sender works: 1 = Monday … 7 = Sunday."},"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"Local start time, HH:MM."},"end":{"type":"string","pattern":"^([01]\\d|2[0-4]):[0-5]\\d$","description":"Local end time, HH:MM (24:00 allowed)."}},"required":["days","start","end"],"additionalProperties":false,"description":"A sender's working hours, in the sender's own time zone."},"limits":{"type":"object","properties":{"invites_per_day":{"type":"integer","minimum":0,"maximum":100,"description":"Connection requests per day after warm-up."},"invites_per_week":{"type":"integer","minimum":0,"maximum":300,"description":"Connection requests per rolling 7 days."},"messages_per_day":{"type":"integer","minimum":0,"maximum":200},"inmails_per_day":{"type":"integer","minimum":0,"maximum":100},"profile_views_per_day":{"type":"integer","minimum":0,"maximum":150},"follows_per_day":{"type":"integer","minimum":0,"maximum":100},"likes_per_day":{"type":"integer","minimum":0,"maximum":100},"endorsements_per_day":{"type":"integer","minimum":0,"maximum":50},"withdrawals_per_day":{"type":"integer","minimum":0,"maximum":100},"connection_checks_per_day":{"type":"integer","minimum":0,"maximum":250},"lookups_per_day":{"type":"integer","minimum":0,"maximum":250,"description":"Profile lookups a day: reading a lead's LinkedIn profile to resolve their id, check the connection or pending invite before an invite, a profile view or an endorsement. Counted separately from profile_views_per_day (a visit the lead is notified of)."},"warmup":{"type":"object","properties":{"enabled":{"type":"boolean"},"start_invites_per_day":{"type":"integer","minimum":0,"maximum":100,"description":"Invites per day on the first day of warm-up."},"step_per_day":{"type":"integer","minimum":0,"maximum":20,"description":"Added each day until invites_per_day is reached."}},"required":["enabled","start_invites_per_day","step_per_day"],"additionalProperties":false},"min_gap_seconds":{"type":"integer","minimum":30,"maximum":7200,"description":"Smallest random gap between two actions of this sender."},"max_gap_seconds":{"type":"integer","minimum":60,"maximum":14400,"description":"Largest random gap between two actions of this sender."}},"required":["invites_per_day","invites_per_week","messages_per_day","inmails_per_day","profile_views_per_day","follows_per_day","likes_per_day","endorsements_per_day","withdrawals_per_day","connection_checks_per_day","lookups_per_day","warmup","min_gap_seconds","max_gap_seconds"],"additionalProperties":false,"description":"Effective limits (defaults + overrides): what the engine enforces."},"limits_override":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Only the values changed from the defaults."},"cooldown_until":{"type":["string","null"]},"warmup_started_at":{"type":["string","null"]},"connected_at":{"type":["string","null"]},"last_action_at":{"type":["string","null"]},"freeze_rules":{"type":"object","properties":{"weekly_invites":{"type":"boolean","description":"When the sender reaches invites_per_week, freeze its invitations until Monday 00:00 in the sender's time zone (other actions continue)."},"actions_per_day":{"type":"integer","minimum":0,"maximum":1000,"description":"Total actions a day across every kind; reaching it freezes the sender until its next local day. 0 turns the rule off."},"pushback_hours":{"minItems":1,"maxItems":3,"type":"array","items":{"type":"integer","minimum":1,"maximum":720},"description":"How long LinkedIn pushback (rate or limit errors) freezes the sender: first, second and third time within 7 days."},"pending_invites_max":{"type":"integer","minimum":0,"maximum":3000,"description":"Pending (unanswered) invitations at which invitations freeze and the oldest are withdrawn first. 0 turns the rule off."},"pending_invites_margin":{"type":"integer","minimum":0,"maximum":500,"description":"Invitations resume once pending invitations are this many below pending_invites_max."}},"required":["weekly_invites","actions_per_day","pushback_hours","pending_invites_max","pending_invites_margin"],"additionalProperties":false,"description":"Effective freezing rules (defaults + overrides)."},"freeze":{"type":"object","properties":{"state":{"type":"string","enum":["none","frozen","partly_frozen"],"description":"none · frozen (everything waits) · partly_frozen (some kinds wait, e.g. invitations)."},"active":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"rule":{"type":"string","enum":["weekly_invites","daily_actions","pushback","pending_invites","disconnected","manual"],"description":"What froze the sender: weekly invite limit · total actions a day · LinkedIn pushback · too many pending invitations · disconnected or verification · by hand."},"kinds":{"type":"array","items":{"type":"string"},"description":"['all'] or the action kinds that wait."},"reason":{"type":"string"},"since":{"type":"string"},"until":{"description":"null: until its condition clears or someone unfreezes it.","type":["string","null"]},"note":{"type":["string","null"]},"created_by":{"type":"string"},"lifted_at":{"type":["string","null"]},"lifted_by":{"type":["string","null"]}},"required":["id","rule","kinds","reason","since","until","note","created_by"],"additionalProperties":false,"description":"A freeze: something holding a sender (or some of its actions) back."},"description":"Freezes in force now."},"history":{"description":"Freezes of the last 60 days, newest first (on GET /v1/senders/{id}).","type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"rule":{"type":"string","enum":["weekly_invites","daily_actions","pushback","pending_invites","disconnected","manual"],"description":"What froze the sender: weekly invite limit · total actions a day · LinkedIn pushback · too many pending invitations · disconnected or verification · by hand."},"kinds":{"type":"array","items":{"type":"string"},"description":"['all'] or the action kinds that wait."},"reason":{"type":"string"},"since":{"type":"string"},"until":{"description":"null: until its condition clears or someone unfreezes it.","type":["string","null"]},"note":{"type":["string","null"]},"created_by":{"type":"string"},"lifted_at":{"type":["string","null"]},"lifted_by":{"type":["string","null"]}},"required":["id","rule","kinds","reason","since","until","note","created_by"],"additionalProperties":false,"description":"A freeze: something holding a sender (or some of its actions) back."}}},"required":["state","active"],"additionalProperties":false},"pending_invites":{"description":"Pending (sent, unanswered) invitations: read from LinkedIn at the account safety check and tracked locally from then on (a sender connected before the check existed is still counted every few hours).","type":["number","null"]},"safety":{"type":"object","properties":{"status":{"type":"string","enum":["ready","too_many_pending","not_checked"],"description":"ready · too_many_pending (200 or more pending invitations: invitations are capped at 10 a day; 500 or more: paused until fewer than 300) · not_checked (the account has not been read yet; a newly connected sender sends no invitations until it is, a sender connected before this check existed works as before)."},"line":{"type":"string","description":"The one status line to show: \"Ready\", \"Too many pending invites (N): withdraw old ones first\" or \"Not checked\"."},"state":{"type":"string","enum":["legacy","unchecked","checked"],"description":"legacy: connected before the account safety check existed, untouched until it is reconnected or checked by hand · unchecked: waiting for its first check · checked."},"checked_at":{"type":["string","null"]},"plan":{"anyOf":[{"type":"string","enum":["free","premium","sales_navigator","recruiter","unknown"]},{"type":"null"}],"description":"The LinkedIn plan at the check. It does not change the limits."},"connections":{"description":"Connections at the check. Fewer than 100, or unknown, starts the sender on lower invitation limits.","type":["number","null"]},"pending_at_check":{"type":["number","null"]},"pending_before_relay":{"description":"Pending invitations at the check that Relay did not send.","type":["number","null"]},"unknown":{"type":"array","items":{"type":"string"},"description":"Facts LinkedIn did not give at the check (plan, connections); each is treated as the most careful case."},"old_invites":{"type":"object","properties":{"older_than_days":{"type":"number"},"count":{"type":"number"}},"required":["older_than_days","count"],"additionalProperties":false,"description":"Invitations from before Relay, pending longer than three weeks, that can be withdrawn (POST /v1/senders/{id}/pending-invites/withdraw)."},"withdrawals":{"type":"object","properties":{"queued":{"type":"number"},"withdrawn":{"type":"number"},"unknown":{"type":"number","description":"Withdrawals with no known outcome; never retried, settled by the next check."},"stopped":{"description":"Why the queue stopped (LinkedIn pushback, a restriction, a disconnect, a freeze, an unknown outcome). A person starts it again.","type":["string","null"]}},"required":["queued","withdrawn","unknown","stopped"],"additionalProperties":false}},"required":["status","line","state","checked_at","plan","connections","pending_at_check","pending_before_relay","unknown","old_invites","withdrawals"],"additionalProperties":false,"description":"The account safety check: one read of the account when it connects, the sender's starting limits, and the withdrawal of old pending invitations."},"proxy_country":{"description":"ISO 3166-1 alpha-2 country chosen for the account's connection on its last connect link; null: automatic.","type":["string","null"]},"proxy_country_applied":{"description":"Whether that country was sent to the provider and accepted (null: no country chosen).","type":["boolean","null"]},"proxy_country_actual":{"description":"The country the account's connection really sits in, read back after the last connect or reconnect; null: not known. It can differ from proxy_country.","type":["string","null"]},"signed_out_at":{"description":"Since when the account is signed out of LinkedIn, restricted or held at a verification (status_reason has LinkedIn's raw answer); null while it works.","type":["string","null"]},"reads":{"description":"Today's reads of this account (the sender's local day).","type":"object","properties":{"background":{"type":"number","description":"Requests Relay made on its own schedule today (inbox, accepted invitations)."},"background_cap":{"type":"number"},"lookups":{"type":"number","description":"Profile lookups today."},"lookups_cap":{"type":"number"},"calls":{"type":"number","description":"Every request made for this account today."}},"required":["background","background_cap","lookups","lookups_cap","calls"],"additionalProperties":false},"today":{"type":"object","properties":{"day":{"type":"string","description":"The sender's local date."},"used":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}},"caps":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"},"description":"Today's caps (invite cap includes warm-up)."},"remaining":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}},"invites_this_week":{"type":"number"},"invites_week_cap":{"type":"number"},"activity":{"type":"array","items":{"type":"object","properties":{"at":{"type":"string"},"kind":{"type":"string","description":"An action kind (invite, message, inmail, view_profile, follow, like_post, endorse, withdraw_invite, check_connection) accepted (an invite was accepted) or reply."}},"required":["at","kind"],"additionalProperties":false},"description":"What the sender did today (sent actions) and what came back (accepted invites, replies), oldest first, in the sender's local day. Draws the day line."}},"required":["day","used","caps","remaining","invites_this_week","invites_week_cap","activity"],"additionalProperties":false}},"required":["id","name","status","status_reason","account_type","profile_url","member_id","timezone","hours","limits","limits_override","cooldown_until","warmup_started_at","connected_at","last_action_at","freeze_rules","freeze","pending_invites","safety","proxy_country","proxy_country_applied","today"],"additionalProperties":{},"description":"A LinkedIn account the workspace sends from."}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}},"delete":{"summary":"Remove a sender","tags":["Senders"],"description":"Refused while it still has leads in progress.\n\nRequires the `write` scope.\n\nAccepts an `Idempotency-Key` header.","parameters":[{"schema":{"type":"string","minLength":3,"maxLength":80},"in":"path","name":"id","required":true,"description":"Sender id"},{"schema":{"type":"string","maxLength":200},"in":"header","name":"idempotency-key","required":false,"description":"Makes the request safe to retry: the same key returns the first response."}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}}},"/v1/senders/{id}/pause":{"post":{"summary":"Pause a sender (all its campaigns hold)","tags":["Senders"],"description":"Requires the `write` scope.\n\nAccepts an `Idempotency-Key` header.","parameters":[{"schema":{"type":"string","minLength":3,"maxLength":80},"in":"path","name":"id","required":true,"description":"Sender id"},{"schema":{"type":"string","maxLength":200},"in":"header","name":"idempotency-key","required":false,"description":"Makes the request safe to retry: the same key returns the first response."}],"responses":{"200":{"description":"A LinkedIn account the workspace sends from.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":["string","null"]},"status":{"type":"string","enum":["connecting","ok","checkpoint","disconnected","errored","restricted","paused","removed"]},"status_reason":{"type":["string","null"]},"account_type":{"type":"string"},"profile_url":{"type":["string","null"]},"member_id":{"type":["string","null"]},"timezone":{"type":"string"},"hours":{"type":"object","properties":{"days":{"minItems":1,"type":"array","items":{"type":"integer","minimum":1,"maximum":7},"description":"ISO weekdays the sender works: 1 = Monday … 7 = Sunday."},"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"Local start time, HH:MM."},"end":{"type":"string","pattern":"^([01]\\d|2[0-4]):[0-5]\\d$","description":"Local end time, HH:MM (24:00 allowed)."}},"required":["days","start","end"],"additionalProperties":false,"description":"A sender's working hours, in the sender's own time zone."},"limits":{"type":"object","properties":{"invites_per_day":{"type":"integer","minimum":0,"maximum":100,"description":"Connection requests per day after warm-up."},"invites_per_week":{"type":"integer","minimum":0,"maximum":300,"description":"Connection requests per rolling 7 days."},"messages_per_day":{"type":"integer","minimum":0,"maximum":200},"inmails_per_day":{"type":"integer","minimum":0,"maximum":100},"profile_views_per_day":{"type":"integer","minimum":0,"maximum":150},"follows_per_day":{"type":"integer","minimum":0,"maximum":100},"likes_per_day":{"type":"integer","minimum":0,"maximum":100},"endorsements_per_day":{"type":"integer","minimum":0,"maximum":50},"withdrawals_per_day":{"type":"integer","minimum":0,"maximum":100},"connection_checks_per_day":{"type":"integer","minimum":0,"maximum":250},"lookups_per_day":{"type":"integer","minimum":0,"maximum":250,"description":"Profile lookups a day: reading a lead's LinkedIn profile to resolve their id, check the connection or pending invite before an invite, a profile view or an endorsement. Counted separately from profile_views_per_day (a visit the lead is notified of)."},"warmup":{"type":"object","properties":{"enabled":{"type":"boolean"},"start_invites_per_day":{"type":"integer","minimum":0,"maximum":100,"description":"Invites per day on the first day of warm-up."},"step_per_day":{"type":"integer","minimum":0,"maximum":20,"description":"Added each day until invites_per_day is reached."}},"required":["enabled","start_invites_per_day","step_per_day"],"additionalProperties":false},"min_gap_seconds":{"type":"integer","minimum":30,"maximum":7200,"description":"Smallest random gap between two actions of this sender."},"max_gap_seconds":{"type":"integer","minimum":60,"maximum":14400,"description":"Largest random gap between two actions of this sender."}},"required":["invites_per_day","invites_per_week","messages_per_day","inmails_per_day","profile_views_per_day","follows_per_day","likes_per_day","endorsements_per_day","withdrawals_per_day","connection_checks_per_day","lookups_per_day","warmup","min_gap_seconds","max_gap_seconds"],"additionalProperties":false,"description":"Effective limits (defaults + overrides): what the engine enforces."},"limits_override":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Only the values changed from the defaults."},"cooldown_until":{"type":["string","null"]},"warmup_started_at":{"type":["string","null"]},"connected_at":{"type":["string","null"]},"last_action_at":{"type":["string","null"]},"freeze_rules":{"type":"object","properties":{"weekly_invites":{"type":"boolean","description":"When the sender reaches invites_per_week, freeze its invitations until Monday 00:00 in the sender's time zone (other actions continue)."},"actions_per_day":{"type":"integer","minimum":0,"maximum":1000,"description":"Total actions a day across every kind; reaching it freezes the sender until its next local day. 0 turns the rule off."},"pushback_hours":{"minItems":1,"maxItems":3,"type":"array","items":{"type":"integer","minimum":1,"maximum":720},"description":"How long LinkedIn pushback (rate or limit errors) freezes the sender: first, second and third time within 7 days."},"pending_invites_max":{"type":"integer","minimum":0,"maximum":3000,"description":"Pending (unanswered) invitations at which invitations freeze and the oldest are withdrawn first. 0 turns the rule off."},"pending_invites_margin":{"type":"integer","minimum":0,"maximum":500,"description":"Invitations resume once pending invitations are this many below pending_invites_max."}},"required":["weekly_invites","actions_per_day","pushback_hours","pending_invites_max","pending_invites_margin"],"additionalProperties":false,"description":"Effective freezing rules (defaults + overrides)."},"freeze":{"type":"object","properties":{"state":{"type":"string","enum":["none","frozen","partly_frozen"],"description":"none · frozen (everything waits) · partly_frozen (some kinds wait, e.g. invitations)."},"active":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"rule":{"type":"string","enum":["weekly_invites","daily_actions","pushback","pending_invites","disconnected","manual"],"description":"What froze the sender: weekly invite limit · total actions a day · LinkedIn pushback · too many pending invitations · disconnected or verification · by hand."},"kinds":{"type":"array","items":{"type":"string"},"description":"['all'] or the action kinds that wait."},"reason":{"type":"string"},"since":{"type":"string"},"until":{"description":"null: until its condition clears or someone unfreezes it.","type":["string","null"]},"note":{"type":["string","null"]},"created_by":{"type":"string"},"lifted_at":{"type":["string","null"]},"lifted_by":{"type":["string","null"]}},"required":["id","rule","kinds","reason","since","until","note","created_by"],"additionalProperties":false,"description":"A freeze: something holding a sender (or some of its actions) back."},"description":"Freezes in force now."},"history":{"description":"Freezes of the last 60 days, newest first (on GET /v1/senders/{id}).","type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"rule":{"type":"string","enum":["weekly_invites","daily_actions","pushback","pending_invites","disconnected","manual"],"description":"What froze the sender: weekly invite limit · total actions a day · LinkedIn pushback · too many pending invitations · disconnected or verification · by hand."},"kinds":{"type":"array","items":{"type":"string"},"description":"['all'] or the action kinds that wait."},"reason":{"type":"string"},"since":{"type":"string"},"until":{"description":"null: until its condition clears or someone unfreezes it.","type":["string","null"]},"note":{"type":["string","null"]},"created_by":{"type":"string"},"lifted_at":{"type":["string","null"]},"lifted_by":{"type":["string","null"]}},"required":["id","rule","kinds","reason","since","until","note","created_by"],"additionalProperties":false,"description":"A freeze: something holding a sender (or some of its actions) back."}}},"required":["state","active"],"additionalProperties":false},"pending_invites":{"description":"Pending (sent, unanswered) invitations: read from LinkedIn at the account safety check and tracked locally from then on (a sender connected before the check existed is still counted every few hours).","type":["number","null"]},"safety":{"type":"object","properties":{"status":{"type":"string","enum":["ready","too_many_pending","not_checked"],"description":"ready · too_many_pending (200 or more pending invitations: invitations are capped at 10 a day; 500 or more: paused until fewer than 300) · not_checked (the account has not been read yet; a newly connected sender sends no invitations until it is, a sender connected before this check existed works as before)."},"line":{"type":"string","description":"The one status line to show: \"Ready\", \"Too many pending invites (N): withdraw old ones first\" or \"Not checked\"."},"state":{"type":"string","enum":["legacy","unchecked","checked"],"description":"legacy: connected before the account safety check existed, untouched until it is reconnected or checked by hand · unchecked: waiting for its first check · checked."},"checked_at":{"type":["string","null"]},"plan":{"anyOf":[{"type":"string","enum":["free","premium","sales_navigator","recruiter","unknown"]},{"type":"null"}],"description":"The LinkedIn plan at the check. It does not change the limits."},"connections":{"description":"Connections at the check. Fewer than 100, or unknown, starts the sender on lower invitation limits.","type":["number","null"]},"pending_at_check":{"type":["number","null"]},"pending_before_relay":{"description":"Pending invitations at the check that Relay did not send.","type":["number","null"]},"unknown":{"type":"array","items":{"type":"string"},"description":"Facts LinkedIn did not give at the check (plan, connections); each is treated as the most careful case."},"old_invites":{"type":"object","properties":{"older_than_days":{"type":"number"},"count":{"type":"number"}},"required":["older_than_days","count"],"additionalProperties":false,"description":"Invitations from before Relay, pending longer than three weeks, that can be withdrawn (POST /v1/senders/{id}/pending-invites/withdraw)."},"withdrawals":{"type":"object","properties":{"queued":{"type":"number"},"withdrawn":{"type":"number"},"unknown":{"type":"number","description":"Withdrawals with no known outcome; never retried, settled by the next check."},"stopped":{"description":"Why the queue stopped (LinkedIn pushback, a restriction, a disconnect, a freeze, an unknown outcome). A person starts it again.","type":["string","null"]}},"required":["queued","withdrawn","unknown","stopped"],"additionalProperties":false}},"required":["status","line","state","checked_at","plan","connections","pending_at_check","pending_before_relay","unknown","old_invites","withdrawals"],"additionalProperties":false,"description":"The account safety check: one read of the account when it connects, the sender's starting limits, and the withdrawal of old pending invitations."},"proxy_country":{"description":"ISO 3166-1 alpha-2 country chosen for the account's connection on its last connect link; null: automatic.","type":["string","null"]},"proxy_country_applied":{"description":"Whether that country was sent to the provider and accepted (null: no country chosen).","type":["boolean","null"]},"proxy_country_actual":{"description":"The country the account's connection really sits in, read back after the last connect or reconnect; null: not known. It can differ from proxy_country.","type":["string","null"]},"signed_out_at":{"description":"Since when the account is signed out of LinkedIn, restricted or held at a verification (status_reason has LinkedIn's raw answer); null while it works.","type":["string","null"]},"reads":{"description":"Today's reads of this account (the sender's local day).","type":"object","properties":{"background":{"type":"number","description":"Requests Relay made on its own schedule today (inbox, accepted invitations)."},"background_cap":{"type":"number"},"lookups":{"type":"number","description":"Profile lookups today."},"lookups_cap":{"type":"number"},"calls":{"type":"number","description":"Every request made for this account today."}},"required":["background","background_cap","lookups","lookups_cap","calls"],"additionalProperties":false},"today":{"type":"object","properties":{"day":{"type":"string","description":"The sender's local date."},"used":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}},"caps":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"},"description":"Today's caps (invite cap includes warm-up)."},"remaining":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}},"invites_this_week":{"type":"number"},"invites_week_cap":{"type":"number"},"activity":{"type":"array","items":{"type":"object","properties":{"at":{"type":"string"},"kind":{"type":"string","description":"An action kind (invite, message, inmail, view_profile, follow, like_post, endorse, withdraw_invite, check_connection) accepted (an invite was accepted) or reply."}},"required":["at","kind"],"additionalProperties":false},"description":"What the sender did today (sent actions) and what came back (accepted invites, replies), oldest first, in the sender's local day. Draws the day line."}},"required":["day","used","caps","remaining","invites_this_week","invites_week_cap","activity"],"additionalProperties":false}},"required":["id","name","status","status_reason","account_type","profile_url","member_id","timezone","hours","limits","limits_override","cooldown_until","warmup_started_at","connected_at","last_action_at","freeze_rules","freeze","pending_invites","safety","proxy_country","proxy_country_applied","today"],"additionalProperties":{},"description":"A LinkedIn account the workspace sends from."}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}}},"/v1/senders/{id}/resume":{"post":{"summary":"Resume a paused sender","tags":["Senders"],"description":"Requires the `write` scope.\n\nAccepts an `Idempotency-Key` header.","parameters":[{"schema":{"type":"string","minLength":3,"maxLength":80},"in":"path","name":"id","required":true,"description":"Sender id"},{"schema":{"type":"string","maxLength":200},"in":"header","name":"idempotency-key","required":false,"description":"Makes the request safe to retry: the same key returns the first response."}],"responses":{"200":{"description":"A LinkedIn account the workspace sends from.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":["string","null"]},"status":{"type":"string","enum":["connecting","ok","checkpoint","disconnected","errored","restricted","paused","removed"]},"status_reason":{"type":["string","null"]},"account_type":{"type":"string"},"profile_url":{"type":["string","null"]},"member_id":{"type":["string","null"]},"timezone":{"type":"string"},"hours":{"type":"object","properties":{"days":{"minItems":1,"type":"array","items":{"type":"integer","minimum":1,"maximum":7},"description":"ISO weekdays the sender works: 1 = Monday … 7 = Sunday."},"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"Local start time, HH:MM."},"end":{"type":"string","pattern":"^([01]\\d|2[0-4]):[0-5]\\d$","description":"Local end time, HH:MM (24:00 allowed)."}},"required":["days","start","end"],"additionalProperties":false,"description":"A sender's working hours, in the sender's own time zone."},"limits":{"type":"object","properties":{"invites_per_day":{"type":"integer","minimum":0,"maximum":100,"description":"Connection requests per day after warm-up."},"invites_per_week":{"type":"integer","minimum":0,"maximum":300,"description":"Connection requests per rolling 7 days."},"messages_per_day":{"type":"integer","minimum":0,"maximum":200},"inmails_per_day":{"type":"integer","minimum":0,"maximum":100},"profile_views_per_day":{"type":"integer","minimum":0,"maximum":150},"follows_per_day":{"type":"integer","minimum":0,"maximum":100},"likes_per_day":{"type":"integer","minimum":0,"maximum":100},"endorsements_per_day":{"type":"integer","minimum":0,"maximum":50},"withdrawals_per_day":{"type":"integer","minimum":0,"maximum":100},"connection_checks_per_day":{"type":"integer","minimum":0,"maximum":250},"lookups_per_day":{"type":"integer","minimum":0,"maximum":250,"description":"Profile lookups a day: reading a lead's LinkedIn profile to resolve their id, check the connection or pending invite before an invite, a profile view or an endorsement. Counted separately from profile_views_per_day (a visit the lead is notified of)."},"warmup":{"type":"object","properties":{"enabled":{"type":"boolean"},"start_invites_per_day":{"type":"integer","minimum":0,"maximum":100,"description":"Invites per day on the first day of warm-up."},"step_per_day":{"type":"integer","minimum":0,"maximum":20,"description":"Added each day until invites_per_day is reached."}},"required":["enabled","start_invites_per_day","step_per_day"],"additionalProperties":false},"min_gap_seconds":{"type":"integer","minimum":30,"maximum":7200,"description":"Smallest random gap between two actions of this sender."},"max_gap_seconds":{"type":"integer","minimum":60,"maximum":14400,"description":"Largest random gap between two actions of this sender."}},"required":["invites_per_day","invites_per_week","messages_per_day","inmails_per_day","profile_views_per_day","follows_per_day","likes_per_day","endorsements_per_day","withdrawals_per_day","connection_checks_per_day","lookups_per_day","warmup","min_gap_seconds","max_gap_seconds"],"additionalProperties":false,"description":"Effective limits (defaults + overrides): what the engine enforces."},"limits_override":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Only the values changed from the defaults."},"cooldown_until":{"type":["string","null"]},"warmup_started_at":{"type":["string","null"]},"connected_at":{"type":["string","null"]},"last_action_at":{"type":["string","null"]},"freeze_rules":{"type":"object","properties":{"weekly_invites":{"type":"boolean","description":"When the sender reaches invites_per_week, freeze its invitations until Monday 00:00 in the sender's time zone (other actions continue)."},"actions_per_day":{"type":"integer","minimum":0,"maximum":1000,"description":"Total actions a day across every kind; reaching it freezes the sender until its next local day. 0 turns the rule off."},"pushback_hours":{"minItems":1,"maxItems":3,"type":"array","items":{"type":"integer","minimum":1,"maximum":720},"description":"How long LinkedIn pushback (rate or limit errors) freezes the sender: first, second and third time within 7 days."},"pending_invites_max":{"type":"integer","minimum":0,"maximum":3000,"description":"Pending (unanswered) invitations at which invitations freeze and the oldest are withdrawn first. 0 turns the rule off."},"pending_invites_margin":{"type":"integer","minimum":0,"maximum":500,"description":"Invitations resume once pending invitations are this many below pending_invites_max."}},"required":["weekly_invites","actions_per_day","pushback_hours","pending_invites_max","pending_invites_margin"],"additionalProperties":false,"description":"Effective freezing rules (defaults + overrides)."},"freeze":{"type":"object","properties":{"state":{"type":"string","enum":["none","frozen","partly_frozen"],"description":"none · frozen (everything waits) · partly_frozen (some kinds wait, e.g. invitations)."},"active":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"rule":{"type":"string","enum":["weekly_invites","daily_actions","pushback","pending_invites","disconnected","manual"],"description":"What froze the sender: weekly invite limit · total actions a day · LinkedIn pushback · too many pending invitations · disconnected or verification · by hand."},"kinds":{"type":"array","items":{"type":"string"},"description":"['all'] or the action kinds that wait."},"reason":{"type":"string"},"since":{"type":"string"},"until":{"description":"null: until its condition clears or someone unfreezes it.","type":["string","null"]},"note":{"type":["string","null"]},"created_by":{"type":"string"},"lifted_at":{"type":["string","null"]},"lifted_by":{"type":["string","null"]}},"required":["id","rule","kinds","reason","since","until","note","created_by"],"additionalProperties":false,"description":"A freeze: something holding a sender (or some of its actions) back."},"description":"Freezes in force now."},"history":{"description":"Freezes of the last 60 days, newest first (on GET /v1/senders/{id}).","type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"rule":{"type":"string","enum":["weekly_invites","daily_actions","pushback","pending_invites","disconnected","manual"],"description":"What froze the sender: weekly invite limit · total actions a day · LinkedIn pushback · too many pending invitations · disconnected or verification · by hand."},"kinds":{"type":"array","items":{"type":"string"},"description":"['all'] or the action kinds that wait."},"reason":{"type":"string"},"since":{"type":"string"},"until":{"description":"null: until its condition clears or someone unfreezes it.","type":["string","null"]},"note":{"type":["string","null"]},"created_by":{"type":"string"},"lifted_at":{"type":["string","null"]},"lifted_by":{"type":["string","null"]}},"required":["id","rule","kinds","reason","since","until","note","created_by"],"additionalProperties":false,"description":"A freeze: something holding a sender (or some of its actions) back."}}},"required":["state","active"],"additionalProperties":false},"pending_invites":{"description":"Pending (sent, unanswered) invitations: read from LinkedIn at the account safety check and tracked locally from then on (a sender connected before the check existed is still counted every few hours).","type":["number","null"]},"safety":{"type":"object","properties":{"status":{"type":"string","enum":["ready","too_many_pending","not_checked"],"description":"ready · too_many_pending (200 or more pending invitations: invitations are capped at 10 a day; 500 or more: paused until fewer than 300) · not_checked (the account has not been read yet; a newly connected sender sends no invitations until it is, a sender connected before this check existed works as before)."},"line":{"type":"string","description":"The one status line to show: \"Ready\", \"Too many pending invites (N): withdraw old ones first\" or \"Not checked\"."},"state":{"type":"string","enum":["legacy","unchecked","checked"],"description":"legacy: connected before the account safety check existed, untouched until it is reconnected or checked by hand · unchecked: waiting for its first check · checked."},"checked_at":{"type":["string","null"]},"plan":{"anyOf":[{"type":"string","enum":["free","premium","sales_navigator","recruiter","unknown"]},{"type":"null"}],"description":"The LinkedIn plan at the check. It does not change the limits."},"connections":{"description":"Connections at the check. Fewer than 100, or unknown, starts the sender on lower invitation limits.","type":["number","null"]},"pending_at_check":{"type":["number","null"]},"pending_before_relay":{"description":"Pending invitations at the check that Relay did not send.","type":["number","null"]},"unknown":{"type":"array","items":{"type":"string"},"description":"Facts LinkedIn did not give at the check (plan, connections); each is treated as the most careful case."},"old_invites":{"type":"object","properties":{"older_than_days":{"type":"number"},"count":{"type":"number"}},"required":["older_than_days","count"],"additionalProperties":false,"description":"Invitations from before Relay, pending longer than three weeks, that can be withdrawn (POST /v1/senders/{id}/pending-invites/withdraw)."},"withdrawals":{"type":"object","properties":{"queued":{"type":"number"},"withdrawn":{"type":"number"},"unknown":{"type":"number","description":"Withdrawals with no known outcome; never retried, settled by the next check."},"stopped":{"description":"Why the queue stopped (LinkedIn pushback, a restriction, a disconnect, a freeze, an unknown outcome). A person starts it again.","type":["string","null"]}},"required":["queued","withdrawn","unknown","stopped"],"additionalProperties":false}},"required":["status","line","state","checked_at","plan","connections","pending_at_check","pending_before_relay","unknown","old_invites","withdrawals"],"additionalProperties":false,"description":"The account safety check: one read of the account when it connects, the sender's starting limits, and the withdrawal of old pending invitations."},"proxy_country":{"description":"ISO 3166-1 alpha-2 country chosen for the account's connection on its last connect link; null: automatic.","type":["string","null"]},"proxy_country_applied":{"description":"Whether that country was sent to the provider and accepted (null: no country chosen).","type":["boolean","null"]},"proxy_country_actual":{"description":"The country the account's connection really sits in, read back after the last connect or reconnect; null: not known. It can differ from proxy_country.","type":["string","null"]},"signed_out_at":{"description":"Since when the account is signed out of LinkedIn, restricted or held at a verification (status_reason has LinkedIn's raw answer); null while it works.","type":["string","null"]},"reads":{"description":"Today's reads of this account (the sender's local day).","type":"object","properties":{"background":{"type":"number","description":"Requests Relay made on its own schedule today (inbox, accepted invitations)."},"background_cap":{"type":"number"},"lookups":{"type":"number","description":"Profile lookups today."},"lookups_cap":{"type":"number"},"calls":{"type":"number","description":"Every request made for this account today."}},"required":["background","background_cap","lookups","lookups_cap","calls"],"additionalProperties":false},"today":{"type":"object","properties":{"day":{"type":"string","description":"The sender's local date."},"used":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}},"caps":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"},"description":"Today's caps (invite cap includes warm-up)."},"remaining":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}},"invites_this_week":{"type":"number"},"invites_week_cap":{"type":"number"},"activity":{"type":"array","items":{"type":"object","properties":{"at":{"type":"string"},"kind":{"type":"string","description":"An action kind (invite, message, inmail, view_profile, follow, like_post, endorse, withdraw_invite, check_connection) accepted (an invite was accepted) or reply."}},"required":["at","kind"],"additionalProperties":false},"description":"What the sender did today (sent actions) and what came back (accepted invites, replies), oldest first, in the sender's local day. Draws the day line."}},"required":["day","used","caps","remaining","invites_this_week","invites_week_cap","activity"],"additionalProperties":false}},"required":["id","name","status","status_reason","account_type","profile_url","member_id","timezone","hours","limits","limits_override","cooldown_until","warmup_started_at","connected_at","last_action_at","freeze_rules","freeze","pending_invites","safety","proxy_country","proxy_country_applied","today"],"additionalProperties":{},"description":"A LinkedIn account the workspace sends from."}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}}},"/v1/senders/{id}/freeze":{"post":{"summary":"Freeze a sender by hand","tags":["Senders"],"description":"Stops everything (kinds [\"all\"], the default) or some action kinds (e.g. [\"invite\"]) until `until` or until unfrozen. The engine also freezes senders on its own (weekly invite limit, total actions a day, LinkedIn pushback, too many pending invitations, disconnect): see `freeze` on the sender and the sender.frozen event.\n\nRequires the `write` scope.\n\nAccepts an `Idempotency-Key` header.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"until":{"description":"ISO date-time; leave out to freeze until unfrozen.","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"note":{"description":"Why, shown with the freeze.","type":"string","maxLength":300},"kinds":{"description":"\"all\" or action kinds: invite, message, inmail, view_profile, follow, like_post, endorse, withdraw_invite, check_connection.","maxItems":10,"type":"array","items":{"type":"string"}}}}}}},"parameters":[{"schema":{"type":"string","minLength":3,"maxLength":80},"in":"path","name":"id","required":true,"description":"Sender id"},{"schema":{"type":"string","maxLength":200},"in":"header","name":"idempotency-key","required":false,"description":"Makes the request safe to retry: the same key returns the first response."}],"responses":{"200":{"description":"A LinkedIn account the workspace sends from.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":["string","null"]},"status":{"type":"string","enum":["connecting","ok","checkpoint","disconnected","errored","restricted","paused","removed"]},"status_reason":{"type":["string","null"]},"account_type":{"type":"string"},"profile_url":{"type":["string","null"]},"member_id":{"type":["string","null"]},"timezone":{"type":"string"},"hours":{"type":"object","properties":{"days":{"minItems":1,"type":"array","items":{"type":"integer","minimum":1,"maximum":7},"description":"ISO weekdays the sender works: 1 = Monday … 7 = Sunday."},"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"Local start time, HH:MM."},"end":{"type":"string","pattern":"^([01]\\d|2[0-4]):[0-5]\\d$","description":"Local end time, HH:MM (24:00 allowed)."}},"required":["days","start","end"],"additionalProperties":false,"description":"A sender's working hours, in the sender's own time zone."},"limits":{"type":"object","properties":{"invites_per_day":{"type":"integer","minimum":0,"maximum":100,"description":"Connection requests per day after warm-up."},"invites_per_week":{"type":"integer","minimum":0,"maximum":300,"description":"Connection requests per rolling 7 days."},"messages_per_day":{"type":"integer","minimum":0,"maximum":200},"inmails_per_day":{"type":"integer","minimum":0,"maximum":100},"profile_views_per_day":{"type":"integer","minimum":0,"maximum":150},"follows_per_day":{"type":"integer","minimum":0,"maximum":100},"likes_per_day":{"type":"integer","minimum":0,"maximum":100},"endorsements_per_day":{"type":"integer","minimum":0,"maximum":50},"withdrawals_per_day":{"type":"integer","minimum":0,"maximum":100},"connection_checks_per_day":{"type":"integer","minimum":0,"maximum":250},"lookups_per_day":{"type":"integer","minimum":0,"maximum":250,"description":"Profile lookups a day: reading a lead's LinkedIn profile to resolve their id, check the connection or pending invite before an invite, a profile view or an endorsement. Counted separately from profile_views_per_day (a visit the lead is notified of)."},"warmup":{"type":"object","properties":{"enabled":{"type":"boolean"},"start_invites_per_day":{"type":"integer","minimum":0,"maximum":100,"description":"Invites per day on the first day of warm-up."},"step_per_day":{"type":"integer","minimum":0,"maximum":20,"description":"Added each day until invites_per_day is reached."}},"required":["enabled","start_invites_per_day","step_per_day"],"additionalProperties":false},"min_gap_seconds":{"type":"integer","minimum":30,"maximum":7200,"description":"Smallest random gap between two actions of this sender."},"max_gap_seconds":{"type":"integer","minimum":60,"maximum":14400,"description":"Largest random gap between two actions of this sender."}},"required":["invites_per_day","invites_per_week","messages_per_day","inmails_per_day","profile_views_per_day","follows_per_day","likes_per_day","endorsements_per_day","withdrawals_per_day","connection_checks_per_day","lookups_per_day","warmup","min_gap_seconds","max_gap_seconds"],"additionalProperties":false,"description":"Effective limits (defaults + overrides): what the engine enforces."},"limits_override":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Only the values changed from the defaults."},"cooldown_until":{"type":["string","null"]},"warmup_started_at":{"type":["string","null"]},"connected_at":{"type":["string","null"]},"last_action_at":{"type":["string","null"]},"freeze_rules":{"type":"object","properties":{"weekly_invites":{"type":"boolean","description":"When the sender reaches invites_per_week, freeze its invitations until Monday 00:00 in the sender's time zone (other actions continue)."},"actions_per_day":{"type":"integer","minimum":0,"maximum":1000,"description":"Total actions a day across every kind; reaching it freezes the sender until its next local day. 0 turns the rule off."},"pushback_hours":{"minItems":1,"maxItems":3,"type":"array","items":{"type":"integer","minimum":1,"maximum":720},"description":"How long LinkedIn pushback (rate or limit errors) freezes the sender: first, second and third time within 7 days."},"pending_invites_max":{"type":"integer","minimum":0,"maximum":3000,"description":"Pending (unanswered) invitations at which invitations freeze and the oldest are withdrawn first. 0 turns the rule off."},"pending_invites_margin":{"type":"integer","minimum":0,"maximum":500,"description":"Invitations resume once pending invitations are this many below pending_invites_max."}},"required":["weekly_invites","actions_per_day","pushback_hours","pending_invites_max","pending_invites_margin"],"additionalProperties":false,"description":"Effective freezing rules (defaults + overrides)."},"freeze":{"type":"object","properties":{"state":{"type":"string","enum":["none","frozen","partly_frozen"],"description":"none · frozen (everything waits) · partly_frozen (some kinds wait, e.g. invitations)."},"active":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"rule":{"type":"string","enum":["weekly_invites","daily_actions","pushback","pending_invites","disconnected","manual"],"description":"What froze the sender: weekly invite limit · total actions a day · LinkedIn pushback · too many pending invitations · disconnected or verification · by hand."},"kinds":{"type":"array","items":{"type":"string"},"description":"['all'] or the action kinds that wait."},"reason":{"type":"string"},"since":{"type":"string"},"until":{"description":"null: until its condition clears or someone unfreezes it.","type":["string","null"]},"note":{"type":["string","null"]},"created_by":{"type":"string"},"lifted_at":{"type":["string","null"]},"lifted_by":{"type":["string","null"]}},"required":["id","rule","kinds","reason","since","until","note","created_by"],"additionalProperties":false,"description":"A freeze: something holding a sender (or some of its actions) back."},"description":"Freezes in force now."},"history":{"description":"Freezes of the last 60 days, newest first (on GET /v1/senders/{id}).","type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"rule":{"type":"string","enum":["weekly_invites","daily_actions","pushback","pending_invites","disconnected","manual"],"description":"What froze the sender: weekly invite limit · total actions a day · LinkedIn pushback · too many pending invitations · disconnected or verification · by hand."},"kinds":{"type":"array","items":{"type":"string"},"description":"['all'] or the action kinds that wait."},"reason":{"type":"string"},"since":{"type":"string"},"until":{"description":"null: until its condition clears or someone unfreezes it.","type":["string","null"]},"note":{"type":["string","null"]},"created_by":{"type":"string"},"lifted_at":{"type":["string","null"]},"lifted_by":{"type":["string","null"]}},"required":["id","rule","kinds","reason","since","until","note","created_by"],"additionalProperties":false,"description":"A freeze: something holding a sender (or some of its actions) back."}}},"required":["state","active"],"additionalProperties":false},"pending_invites":{"description":"Pending (sent, unanswered) invitations: read from LinkedIn at the account safety check and tracked locally from then on (a sender connected before the check existed is still counted every few hours).","type":["number","null"]},"safety":{"type":"object","properties":{"status":{"type":"string","enum":["ready","too_many_pending","not_checked"],"description":"ready · too_many_pending (200 or more pending invitations: invitations are capped at 10 a day; 500 or more: paused until fewer than 300) · not_checked (the account has not been read yet; a newly connected sender sends no invitations until it is, a sender connected before this check existed works as before)."},"line":{"type":"string","description":"The one status line to show: \"Ready\", \"Too many pending invites (N): withdraw old ones first\" or \"Not checked\"."},"state":{"type":"string","enum":["legacy","unchecked","checked"],"description":"legacy: connected before the account safety check existed, untouched until it is reconnected or checked by hand · unchecked: waiting for its first check · checked."},"checked_at":{"type":["string","null"]},"plan":{"anyOf":[{"type":"string","enum":["free","premium","sales_navigator","recruiter","unknown"]},{"type":"null"}],"description":"The LinkedIn plan at the check. It does not change the limits."},"connections":{"description":"Connections at the check. Fewer than 100, or unknown, starts the sender on lower invitation limits.","type":["number","null"]},"pending_at_check":{"type":["number","null"]},"pending_before_relay":{"description":"Pending invitations at the check that Relay did not send.","type":["number","null"]},"unknown":{"type":"array","items":{"type":"string"},"description":"Facts LinkedIn did not give at the check (plan, connections); each is treated as the most careful case."},"old_invites":{"type":"object","properties":{"older_than_days":{"type":"number"},"count":{"type":"number"}},"required":["older_than_days","count"],"additionalProperties":false,"description":"Invitations from before Relay, pending longer than three weeks, that can be withdrawn (POST /v1/senders/{id}/pending-invites/withdraw)."},"withdrawals":{"type":"object","properties":{"queued":{"type":"number"},"withdrawn":{"type":"number"},"unknown":{"type":"number","description":"Withdrawals with no known outcome; never retried, settled by the next check."},"stopped":{"description":"Why the queue stopped (LinkedIn pushback, a restriction, a disconnect, a freeze, an unknown outcome). A person starts it again.","type":["string","null"]}},"required":["queued","withdrawn","unknown","stopped"],"additionalProperties":false}},"required":["status","line","state","checked_at","plan","connections","pending_at_check","pending_before_relay","unknown","old_invites","withdrawals"],"additionalProperties":false,"description":"The account safety check: one read of the account when it connects, the sender's starting limits, and the withdrawal of old pending invitations."},"proxy_country":{"description":"ISO 3166-1 alpha-2 country chosen for the account's connection on its last connect link; null: automatic.","type":["string","null"]},"proxy_country_applied":{"description":"Whether that country was sent to the provider and accepted (null: no country chosen).","type":["boolean","null"]},"proxy_country_actual":{"description":"The country the account's connection really sits in, read back after the last connect or reconnect; null: not known. It can differ from proxy_country.","type":["string","null"]},"signed_out_at":{"description":"Since when the account is signed out of LinkedIn, restricted or held at a verification (status_reason has LinkedIn's raw answer); null while it works.","type":["string","null"]},"reads":{"description":"Today's reads of this account (the sender's local day).","type":"object","properties":{"background":{"type":"number","description":"Requests Relay made on its own schedule today (inbox, accepted invitations)."},"background_cap":{"type":"number"},"lookups":{"type":"number","description":"Profile lookups today."},"lookups_cap":{"type":"number"},"calls":{"type":"number","description":"Every request made for this account today."}},"required":["background","background_cap","lookups","lookups_cap","calls"],"additionalProperties":false},"today":{"type":"object","properties":{"day":{"type":"string","description":"The sender's local date."},"used":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}},"caps":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"},"description":"Today's caps (invite cap includes warm-up)."},"remaining":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}},"invites_this_week":{"type":"number"},"invites_week_cap":{"type":"number"},"activity":{"type":"array","items":{"type":"object","properties":{"at":{"type":"string"},"kind":{"type":"string","description":"An action kind (invite, message, inmail, view_profile, follow, like_post, endorse, withdraw_invite, check_connection) accepted (an invite was accepted) or reply."}},"required":["at","kind"],"additionalProperties":false},"description":"What the sender did today (sent actions) and what came back (accepted invites, replies), oldest first, in the sender's local day. Draws the day line."}},"required":["day","used","caps","remaining","invites_this_week","invites_week_cap","activity"],"additionalProperties":false}},"required":["id","name","status","status_reason","account_type","profile_url","member_id","timezone","hours","limits","limits_override","cooldown_until","warmup_started_at","connected_at","last_action_at","freeze_rules","freeze","pending_invites","safety","proxy_country","proxy_country_applied","today"],"additionalProperties":{},"description":"A LinkedIn account the workspace sends from."}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}}},"/v1/senders/{id}/unfreeze":{"post":{"summary":"Lift a sender's freezes","tags":["Senders"],"description":"People only: an API key is refused (403). Lifts every freeze, or only the given rules. A freeze for a disconnected account stays until the account is reconnected. An automatic rule trips again if its cause remains (e.g. still over the weekly invite limit).\n\nRequires the `write` scope.\n\nAccepts an `Idempotency-Key` header.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"rules":{"description":"Only lift these rules (default: all but disconnected).","type":"array","items":{"type":"string","enum":["weekly_invites","daily_actions","pushback","pending_invites","disconnected","manual"],"description":"What froze the sender: weekly invite limit · total actions a day · LinkedIn pushback · too many pending invitations · disconnected or verification · by hand."}}}}}}},"parameters":[{"schema":{"type":"string","minLength":3,"maxLength":80},"in":"path","name":"id","required":true,"description":"Sender id"},{"schema":{"type":"string","maxLength":200},"in":"header","name":"idempotency-key","required":false,"description":"Makes the request safe to retry: the same key returns the first response."}],"responses":{"200":{"description":"A LinkedIn account the workspace sends from.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":["string","null"]},"status":{"type":"string","enum":["connecting","ok","checkpoint","disconnected","errored","restricted","paused","removed"]},"status_reason":{"type":["string","null"]},"account_type":{"type":"string"},"profile_url":{"type":["string","null"]},"member_id":{"type":["string","null"]},"timezone":{"type":"string"},"hours":{"type":"object","properties":{"days":{"minItems":1,"type":"array","items":{"type":"integer","minimum":1,"maximum":7},"description":"ISO weekdays the sender works: 1 = Monday … 7 = Sunday."},"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"Local start time, HH:MM."},"end":{"type":"string","pattern":"^([01]\\d|2[0-4]):[0-5]\\d$","description":"Local end time, HH:MM (24:00 allowed)."}},"required":["days","start","end"],"additionalProperties":false,"description":"A sender's working hours, in the sender's own time zone."},"limits":{"type":"object","properties":{"invites_per_day":{"type":"integer","minimum":0,"maximum":100,"description":"Connection requests per day after warm-up."},"invites_per_week":{"type":"integer","minimum":0,"maximum":300,"description":"Connection requests per rolling 7 days."},"messages_per_day":{"type":"integer","minimum":0,"maximum":200},"inmails_per_day":{"type":"integer","minimum":0,"maximum":100},"profile_views_per_day":{"type":"integer","minimum":0,"maximum":150},"follows_per_day":{"type":"integer","minimum":0,"maximum":100},"likes_per_day":{"type":"integer","minimum":0,"maximum":100},"endorsements_per_day":{"type":"integer","minimum":0,"maximum":50},"withdrawals_per_day":{"type":"integer","minimum":0,"maximum":100},"connection_checks_per_day":{"type":"integer","minimum":0,"maximum":250},"lookups_per_day":{"type":"integer","minimum":0,"maximum":250,"description":"Profile lookups a day: reading a lead's LinkedIn profile to resolve their id, check the connection or pending invite before an invite, a profile view or an endorsement. Counted separately from profile_views_per_day (a visit the lead is notified of)."},"warmup":{"type":"object","properties":{"enabled":{"type":"boolean"},"start_invites_per_day":{"type":"integer","minimum":0,"maximum":100,"description":"Invites per day on the first day of warm-up."},"step_per_day":{"type":"integer","minimum":0,"maximum":20,"description":"Added each day until invites_per_day is reached."}},"required":["enabled","start_invites_per_day","step_per_day"],"additionalProperties":false},"min_gap_seconds":{"type":"integer","minimum":30,"maximum":7200,"description":"Smallest random gap between two actions of this sender."},"max_gap_seconds":{"type":"integer","minimum":60,"maximum":14400,"description":"Largest random gap between two actions of this sender."}},"required":["invites_per_day","invites_per_week","messages_per_day","inmails_per_day","profile_views_per_day","follows_per_day","likes_per_day","endorsements_per_day","withdrawals_per_day","connection_checks_per_day","lookups_per_day","warmup","min_gap_seconds","max_gap_seconds"],"additionalProperties":false,"description":"Effective limits (defaults + overrides): what the engine enforces."},"limits_override":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Only the values changed from the defaults."},"cooldown_until":{"type":["string","null"]},"warmup_started_at":{"type":["string","null"]},"connected_at":{"type":["string","null"]},"last_action_at":{"type":["string","null"]},"freeze_rules":{"type":"object","properties":{"weekly_invites":{"type":"boolean","description":"When the sender reaches invites_per_week, freeze its invitations until Monday 00:00 in the sender's time zone (other actions continue)."},"actions_per_day":{"type":"integer","minimum":0,"maximum":1000,"description":"Total actions a day across every kind; reaching it freezes the sender until its next local day. 0 turns the rule off."},"pushback_hours":{"minItems":1,"maxItems":3,"type":"array","items":{"type":"integer","minimum":1,"maximum":720},"description":"How long LinkedIn pushback (rate or limit errors) freezes the sender: first, second and third time within 7 days."},"pending_invites_max":{"type":"integer","minimum":0,"maximum":3000,"description":"Pending (unanswered) invitations at which invitations freeze and the oldest are withdrawn first. 0 turns the rule off."},"pending_invites_margin":{"type":"integer","minimum":0,"maximum":500,"description":"Invitations resume once pending invitations are this many below pending_invites_max."}},"required":["weekly_invites","actions_per_day","pushback_hours","pending_invites_max","pending_invites_margin"],"additionalProperties":false,"description":"Effective freezing rules (defaults + overrides)."},"freeze":{"type":"object","properties":{"state":{"type":"string","enum":["none","frozen","partly_frozen"],"description":"none · frozen (everything waits) · partly_frozen (some kinds wait, e.g. invitations)."},"active":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"rule":{"type":"string","enum":["weekly_invites","daily_actions","pushback","pending_invites","disconnected","manual"],"description":"What froze the sender: weekly invite limit · total actions a day · LinkedIn pushback · too many pending invitations · disconnected or verification · by hand."},"kinds":{"type":"array","items":{"type":"string"},"description":"['all'] or the action kinds that wait."},"reason":{"type":"string"},"since":{"type":"string"},"until":{"description":"null: until its condition clears or someone unfreezes it.","type":["string","null"]},"note":{"type":["string","null"]},"created_by":{"type":"string"},"lifted_at":{"type":["string","null"]},"lifted_by":{"type":["string","null"]}},"required":["id","rule","kinds","reason","since","until","note","created_by"],"additionalProperties":false,"description":"A freeze: something holding a sender (or some of its actions) back."},"description":"Freezes in force now."},"history":{"description":"Freezes of the last 60 days, newest first (on GET /v1/senders/{id}).","type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"rule":{"type":"string","enum":["weekly_invites","daily_actions","pushback","pending_invites","disconnected","manual"],"description":"What froze the sender: weekly invite limit · total actions a day · LinkedIn pushback · too many pending invitations · disconnected or verification · by hand."},"kinds":{"type":"array","items":{"type":"string"},"description":"['all'] or the action kinds that wait."},"reason":{"type":"string"},"since":{"type":"string"},"until":{"description":"null: until its condition clears or someone unfreezes it.","type":["string","null"]},"note":{"type":["string","null"]},"created_by":{"type":"string"},"lifted_at":{"type":["string","null"]},"lifted_by":{"type":["string","null"]}},"required":["id","rule","kinds","reason","since","until","note","created_by"],"additionalProperties":false,"description":"A freeze: something holding a sender (or some of its actions) back."}}},"required":["state","active"],"additionalProperties":false},"pending_invites":{"description":"Pending (sent, unanswered) invitations: read from LinkedIn at the account safety check and tracked locally from then on (a sender connected before the check existed is still counted every few hours).","type":["number","null"]},"safety":{"type":"object","properties":{"status":{"type":"string","enum":["ready","too_many_pending","not_checked"],"description":"ready · too_many_pending (200 or more pending invitations: invitations are capped at 10 a day; 500 or more: paused until fewer than 300) · not_checked (the account has not been read yet; a newly connected sender sends no invitations until it is, a sender connected before this check existed works as before)."},"line":{"type":"string","description":"The one status line to show: \"Ready\", \"Too many pending invites (N): withdraw old ones first\" or \"Not checked\"."},"state":{"type":"string","enum":["legacy","unchecked","checked"],"description":"legacy: connected before the account safety check existed, untouched until it is reconnected or checked by hand · unchecked: waiting for its first check · checked."},"checked_at":{"type":["string","null"]},"plan":{"anyOf":[{"type":"string","enum":["free","premium","sales_navigator","recruiter","unknown"]},{"type":"null"}],"description":"The LinkedIn plan at the check. It does not change the limits."},"connections":{"description":"Connections at the check. Fewer than 100, or unknown, starts the sender on lower invitation limits.","type":["number","null"]},"pending_at_check":{"type":["number","null"]},"pending_before_relay":{"description":"Pending invitations at the check that Relay did not send.","type":["number","null"]},"unknown":{"type":"array","items":{"type":"string"},"description":"Facts LinkedIn did not give at the check (plan, connections); each is treated as the most careful case."},"old_invites":{"type":"object","properties":{"older_than_days":{"type":"number"},"count":{"type":"number"}},"required":["older_than_days","count"],"additionalProperties":false,"description":"Invitations from before Relay, pending longer than three weeks, that can be withdrawn (POST /v1/senders/{id}/pending-invites/withdraw)."},"withdrawals":{"type":"object","properties":{"queued":{"type":"number"},"withdrawn":{"type":"number"},"unknown":{"type":"number","description":"Withdrawals with no known outcome; never retried, settled by the next check."},"stopped":{"description":"Why the queue stopped (LinkedIn pushback, a restriction, a disconnect, a freeze, an unknown outcome). A person starts it again.","type":["string","null"]}},"required":["queued","withdrawn","unknown","stopped"],"additionalProperties":false}},"required":["status","line","state","checked_at","plan","connections","pending_at_check","pending_before_relay","unknown","old_invites","withdrawals"],"additionalProperties":false,"description":"The account safety check: one read of the account when it connects, the sender's starting limits, and the withdrawal of old pending invitations."},"proxy_country":{"description":"ISO 3166-1 alpha-2 country chosen for the account's connection on its last connect link; null: automatic.","type":["string","null"]},"proxy_country_applied":{"description":"Whether that country was sent to the provider and accepted (null: no country chosen).","type":["boolean","null"]},"proxy_country_actual":{"description":"The country the account's connection really sits in, read back after the last connect or reconnect; null: not known. It can differ from proxy_country.","type":["string","null"]},"signed_out_at":{"description":"Since when the account is signed out of LinkedIn, restricted or held at a verification (status_reason has LinkedIn's raw answer); null while it works.","type":["string","null"]},"reads":{"description":"Today's reads of this account (the sender's local day).","type":"object","properties":{"background":{"type":"number","description":"Requests Relay made on its own schedule today (inbox, accepted invitations)."},"background_cap":{"type":"number"},"lookups":{"type":"number","description":"Profile lookups today."},"lookups_cap":{"type":"number"},"calls":{"type":"number","description":"Every request made for this account today."}},"required":["background","background_cap","lookups","lookups_cap","calls"],"additionalProperties":false},"today":{"type":"object","properties":{"day":{"type":"string","description":"The sender's local date."},"used":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}},"caps":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"},"description":"Today's caps (invite cap includes warm-up)."},"remaining":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}},"invites_this_week":{"type":"number"},"invites_week_cap":{"type":"number"},"activity":{"type":"array","items":{"type":"object","properties":{"at":{"type":"string"},"kind":{"type":"string","description":"An action kind (invite, message, inmail, view_profile, follow, like_post, endorse, withdraw_invite, check_connection) accepted (an invite was accepted) or reply."}},"required":["at","kind"],"additionalProperties":false},"description":"What the sender did today (sent actions) and what came back (accepted invites, replies), oldest first, in the sender's local day. Draws the day line."}},"required":["day","used","caps","remaining","invites_this_week","invites_week_cap","activity"],"additionalProperties":false}},"required":["id","name","status","status_reason","account_type","profile_url","member_id","timezone","hours","limits","limits_override","cooldown_until","warmup_started_at","connected_at","last_action_at","freeze_rules","freeze","pending_invites","safety","proxy_country","proxy_country_applied","today"],"additionalProperties":{},"description":"A LinkedIn account the workspace sends from."}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}}},"/v1/senders/{id}/safety-check":{"post":{"summary":"Check the account now","tags":["Senders"],"description":"Reads the LinkedIn account once: plan, number of connections and pending invitations (each 100 pending invitations cost one of the account's daily lookups). It runs on its own when an account connects or reconnects, never on a schedule; by hand at most every 60 minutes. The first successful check sets the sender's starting limits (only ever lower than the defaults; change them afterwards with PATCH) and its pending invitations are tracked locally from then on. See `safety` on the sender.\n\nRequires the `write` scope.\n\nAccepts an `Idempotency-Key` header.","parameters":[{"schema":{"type":"string","minLength":3,"maxLength":80},"in":"path","name":"id","required":true,"description":"Sender id"},{"schema":{"type":"string","maxLength":200},"in":"header","name":"idempotency-key","required":false,"description":"Makes the request safe to retry: the same key returns the first response."}],"responses":{"200":{"description":"A LinkedIn account the workspace sends from.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":["string","null"]},"status":{"type":"string","enum":["connecting","ok","checkpoint","disconnected","errored","restricted","paused","removed"]},"status_reason":{"type":["string","null"]},"account_type":{"type":"string"},"profile_url":{"type":["string","null"]},"member_id":{"type":["string","null"]},"timezone":{"type":"string"},"hours":{"type":"object","properties":{"days":{"minItems":1,"type":"array","items":{"type":"integer","minimum":1,"maximum":7},"description":"ISO weekdays the sender works: 1 = Monday … 7 = Sunday."},"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"Local start time, HH:MM."},"end":{"type":"string","pattern":"^([01]\\d|2[0-4]):[0-5]\\d$","description":"Local end time, HH:MM (24:00 allowed)."}},"required":["days","start","end"],"additionalProperties":false,"description":"A sender's working hours, in the sender's own time zone."},"limits":{"type":"object","properties":{"invites_per_day":{"type":"integer","minimum":0,"maximum":100,"description":"Connection requests per day after warm-up."},"invites_per_week":{"type":"integer","minimum":0,"maximum":300,"description":"Connection requests per rolling 7 days."},"messages_per_day":{"type":"integer","minimum":0,"maximum":200},"inmails_per_day":{"type":"integer","minimum":0,"maximum":100},"profile_views_per_day":{"type":"integer","minimum":0,"maximum":150},"follows_per_day":{"type":"integer","minimum":0,"maximum":100},"likes_per_day":{"type":"integer","minimum":0,"maximum":100},"endorsements_per_day":{"type":"integer","minimum":0,"maximum":50},"withdrawals_per_day":{"type":"integer","minimum":0,"maximum":100},"connection_checks_per_day":{"type":"integer","minimum":0,"maximum":250},"lookups_per_day":{"type":"integer","minimum":0,"maximum":250,"description":"Profile lookups a day: reading a lead's LinkedIn profile to resolve their id, check the connection or pending invite before an invite, a profile view or an endorsement. Counted separately from profile_views_per_day (a visit the lead is notified of)."},"warmup":{"type":"object","properties":{"enabled":{"type":"boolean"},"start_invites_per_day":{"type":"integer","minimum":0,"maximum":100,"description":"Invites per day on the first day of warm-up."},"step_per_day":{"type":"integer","minimum":0,"maximum":20,"description":"Added each day until invites_per_day is reached."}},"required":["enabled","start_invites_per_day","step_per_day"],"additionalProperties":false},"min_gap_seconds":{"type":"integer","minimum":30,"maximum":7200,"description":"Smallest random gap between two actions of this sender."},"max_gap_seconds":{"type":"integer","minimum":60,"maximum":14400,"description":"Largest random gap between two actions of this sender."}},"required":["invites_per_day","invites_per_week","messages_per_day","inmails_per_day","profile_views_per_day","follows_per_day","likes_per_day","endorsements_per_day","withdrawals_per_day","connection_checks_per_day","lookups_per_day","warmup","min_gap_seconds","max_gap_seconds"],"additionalProperties":false,"description":"Effective limits (defaults + overrides): what the engine enforces."},"limits_override":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Only the values changed from the defaults."},"cooldown_until":{"type":["string","null"]},"warmup_started_at":{"type":["string","null"]},"connected_at":{"type":["string","null"]},"last_action_at":{"type":["string","null"]},"freeze_rules":{"type":"object","properties":{"weekly_invites":{"type":"boolean","description":"When the sender reaches invites_per_week, freeze its invitations until Monday 00:00 in the sender's time zone (other actions continue)."},"actions_per_day":{"type":"integer","minimum":0,"maximum":1000,"description":"Total actions a day across every kind; reaching it freezes the sender until its next local day. 0 turns the rule off."},"pushback_hours":{"minItems":1,"maxItems":3,"type":"array","items":{"type":"integer","minimum":1,"maximum":720},"description":"How long LinkedIn pushback (rate or limit errors) freezes the sender: first, second and third time within 7 days."},"pending_invites_max":{"type":"integer","minimum":0,"maximum":3000,"description":"Pending (unanswered) invitations at which invitations freeze and the oldest are withdrawn first. 0 turns the rule off."},"pending_invites_margin":{"type":"integer","minimum":0,"maximum":500,"description":"Invitations resume once pending invitations are this many below pending_invites_max."}},"required":["weekly_invites","actions_per_day","pushback_hours","pending_invites_max","pending_invites_margin"],"additionalProperties":false,"description":"Effective freezing rules (defaults + overrides)."},"freeze":{"type":"object","properties":{"state":{"type":"string","enum":["none","frozen","partly_frozen"],"description":"none · frozen (everything waits) · partly_frozen (some kinds wait, e.g. invitations)."},"active":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"rule":{"type":"string","enum":["weekly_invites","daily_actions","pushback","pending_invites","disconnected","manual"],"description":"What froze the sender: weekly invite limit · total actions a day · LinkedIn pushback · too many pending invitations · disconnected or verification · by hand."},"kinds":{"type":"array","items":{"type":"string"},"description":"['all'] or the action kinds that wait."},"reason":{"type":"string"},"since":{"type":"string"},"until":{"description":"null: until its condition clears or someone unfreezes it.","type":["string","null"]},"note":{"type":["string","null"]},"created_by":{"type":"string"},"lifted_at":{"type":["string","null"]},"lifted_by":{"type":["string","null"]}},"required":["id","rule","kinds","reason","since","until","note","created_by"],"additionalProperties":false,"description":"A freeze: something holding a sender (or some of its actions) back."},"description":"Freezes in force now."},"history":{"description":"Freezes of the last 60 days, newest first (on GET /v1/senders/{id}).","type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"rule":{"type":"string","enum":["weekly_invites","daily_actions","pushback","pending_invites","disconnected","manual"],"description":"What froze the sender: weekly invite limit · total actions a day · LinkedIn pushback · too many pending invitations · disconnected or verification · by hand."},"kinds":{"type":"array","items":{"type":"string"},"description":"['all'] or the action kinds that wait."},"reason":{"type":"string"},"since":{"type":"string"},"until":{"description":"null: until its condition clears or someone unfreezes it.","type":["string","null"]},"note":{"type":["string","null"]},"created_by":{"type":"string"},"lifted_at":{"type":["string","null"]},"lifted_by":{"type":["string","null"]}},"required":["id","rule","kinds","reason","since","until","note","created_by"],"additionalProperties":false,"description":"A freeze: something holding a sender (or some of its actions) back."}}},"required":["state","active"],"additionalProperties":false},"pending_invites":{"description":"Pending (sent, unanswered) invitations: read from LinkedIn at the account safety check and tracked locally from then on (a sender connected before the check existed is still counted every few hours).","type":["number","null"]},"safety":{"type":"object","properties":{"status":{"type":"string","enum":["ready","too_many_pending","not_checked"],"description":"ready · too_many_pending (200 or more pending invitations: invitations are capped at 10 a day; 500 or more: paused until fewer than 300) · not_checked (the account has not been read yet; a newly connected sender sends no invitations until it is, a sender connected before this check existed works as before)."},"line":{"type":"string","description":"The one status line to show: \"Ready\", \"Too many pending invites (N): withdraw old ones first\" or \"Not checked\"."},"state":{"type":"string","enum":["legacy","unchecked","checked"],"description":"legacy: connected before the account safety check existed, untouched until it is reconnected or checked by hand · unchecked: waiting for its first check · checked."},"checked_at":{"type":["string","null"]},"plan":{"anyOf":[{"type":"string","enum":["free","premium","sales_navigator","recruiter","unknown"]},{"type":"null"}],"description":"The LinkedIn plan at the check. It does not change the limits."},"connections":{"description":"Connections at the check. Fewer than 100, or unknown, starts the sender on lower invitation limits.","type":["number","null"]},"pending_at_check":{"type":["number","null"]},"pending_before_relay":{"description":"Pending invitations at the check that Relay did not send.","type":["number","null"]},"unknown":{"type":"array","items":{"type":"string"},"description":"Facts LinkedIn did not give at the check (plan, connections); each is treated as the most careful case."},"old_invites":{"type":"object","properties":{"older_than_days":{"type":"number"},"count":{"type":"number"}},"required":["older_than_days","count"],"additionalProperties":false,"description":"Invitations from before Relay, pending longer than three weeks, that can be withdrawn (POST /v1/senders/{id}/pending-invites/withdraw)."},"withdrawals":{"type":"object","properties":{"queued":{"type":"number"},"withdrawn":{"type":"number"},"unknown":{"type":"number","description":"Withdrawals with no known outcome; never retried, settled by the next check."},"stopped":{"description":"Why the queue stopped (LinkedIn pushback, a restriction, a disconnect, a freeze, an unknown outcome). A person starts it again.","type":["string","null"]}},"required":["queued","withdrawn","unknown","stopped"],"additionalProperties":false}},"required":["status","line","state","checked_at","plan","connections","pending_at_check","pending_before_relay","unknown","old_invites","withdrawals"],"additionalProperties":false,"description":"The account safety check: one read of the account when it connects, the sender's starting limits, and the withdrawal of old pending invitations."},"proxy_country":{"description":"ISO 3166-1 alpha-2 country chosen for the account's connection on its last connect link; null: automatic.","type":["string","null"]},"proxy_country_applied":{"description":"Whether that country was sent to the provider and accepted (null: no country chosen).","type":["boolean","null"]},"proxy_country_actual":{"description":"The country the account's connection really sits in, read back after the last connect or reconnect; null: not known. It can differ from proxy_country.","type":["string","null"]},"signed_out_at":{"description":"Since when the account is signed out of LinkedIn, restricted or held at a verification (status_reason has LinkedIn's raw answer); null while it works.","type":["string","null"]},"reads":{"description":"Today's reads of this account (the sender's local day).","type":"object","properties":{"background":{"type":"number","description":"Requests Relay made on its own schedule today (inbox, accepted invitations)."},"background_cap":{"type":"number"},"lookups":{"type":"number","description":"Profile lookups today."},"lookups_cap":{"type":"number"},"calls":{"type":"number","description":"Every request made for this account today."}},"required":["background","background_cap","lookups","lookups_cap","calls"],"additionalProperties":false},"today":{"type":"object","properties":{"day":{"type":"string","description":"The sender's local date."},"used":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}},"caps":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"},"description":"Today's caps (invite cap includes warm-up)."},"remaining":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}},"invites_this_week":{"type":"number"},"invites_week_cap":{"type":"number"},"activity":{"type":"array","items":{"type":"object","properties":{"at":{"type":"string"},"kind":{"type":"string","description":"An action kind (invite, message, inmail, view_profile, follow, like_post, endorse, withdraw_invite, check_connection) accepted (an invite was accepted) or reply."}},"required":["at","kind"],"additionalProperties":false},"description":"What the sender did today (sent actions) and what came back (accepted invites, replies), oldest first, in the sender's local day. Draws the day line."}},"required":["day","used","caps","remaining","invites_this_week","invites_week_cap","activity"],"additionalProperties":false}},"required":["id","name","status","status_reason","account_type","profile_url","member_id","timezone","hours","limits","limits_override","cooldown_until","warmup_started_at","connected_at","last_action_at","freeze_rules","freeze","pending_invites","safety","proxy_country","proxy_country_applied","today"],"additionalProperties":{},"description":"A LinkedIn account the workspace sends from."}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}}},"/v1/senders/{id}/pending-invites":{"get":{"summary":"Old pending invitations that can be withdrawn","tags":["Senders"],"description":"The suggestion: invitations from before Relay that are still unanswered after three weeks, counted from the list read at the account check (nothing is read from LinkedIn). Invitations LinkedIn gave no date for (`undated`) are never suggested.\n\nRequires the `read` scope.","parameters":[{"schema":{"type":"integer","minimum":21,"maximum":365},"in":"query","name":"older_than_days","required":false,"description":"Invitations sent more than this many days ago (default and minimum 21)."},{"schema":{"type":"string","minLength":3,"maxLength":80},"in":"path","name":"id","required":true,"description":"Sender id"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"sender_id":{"type":"string"},"status":{"type":"string"},"line":{"type":"string"},"pending_invites":{"type":["number","null"]},"older_than_days":{"type":"number"},"count":{"type":"number"},"oldest_sent_at":{"type":["string","null"]},"undated":{"type":"number"},"per_day":{"type":"number","description":"The most withdrawals that can go today: they share the day's invitation limit."},"withdrawals":{"type":"object","properties":{"queued":{"type":"number"},"withdrawn":{"type":"number"},"unknown":{"type":"number"},"stopped":{"type":["string","null"]}},"required":["queued","withdrawn","unknown","stopped"],"additionalProperties":false}},"required":["sender_id","status","line","pending_invites","older_than_days","count","oldest_sent_at","undated","per_day","withdrawals"],"additionalProperties":false}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}}},"/v1/senders/{id}/pending-invites/withdraw":{"post":{"summary":"Withdraw old pending invitations (queued, careful)","tags":["Senders"],"description":"Accepts the suggestion. With `confirm: true` (needs the `send` scope) every invitation from before Relay older than `older_than_days` is queued; without it nothing is queued and the answer says what would be. The engine then withdraws them one at a time, oldest first: only in the sender's working hours, with the random gap between any two actions, inside the day's invitation limit (invitations and withdrawals share it) and at most 20 a day. It stops at once on LinkedIn pushback, a restriction, a verification, a disconnect, a freeze or a withdrawal with no answer; the rest is cancelled and a person starts it again with this call. An invitation is never withdrawn twice and a withdrawal with an unknown outcome is never retried.\n\nAccepts an `Idempotency-Key` header.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"older_than_days":{"description":"Invitations sent more than this many days ago (default and minimum 21).","type":"integer","minimum":21,"maximum":365},"confirm":{"description":"true queues the withdrawals; leave out for a dry run.","type":"boolean"}}}}}},"parameters":[{"schema":{"type":"string","minLength":3,"maxLength":80},"in":"path","name":"id","required":true,"description":"Sender id"},{"schema":{"type":"string","maxLength":200},"in":"header","name":"idempotency-key","required":false,"description":"Makes the request safe to retry: the same key returns the first response."}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"sender_id":{"type":"string"},"older_than_days":{"type":"number"},"would_queue":{"type":"number"},"oldest_sent_at":{"type":["string","null"]},"dry_run":{"type":"boolean"},"queued":{"type":"number"}},"required":["sender_id","older_than_days","would_queue","oldest_sent_at","dry_run","queued"],"additionalProperties":false}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}},"delete":{"summary":"Cancel the queued withdrawals","tags":["Senders"],"description":"Takes back what is still queued; withdrawals already done stay done.\n\nRequires the `write` scope.\n\nAccepts an `Idempotency-Key` header.","parameters":[{"schema":{"type":"string","minLength":3,"maxLength":80},"in":"path","name":"id","required":true,"description":"Sender id"},{"schema":{"type":"string","maxLength":200},"in":"header","name":"idempotency-key","required":false,"description":"Makes the request safe to retry: the same key returns the first response."}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"sender_id":{"type":"string"},"cancelled":{"type":"number"}},"required":["sender_id","cancelled"],"additionalProperties":false}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}}},"/v1/senders/connect-link":{"post":{"summary":"Get a link to connect (or reconnect) a LinkedIn account","tags":["Senders"],"description":"Open the returned url in a browser: the account owner signs in to LinkedIn on a secure sign-in page; Relay never sees the password. Pass sender_id to reconnect an existing sender. The sender becomes `ok` once LinkedIn confirms (sender.connected event). `country` sets the country the account's connection sits in, so it does not follow whoever opens the link: when left out, a reconnect reuses the sender's `proxy_country` and otherwise the workspace setting `default_proxy_country` applies. The link never fails because of the country: check `country_applied`.\n\nRequires the `write` scope.\n\nAccepts an `Idempotency-Key` header.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"redirect_url":{"type":"string","format":"uri","description":"Where the browser returns afterwards."},"sender_id":{"type":"string"},"name":{"type":"string","maxLength":120},"country":{"description":"ISO 3166-1 alpha-2 country of the account's connection, e.g. \"GB\" (case-insensitive). null: automatic (the country of whoever opens the link). Left out: the sender's stored country on a reconnect, else the workspace default.","anyOf":[{"type":"string","maxLength":8},{"type":"null"}]}},"required":["redirect_url"]}}}},"parameters":[{"schema":{"type":"string","maxLength":200},"in":"header","name":"idempotency-key","required":false,"description":"Makes the request safe to retry: the same key returns the first response."}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"sender_id":{"type":"string"},"url":{"type":"string"},"expires_at":{"type":"string"},"state":{"type":"string"},"country":{"description":"The country used for this link (given, stored or the workspace default); null: automatic.","type":["string","null"]},"country_applied":{"type":"boolean","description":"true: the country was sent to LinkedIn's connection provider and accepted. false with a `warning` when a country was asked for but not applied; false without one when no country was asked for."},"warning":{"type":"string"}},"required":["sender_id","url","expires_at","state","country","country_applied"],"additionalProperties":false}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}}},"/v1/leads":{"get":{"summary":"Search and list leads","tags":["Leads"],"description":"Newest first. Page with next_cursor.\n\nRequires the `read` scope.","parameters":[{"schema":{"type":"string","maxLength":200},"in":"query","name":"search","required":false,"description":"Name, company, title or vanity."},{"schema":{"type":"string"},"in":"query","name":"tag","required":false},{"schema":{"type":"string"},"in":"query","name":"list_id","required":false},{"schema":{"type":"string"},"in":"query","name":"campaign_id","required":false},{"schema":{"type":"string","enum":["interested","not_interested","out_of_office","other"]},"in":"query","name":"auto_tag","required":false,"description":"Leads whose latest reply was classified so (tag auto:<class>)."},{"schema":{"type":"string","enum":["true","false"]},"in":"query","name":"replied","required":false},{"schema":{"type":"integer","minimum":1,"maximum":200},"in":"query","name":"limit","required":false,"description":"Page size (default 50, max 200)."},{"schema":{"type":"string","maxLength":200},"in":"query","name":"cursor","required":false,"description":"Pass next_cursor from the previous page."}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"member_id":{"type":["string","null"]},"public_id":{"type":["string","null"]},"profile_url":{"type":["string","null"]},"first_name":{"type":["string","null"]},"last_name":{"type":["string","null"]},"headline":{"type":["string","null"]},"company":{"type":["string","null"]},"title":{"type":["string","null"]},"location":{"type":["string","null"]},"email":{"type":["string","null"]},"custom":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"tags":{"type":"array","items":{"type":"string"}},"do_not_contact":{"type":"boolean"},"replied_at":{"type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","member_id","public_id","profile_url","first_name","last_name","headline","company","title","location","email","custom","tags","do_not_contact","replied_at","created_at","updated_at"],"additionalProperties":{}}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"],"additionalProperties":false}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}},"post":{"summary":"Upsert leads (bulk, up to 1000)","tags":["Leads"],"description":"Creates or updates leads, matched on LinkedIn member id or vanity, so the same person is never stored twice; two stored records later found to be one person are merged. Fields you send overwrite; fields you omit are kept; custom merges; tags add up. Safe to repeat.\n\nRequires the `write` scope.\n\nAccepts an `Idempotency-Key` header.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"leads":{"minItems":1,"maxItems":1000,"type":"array","items":{"type":"object","properties":{"profile_url":{"description":"LinkedIn profile URL (https://www.linkedin.com/in/<vanity> or /in/ACoA…).","type":"string","maxLength":500},"public_id":{"description":"The vanity part of the profile URL.","type":"string","maxLength":200},"member_id":{"description":"LinkedIn member id (ACoA…), the canonical identity when known.","type":"string","maxLength":100},"first_name":{"type":"string","maxLength":200},"last_name":{"type":"string","maxLength":200},"headline":{"type":"string","maxLength":500},"company":{"type":"string","maxLength":300},"title":{"type":"string","maxLength":300},"location":{"type":"string","maxLength":300},"email":{"type":"string","maxLength":300},"custom":{"description":"Custom fields, usable in messages as {custom.<name>}.","type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z0-9_]+$"},"additionalProperties":{}},"tags":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":60}},"timezone":{"description":"The lead's IANA time zone (e.g. America/Chicago). Optional: when absent it is derived from location. Used by campaigns that send in the lead's time zone.","type":"string","maxLength":60}},"description":"A lead. At least one of profile_url, public_id or member_id is required."}},"list_id":{"description":"Also add them to this list.","type":"string"}},"required":["leads"]}}}},"parameters":[{"schema":{"type":"string","maxLength":200},"in":"header","name":"idempotency-key","required":false,"description":"Makes the request safe to retry: the same key returns the first response."}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"created":{"type":"number"},"updated":{"type":"number"},"merged":{"type":"number"},"invalid":{"type":"number"},"results":{"type":"array","items":{"type":"object","properties":{"index":{"type":"number"},"lead_id":{"type":"string"},"status":{"type":"string","enum":["created","updated","merged","invalid"]},"reason":{"type":"string"}},"required":["index","status"],"additionalProperties":false}}},"required":["created","updated","merged","invalid","results"],"additionalProperties":false}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}}},"/v1/leads/lookup":{"get":{"summary":"Find a lead by any identity","tags":["Leads"],"description":"Accepts a profile URL, a vanity, an ACoA member id or a lead id.\n\nRequires the `read` scope.","parameters":[{"schema":{"type":"string","minLength":2,"maxLength":500},"in":"query","name":"who","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"member_id":{"type":["string","null"]},"public_id":{"type":["string","null"]},"profile_url":{"type":["string","null"]},"first_name":{"type":["string","null"]},"last_name":{"type":["string","null"]},"headline":{"type":["string","null"]},"company":{"type":["string","null"]},"title":{"type":["string","null"]},"location":{"type":["string","null"]},"email":{"type":["string","null"]},"custom":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"tags":{"type":"array","items":{"type":"string"}},"do_not_contact":{"type":"boolean"},"replied_at":{"type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","member_id","public_id","profile_url","first_name","last_name","headline","company","title","location","email","custom","tags","do_not_contact","replied_at","created_at","updated_at"],"additionalProperties":{}}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}}},"/v1/leads/{id}":{"get":{"summary":"Get a lead and the campaigns it is in","tags":["Leads"],"description":"Requires the `read` scope.","parameters":[{"schema":{"type":"string","minLength":3,"maxLength":80},"in":"path","name":"id","required":true,"description":"Lead id"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"member_id":{"type":["string","null"]},"public_id":{"type":["string","null"]},"profile_url":{"type":["string","null"]},"first_name":{"type":["string","null"]},"last_name":{"type":["string","null"]},"headline":{"type":["string","null"]},"company":{"type":["string","null"]},"title":{"type":["string","null"]},"location":{"type":["string","null"]},"email":{"type":["string","null"]},"custom":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"tags":{"type":"array","items":{"type":"string"}},"do_not_contact":{"type":"boolean"},"replied_at":{"type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","member_id","public_id","profile_url","first_name","last_name","headline","company","title","location","email","custom","tags","do_not_contact","replied_at","created_at","updated_at"],"additionalProperties":{}}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}},"patch":{"summary":"Update a lead","tags":["Leads"],"description":"do_not_contact: true stops the lead in every running campaign immediately and keeps it out of future ones.\n\nRequires the `write` scope.\n\nAccepts an `Idempotency-Key` header.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"first_name":{"type":"string","maxLength":200},"last_name":{"type":"string","maxLength":200},"headline":{"type":"string","maxLength":500},"company":{"type":"string","maxLength":300},"title":{"type":"string","maxLength":300},"location":{"type":"string","maxLength":300},"email":{"type":"string","maxLength":300},"custom":{"description":"Custom fields, usable in messages as {custom.<name>}.","type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z0-9_]+$"},"additionalProperties":{}},"tags":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":60}},"timezone":{"description":"The lead's IANA time zone (e.g. America/Chicago). Optional: when absent it is derived from location. Used by campaigns that send in the lead's time zone.","type":"string","maxLength":60},"do_not_contact":{"type":"boolean"}}}}}},"parameters":[{"schema":{"type":"string","minLength":3,"maxLength":80},"in":"path","name":"id","required":true,"description":"Lead id"},{"schema":{"type":"string","maxLength":200},"in":"header","name":"idempotency-key","required":false,"description":"Makes the request safe to retry: the same key returns the first response."}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"member_id":{"type":["string","null"]},"public_id":{"type":["string","null"]},"profile_url":{"type":["string","null"]},"first_name":{"type":["string","null"]},"last_name":{"type":["string","null"]},"headline":{"type":["string","null"]},"company":{"type":["string","null"]},"title":{"type":["string","null"]},"location":{"type":["string","null"]},"email":{"type":["string","null"]},"custom":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"tags":{"type":"array","items":{"type":"string"}},"do_not_contact":{"type":"boolean"},"replied_at":{"type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","member_id","public_id","profile_url","first_name","last_name","headline","company","title","location","email","custom","tags","do_not_contact","replied_at","created_at","updated_at"],"additionalProperties":{}}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}},"delete":{"summary":"Delete a never-contacted lead","tags":["Leads"],"description":"Refused once the lead has been contacted (its history protects against re-contact): set do_not_contact instead.\n\nRequires the `write` scope.\n\nAccepts an `Idempotency-Key` header.","parameters":[{"schema":{"type":"string","minLength":3,"maxLength":80},"in":"path","name":"id","required":true,"description":"Lead id"},{"schema":{"type":"string","maxLength":200},"in":"header","name":"idempotency-key","required":false,"description":"Makes the request safe to retry: the same key returns the first response."}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}}},"/v1/leads/import":{"post":{"summary":"Import a CSV","tags":["Leads"],"description":"Send JSON {csv, list_name?, mapping?, tags?}. Headers are matched automatically (LinkedIn URL, First name, Company, …); `mapping` overrides, e.g. {\"Profile\":\"profile_url\",\"Sector\":\"custom.sector\",\"Notes\":\"ignore\"}. Unmatched columns become custom fields. Up to 5000 rows.\n\nRequires the `write` scope.\n\nAccepts an `Idempotency-Key` header.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"csv":{"type":"string","minLength":1,"maxLength":10000000},"list_id":{"type":"string"},"list_name":{"type":"string","maxLength":200},"mapping":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"tags":{"maxItems":20,"type":"array","items":{"type":"string"}}},"required":["csv"]}}}},"parameters":[{"schema":{"type":"string","maxLength":200},"in":"header","name":"idempotency-key","required":false,"description":"Makes the request safe to retry: the same key returns the first response."}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}}},"/v1/lists":{"get":{"summary":"List lead lists","tags":["Lists"],"description":"Requires the `read` scope.","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}},"post":{"summary":"Create a list","tags":["Lists"],"description":"Requires the `write` scope.\n\nAccepts an `Idempotency-Key` header.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200}},"required":["name"]}}}},"parameters":[{"schema":{"type":"string","maxLength":200},"in":"header","name":"idempotency-key","required":false,"description":"Makes the request safe to retry: the same key returns the first response."}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}}},"/v1/lists/{id}":{"patch":{"summary":"Rename a list","tags":["Lists"],"description":"Requires the `write` scope.\n\nAccepts an `Idempotency-Key` header.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200}},"required":["name"]}}}},"parameters":[{"schema":{"type":"string","minLength":3,"maxLength":80},"in":"path","name":"id","required":true,"description":"List id"},{"schema":{"type":"string","maxLength":200},"in":"header","name":"idempotency-key","required":false,"description":"Makes the request safe to retry: the same key returns the first response."}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}},"delete":{"summary":"Delete a list (keeps the leads)","tags":["Lists"],"description":"Requires the `write` scope.\n\nAccepts an `Idempotency-Key` header.","parameters":[{"schema":{"type":"string","minLength":3,"maxLength":80},"in":"path","name":"id","required":true,"description":"List id"},{"schema":{"type":"string","maxLength":200},"in":"header","name":"idempotency-key","required":false,"description":"Makes the request safe to retry: the same key returns the first response."}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}}},"/v1/lists/{id}/leads":{"post":{"summary":"Add leads to a list","tags":["Lists"],"description":"Requires the `write` scope.\n\nAccepts an `Idempotency-Key` header.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"lead_ids":{"minItems":1,"maxItems":5000,"type":"array","items":{"type":"string"}}},"required":["lead_ids"]}}}},"parameters":[{"schema":{"type":"string","minLength":3,"maxLength":80},"in":"path","name":"id","required":true,"description":"List id"},{"schema":{"type":"string","maxLength":200},"in":"header","name":"idempotency-key","required":false,"description":"Makes the request safe to retry: the same key returns the first response."}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}},"delete":{"summary":"Remove leads from a list","tags":["Lists"],"description":"Requires the `write` scope.\n\nAccepts an `Idempotency-Key` header.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"lead_ids":{"minItems":1,"maxItems":5000,"type":"array","items":{"type":"string"}}},"required":["lead_ids"]}}}},"parameters":[{"schema":{"type":"string","minLength":3,"maxLength":80},"in":"path","name":"id","required":true,"description":"List id"},{"schema":{"type":"string","maxLength":200},"in":"header","name":"idempotency-key","required":false,"description":"Makes the request safe to retry: the same key returns the first response."}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}}},"/v1/blocklist":{"get":{"summary":"List blocked people, companies, domains and keywords","tags":["Blocklist"],"description":"Requires the `read` scope.","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}},"post":{"summary":"Block people, companies, email domains or keywords","tags":["Blocklist"],"description":"Blocked leads are stopped in running campaigns at once and refused at enrolment. kind=lead takes a profile URL, vanity or member id; company matches the lead's company name; domain matches email domains; keyword matches company/title/headline. level=organization blocks across every workspace (org admins).\n\nRequires the `write` scope.\n\nAccepts an `Idempotency-Key` header.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"items":{"minItems":1,"maxItems":1000,"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["lead","company","domain","keyword"]},"value":{"type":"string","minLength":1,"maxLength":300},"note":{"type":"string","maxLength":300}},"required":["kind","value"]}},"level":{"type":"string","enum":["workspace","organization"]}},"required":["items"]}}}},"parameters":[{"schema":{"type":"string","maxLength":200},"in":"header","name":"idempotency-key","required":false,"description":"Makes the request safe to retry: the same key returns the first response."}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}}},"/v1/blocklist/{id}":{"delete":{"summary":"Unblock","tags":["Blocklist"],"description":"Requires the `write` scope.\n\nAccepts an `Idempotency-Key` header.","parameters":[{"schema":{"type":"string","minLength":3,"maxLength":80},"in":"path","name":"id","required":true,"description":"Blocklist entry id"},{"schema":{"type":"string","maxLength":200},"in":"header","name":"idempotency-key","required":false,"description":"Makes the request safe to retry: the same key returns the first response."}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}}},"/v1/leads/import.csv":{"post":{"summary":"Import a raw CSV body (text/csv)","tags":["Leads"],"description":"Requires the `write` scope.\n\nAccepts an `Idempotency-Key` header.","parameters":[{"schema":{"type":"string"},"in":"query","name":"list_id","required":false},{"schema":{"type":"string","maxLength":200},"in":"query","name":"list_name","required":false},{"schema":{"type":"string","maxLength":200},"in":"header","name":"idempotency-key","required":false,"description":"Makes the request safe to retry: the same key returns the first response."}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}}},"/v1/campaigns":{"get":{"summary":"List campaigns with headline numbers","tags":["Campaigns"],"description":"Requires the `read` scope.","parameters":[{"schema":{"type":"string","enum":["draft","approved","active","paused","completed","archived"]},"in":"query","name":"status","required":false,"description":"Default: all but archived."}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}},"post":{"summary":"Create a campaign (draft)","tags":["Campaigns"],"description":"Creates a draft. The sequence may be incomplete in a draft; `ready.blockers` and `ready.sequence_problems` say what is missing before it can start. Safety filters default on; keys can tighten them, not loosen.\n\nRequires the `write` scope.\n\nAccepts an `Idempotency-Key` header.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"sender_ids":{"description":"Senders that run the campaign; leads are spread across them and each lead stays with one sender.","maxItems":50,"type":"array","items":{"type":"string"}},"sequence":{"type":"object","properties":{"start":{"description":"Id of the first node.","type":["string","null"]},"nodes":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":40,"pattern":"^[a-z0-9_-]+$"},"label":{"type":"string","maxLength":80},"external_ref":{"type":"string","maxLength":100},"type":{"type":"string","enum":["view_profile"]},"next":{"description":"Id of the next node; null or missing ends the sequence for this lead.","type":["string","null"]}},"required":["id","type"]},{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":40,"pattern":"^[a-z0-9_-]+$"},"label":{"type":"string","maxLength":80},"external_ref":{"type":"string","maxLength":100},"type":{"type":"string","enum":["follow"]},"next":{"description":"Id of the next node; null or missing ends the sequence for this lead.","type":["string","null"]}},"required":["id","type"]},{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":40,"pattern":"^[a-z0-9_-]+$"},"label":{"type":"string","maxLength":80},"external_ref":{"type":"string","maxLength":100},"type":{"type":"string","enum":["like_post"]},"reaction":{"default":"like","type":"string","enum":["like","celebrate","support","love","insightful","funny"]},"within_days":{"default":30,"description":"Only posts newer than this; if none, the step is skipped.","type":"integer","minimum":1,"maximum":90},"next":{"description":"Id of the next node; null or missing ends the sequence for this lead.","type":["string","null"]}},"required":["id","type"]},{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":40,"pattern":"^[a-z0-9_-]+$"},"label":{"type":"string","maxLength":80},"external_ref":{"type":"string","maxLength":100},"type":{"type":"string","enum":["invite"]},"notes":{"description":"Invitation note variants, max 300 characters each after rendering. Omit (or leave empty) for no note. Message variants (A/B/C…). One is picked per lead, evenly; stats are kept per variant. Supports {first_name}, {company}, {custom.x}, fallbacks {first_name|there} and spintax {Hi|Hello}.","maxItems":5,"type":"array","items":{"type":"string","minLength":1,"maxLength":8000}},"withdraw_after_days":{"default":21,"description":"Withdraw the invite if still pending after this many days.","type":"integer","minimum":1,"maximum":90},"accept_wait_days":{"default":14,"description":"How long to wait for acceptance before taking the `no` branch.","type":"integer","minimum":1,"maximum":90},"auto_winner":{"description":"Pick a winning variant automatically: once every variant has after_sends sends and one is better by min_lift, new leads get only that one.","type":"object","properties":{"after_sends":{"default":100,"description":"Sends each variant needs before a winner can be picked (at least 50).","type":"integer","minimum":50,"maximum":5000},"metric":{"default":"reply_rate","description":"acceptance_rate only for invite steps.","type":"string","enum":["reply_rate","acceptance_rate"]},"min_lift":{"default":20,"description":"Percent the best variant must beat the next best by, e.g. 20 = 20% better.","type":"number","minimum":0,"maximum":500}}},"draft":{"description":"Take this step's text per lead from an approved draft instead of the template.","type":"object","properties":{"fallback":{"default":"none","description":"none: a lead with no approved draft waits at this step and nothing is sent. template: a lead with no draft at all gets the step's template (a draft still waiting for approval is waited for).","type":"string","enum":["none","template"]},"brief":{"description":"What the text for this step should do, for whoever writes the drafts.","type":"string","maxLength":2000}}},"yes":{"description":"Node after the invite is accepted (or the lead was already connected).","type":["string","null"]},"no":{"description":"Node when not accepted in time or withdrawn.","type":["string","null"]}},"required":["id","type"]},{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":40,"pattern":"^[a-z0-9_-]+$"},"label":{"type":"string","maxLength":80},"external_ref":{"type":"string","maxLength":100},"type":{"type":"string","enum":["message"]},"messages":{"default":[],"description":"Message variants (A/B/C…). One is picked per lead, evenly; stats are kept per variant. Supports {first_name}, {company}, {custom.x}, fallbacks {first_name|there} and spintax {Hi|Hello}. Required (at least one) unless the step has `draft`.","maxItems":5,"type":"array","items":{"type":"string","minLength":1,"maxLength":8000}},"auto_winner":{"description":"Pick a winning variant automatically: once every variant has after_sends sends and one is better by min_lift, new leads get only that one.","type":"object","properties":{"after_sends":{"default":100,"description":"Sends each variant needs before a winner can be picked (at least 50).","type":"integer","minimum":50,"maximum":5000},"metric":{"default":"reply_rate","description":"acceptance_rate only for invite steps.","type":"string","enum":["reply_rate","acceptance_rate"]},"min_lift":{"default":20,"description":"Percent the best variant must beat the next best by, e.g. 20 = 20% better.","type":"number","minimum":0,"maximum":500}}},"draft":{"description":"Take this step's text per lead from an approved draft instead of the template.","type":"object","properties":{"fallback":{"default":"none","description":"none: a lead with no approved draft waits at this step and nothing is sent. template: a lead with no draft at all gets the step's template (a draft still waiting for approval is waited for).","type":"string","enum":["none","template"]},"brief":{"description":"What the text for this step should do, for whoever writes the drafts.","type":"string","maxLength":2000}}},"next":{"description":"Id of the next node; null or missing ends the sequence for this lead.","type":["string","null"]}},"required":["id","type"]},{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":40,"pattern":"^[a-z0-9_-]+$"},"label":{"type":"string","maxLength":80},"external_ref":{"type":"string","maxLength":100},"type":{"type":"string","enum":["inmail"]},"subjects":{"maxItems":5,"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"description":"Subject variants. Note: InMails from standard (Classic) LinkedIn accounts carry no subject, so on those senders only the message is delivered. With `draft`, each draft carries its own subject and these are only used by the template fallback."},"messages":{"default":[],"description":"Message variants (A/B/C…). One is picked per lead, evenly; stats are kept per variant. Supports {first_name}, {company}, {custom.x}, fallbacks {first_name|there} and spintax {Hi|Hello}. Required (at least one) unless the step has `draft`.","maxItems":5,"type":"array","items":{"type":"string","minLength":1,"maxLength":8000}},"auto_winner":{"description":"Pick a winning variant automatically: once every variant has after_sends sends and one is better by min_lift, new leads get only that one.","type":"object","properties":{"after_sends":{"default":100,"description":"Sends each variant needs before a winner can be picked (at least 50).","type":"integer","minimum":50,"maximum":5000},"metric":{"default":"reply_rate","description":"acceptance_rate only for invite steps.","type":"string","enum":["reply_rate","acceptance_rate"]},"min_lift":{"default":20,"description":"Percent the best variant must beat the next best by, e.g. 20 = 20% better.","type":"number","minimum":0,"maximum":500}}},"draft":{"description":"Take this step's text per lead from an approved draft instead of the template.","type":"object","properties":{"fallback":{"default":"none","description":"none: a lead with no approved draft waits at this step and nothing is sent. template: a lead with no draft at all gets the step's template (a draft still waiting for approval is waited for).","type":"string","enum":["none","template"]},"brief":{"description":"What the text for this step should do, for whoever writes the drafts.","type":"string","maxLength":2000}}},"next":{"description":"Id of the next node; null or missing ends the sequence for this lead.","type":["string","null"]}},"required":["id","type"]},{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":40,"pattern":"^[a-z0-9_-]+$"},"label":{"type":"string","maxLength":80},"external_ref":{"type":"string","maxLength":100},"type":{"type":"string","enum":["endorse"]},"max_skills":{"default":1,"type":"integer","minimum":1,"maximum":3},"next":{"description":"Id of the next node; null or missing ends the sequence for this lead.","type":["string","null"]}},"required":["id","type"]},{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":40,"pattern":"^[a-z0-9_-]+$"},"label":{"type":"string","maxLength":80},"external_ref":{"type":"string","maxLength":100},"type":{"type":"string","enum":["withdraw_invite"]},"next":{"description":"Id of the next node; null or missing ends the sequence for this lead.","type":["string","null"]}},"required":["id","type"]},{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":40,"pattern":"^[a-z0-9_-]+$"},"label":{"type":"string","maxLength":80},"external_ref":{"type":"string","maxLength":100},"type":{"type":"string","enum":["delay"]},"amount":{"type":"integer","minimum":1,"maximum":500},"unit":{"type":"string","enum":["hours","days"]},"next":{"description":"Id of the next node; null or missing ends the sequence for this lead.","type":["string","null"]}},"required":["id","type","amount","unit"]},{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":40,"pattern":"^[a-z0-9_-]+$"},"label":{"type":"string","maxLength":80},"external_ref":{"type":"string","maxLength":100},"type":{"type":"string","enum":["condition"]},"check":{"type":"string","enum":["is_connected","has_replied","has_email","is_open_profile","accepted_invite"],"description":"is_connected: 1st-degree now · has_replied: replied in any conversation with this sender · has_email · is_open_profile (free InMail) · accepted_invite."},"yes":{"description":"Id of the next node; null or missing ends the sequence for this lead.","type":["string","null"]},"no":{"description":"Id of the next node; null or missing ends the sequence for this lead.","type":["string","null"]}},"required":["id","type","check"]}]},"description":"All nodes keyed by their id."}},"required":["start","nodes"],"description":"A campaign sequence: a graph of steps with branches."},"settings":{"type":"object","properties":{"timezone":{"description":"Override the senders' time zones for this campaign.","type":"string"},"stop_on_reply":{"default":true,"description":"A reply from the lead (in any campaign) stops the lead here.","type":"boolean"},"exclude_in_other_campaigns":{"default":true,"description":"Skip leads that are active in another campaign of the workspace.","type":"boolean"},"exclude_contacted_before":{"default":true,"description":"Skip leads any sender of the workspace already messaged or invited.","type":"boolean"},"exclude_other_sender_conversations":{"default":true,"description":"Skip leads who already talk with another sender of the workspace.","type":"boolean"},"respect_blocklist":{"default":true,"type":"boolean"},"daily_new_leads":{"description":"Cap on leads started per day in this campaign.","type":"integer","minimum":1,"maximum":500},"approval":{"default":"required","description":"Per-lead drafts written by an API key (an agent): required = a person (or a key with the approve scope) approves each one before it can be sent; not_required = they are approved automatically once they pass the content checks. Only a workspace admin, in the app, can set not_required.","type":"string","enum":["required","not_required"]},"send_in_lead_timezone":{"default":false,"description":"Also respect the lead's local time: an action goes only when the sender's working hours hold both in the sender's time zone and in the lead's (lead time zone from their location, or set on the lead). Leads with no known time zone, or whose window never overlaps the sender's within a week, follow the sender's hours alone.","type":"boolean"}}}},"required":["name"]}}}},"parameters":[{"schema":{"type":"string","maxLength":200},"in":"header","name":"idempotency-key","required":false,"description":"Makes the request safe to retry: the same key returns the first response."}],"responses":{"201":{"description":"The full state of a campaign in one object.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"status":{"type":"string","enum":["draft","approved","active","paused","completed","archived"]},"settings":{"type":"object","properties":{"timezone":{"description":"Override the senders' time zones for this campaign.","type":"string"},"stop_on_reply":{"default":true,"description":"A reply from the lead (in any campaign) stops the lead here.","type":"boolean"},"exclude_in_other_campaigns":{"default":true,"description":"Skip leads that are active in another campaign of the workspace.","type":"boolean"},"exclude_contacted_before":{"default":true,"description":"Skip leads any sender of the workspace already messaged or invited.","type":"boolean"},"exclude_other_sender_conversations":{"default":true,"description":"Skip leads who already talk with another sender of the workspace.","type":"boolean"},"respect_blocklist":{"default":true,"type":"boolean"},"daily_new_leads":{"description":"Cap on leads started per day in this campaign.","type":"integer","minimum":1,"maximum":500},"approval":{"default":"required","description":"Per-lead drafts written by an API key (an agent): required = a person (or a key with the approve scope) approves each one before it can be sent; not_required = they are approved automatically once they pass the content checks. Only a workspace admin, in the app, can set not_required.","type":"string","enum":["required","not_required"]},"send_in_lead_timezone":{"default":false,"description":"Also respect the lead's local time: an action goes only when the sender's working hours hold both in the sender's time zone and in the lead's (lead time zone from their location, or set on the lead). Leads with no known time zone, or whose window never overlaps the sender's within a week, follow the sender's hours alone.","type":"boolean"}},"required":["stop_on_reply","exclude_in_other_campaigns","exclude_contacted_before","exclude_other_sender_conversations","respect_blocklist","approval","send_in_lead_timezone"],"additionalProperties":false,"description":"Campaign safety filters and schedule. The safety filters can only be turned off by a workspace admin in the app."},"sequence":{},"sequence_version":{"type":"number"},"sender_ids":{"type":"array","items":{"type":"string"}},"senders":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":["string","null"]},"status":{"type":"string"},"account_type":{"type":"string"}},"required":["id","name","status","account_type"],"additionalProperties":false}},"leads":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"},"description":"Lead counts: total and per state (pending, active, waiting, replied, finished, stopped, skipped, failed)."},"steps":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"sent":{"type":"number"},"failed":{"type":"number"},"scheduled":{"type":"number"},"skipped":{"type":"number"},"unknown":{"type":"number"},"waiting_here":{"type":"number"},"by_variant":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}},"waiting_reasons":{"description":"Leads at this step whose action is still to be done and whose sender cannot do it now, by sender and cause (largest first). Absent when none.","type":"array","items":{"type":"object","properties":{"sender_id":{"type":"string"},"cause":{"type":"string","enum":["frozen","disconnected","restricted","checkpoint","errored","connecting","removed","paused","outside_hours","limit","not_checked"],"description":"frozen: a freeze in force (`rule` says which). disconnected / restricted / checkpoint / errored / connecting / paused: the sender's status. outside_hours: its working hours. limit: today's or this week's cap for the kinds named. not_checked: the account safety check has not run, invitations wait."},"rule":{"type":["string","null"]},"until":{"type":["string","null"]},"n":{"type":"number"}},"required":["sender_id","cause","rule","until","n"],"additionalProperties":false}}},"required":["sent","failed","scheduled","skipped","unknown","waiting_here","by_variant"],"additionalProperties":false},"description":"Per sequence step: actions sent/failed/scheduled and leads waiting at the step."},"blocked":{"description":"Is it sending right now: the senders of this campaign that cannot act now, and why and until when, most severe first. Empty: every sender can act.","type":"array","items":{"type":"object","properties":{"sender_id":{"type":"string"},"cause":{"type":"string","enum":["frozen","disconnected","restricted","checkpoint","errored","connecting","removed","paused","outside_hours","limit","not_checked"],"description":"frozen: a freeze in force (`rule` says which). disconnected / restricted / checkpoint / errored / connecting / paused: the sender's status. outside_hours: its working hours. limit: today's or this week's cap for the kinds named. not_checked: the account safety check has not run, invitations wait."},"code":{"type":"string","description":"The guardrail code behind it (sender_frozen, outside_hours, daily_limit, …)."},"rule":{"description":"For a freeze: weekly_invites | daily_actions | pushback | pending_invites | disconnected | manual.","type":["string","null"]},"kinds":{"type":"array","items":{"type":"string"},"description":"['all'], or the action kinds that wait."},"until":{"description":"When it ends, when that is known.","type":["string","null"]},"reason":{"type":"string"},"by":{"description":"Who set a freeze: 'engine' (Relay's own rules) or an actor.","type":["string","null"]},"leads":{"type":"number","description":"Open leads of this campaign pinned to the sender."}},"required":["sender_id","cause","code","rule","kinds","until","reason","by","leads"],"additionalProperties":false}},"ready":{"type":"object","properties":{"can_start":{"type":"boolean"},"blockers":{"type":"array","items":{"type":"string"}},"sequence_problems":{"type":"array","items":{"type":"object","properties":{"node":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false},"description":"Every problem found, each a sentence to act on."}},"required":["can_start","blockers","sequence_problems"],"additionalProperties":false}},"required":["id","name","status","settings","sequence","sequence_version","sender_ids","senders","leads","steps","ready"],"additionalProperties":{},"description":"The full state of a campaign in one object."}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}}},"/v1/campaigns/{id}":{"get":{"summary":"Full state of a campaign","tags":["Campaigns"],"description":"Settings, sequence, senders, lead counts per state, per-step action counts (and per variant), and whether it can start.\n\nRequires the `read` scope.","parameters":[{"schema":{"type":"string","minLength":3,"maxLength":80},"in":"path","name":"id","required":true,"description":"Campaign id"}],"responses":{"200":{"description":"The full state of a campaign in one object.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"status":{"type":"string","enum":["draft","approved","active","paused","completed","archived"]},"settings":{"type":"object","properties":{"timezone":{"description":"Override the senders' time zones for this campaign.","type":"string"},"stop_on_reply":{"default":true,"description":"A reply from the lead (in any campaign) stops the lead here.","type":"boolean"},"exclude_in_other_campaigns":{"default":true,"description":"Skip leads that are active in another campaign of the workspace.","type":"boolean"},"exclude_contacted_before":{"default":true,"description":"Skip leads any sender of the workspace already messaged or invited.","type":"boolean"},"exclude_other_sender_conversations":{"default":true,"description":"Skip leads who already talk with another sender of the workspace.","type":"boolean"},"respect_blocklist":{"default":true,"type":"boolean"},"daily_new_leads":{"description":"Cap on leads started per day in this campaign.","type":"integer","minimum":1,"maximum":500},"approval":{"default":"required","description":"Per-lead drafts written by an API key (an agent): required = a person (or a key with the approve scope) approves each one before it can be sent; not_required = they are approved automatically once they pass the content checks. Only a workspace admin, in the app, can set not_required.","type":"string","enum":["required","not_required"]},"send_in_lead_timezone":{"default":false,"description":"Also respect the lead's local time: an action goes only when the sender's working hours hold both in the sender's time zone and in the lead's (lead time zone from their location, or set on the lead). Leads with no known time zone, or whose window never overlaps the sender's within a week, follow the sender's hours alone.","type":"boolean"}},"required":["stop_on_reply","exclude_in_other_campaigns","exclude_contacted_before","exclude_other_sender_conversations","respect_blocklist","approval","send_in_lead_timezone"],"additionalProperties":false,"description":"Campaign safety filters and schedule. The safety filters can only be turned off by a workspace admin in the app."},"sequence":{},"sequence_version":{"type":"number"},"sender_ids":{"type":"array","items":{"type":"string"}},"senders":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":["string","null"]},"status":{"type":"string"},"account_type":{"type":"string"}},"required":["id","name","status","account_type"],"additionalProperties":false}},"leads":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"},"description":"Lead counts: total and per state (pending, active, waiting, replied, finished, stopped, skipped, failed)."},"steps":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"sent":{"type":"number"},"failed":{"type":"number"},"scheduled":{"type":"number"},"skipped":{"type":"number"},"unknown":{"type":"number"},"waiting_here":{"type":"number"},"by_variant":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}},"waiting_reasons":{"description":"Leads at this step whose action is still to be done and whose sender cannot do it now, by sender and cause (largest first). Absent when none.","type":"array","items":{"type":"object","properties":{"sender_id":{"type":"string"},"cause":{"type":"string","enum":["frozen","disconnected","restricted","checkpoint","errored","connecting","removed","paused","outside_hours","limit","not_checked"],"description":"frozen: a freeze in force (`rule` says which). disconnected / restricted / checkpoint / errored / connecting / paused: the sender's status. outside_hours: its working hours. limit: today's or this week's cap for the kinds named. not_checked: the account safety check has not run, invitations wait."},"rule":{"type":["string","null"]},"until":{"type":["string","null"]},"n":{"type":"number"}},"required":["sender_id","cause","rule","until","n"],"additionalProperties":false}}},"required":["sent","failed","scheduled","skipped","unknown","waiting_here","by_variant"],"additionalProperties":false},"description":"Per sequence step: actions sent/failed/scheduled and leads waiting at the step."},"blocked":{"description":"Is it sending right now: the senders of this campaign that cannot act now, and why and until when, most severe first. Empty: every sender can act.","type":"array","items":{"type":"object","properties":{"sender_id":{"type":"string"},"cause":{"type":"string","enum":["frozen","disconnected","restricted","checkpoint","errored","connecting","removed","paused","outside_hours","limit","not_checked"],"description":"frozen: a freeze in force (`rule` says which). disconnected / restricted / checkpoint / errored / connecting / paused: the sender's status. outside_hours: its working hours. limit: today's or this week's cap for the kinds named. not_checked: the account safety check has not run, invitations wait."},"code":{"type":"string","description":"The guardrail code behind it (sender_frozen, outside_hours, daily_limit, …)."},"rule":{"description":"For a freeze: weekly_invites | daily_actions | pushback | pending_invites | disconnected | manual.","type":["string","null"]},"kinds":{"type":"array","items":{"type":"string"},"description":"['all'], or the action kinds that wait."},"until":{"description":"When it ends, when that is known.","type":["string","null"]},"reason":{"type":"string"},"by":{"description":"Who set a freeze: 'engine' (Relay's own rules) or an actor.","type":["string","null"]},"leads":{"type":"number","description":"Open leads of this campaign pinned to the sender."}},"required":["sender_id","cause","code","rule","kinds","until","reason","by","leads"],"additionalProperties":false}},"ready":{"type":"object","properties":{"can_start":{"type":"boolean"},"blockers":{"type":"array","items":{"type":"string"}},"sequence_problems":{"type":"array","items":{"type":"object","properties":{"node":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false},"description":"Every problem found, each a sentence to act on."}},"required":["can_start","blockers","sequence_problems"],"additionalProperties":false}},"required":["id","name","status","settings","sequence","sequence_version","sender_ids","senders","leads","steps","ready"],"additionalProperties":{},"description":"The full state of a campaign in one object."}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}},"patch":{"summary":"Rename, change senders or settings","tags":["Campaigns"],"description":"Removing a sender from a running campaign needs a pause first. Turning a safety filter off is reserved to workspace admins in the app.\n\nRequires the `write` scope.\n\nAccepts an `Idempotency-Key` header.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"sender_ids":{"maxItems":50,"type":"array","items":{"type":"string"}},"settings":{"type":"object","properties":{"timezone":{"description":"Override the senders' time zones for this campaign.","type":"string"},"stop_on_reply":{"default":true,"description":"A reply from the lead (in any campaign) stops the lead here.","type":"boolean"},"exclude_in_other_campaigns":{"default":true,"description":"Skip leads that are active in another campaign of the workspace.","type":"boolean"},"exclude_contacted_before":{"default":true,"description":"Skip leads any sender of the workspace already messaged or invited.","type":"boolean"},"exclude_other_sender_conversations":{"default":true,"description":"Skip leads who already talk with another sender of the workspace.","type":"boolean"},"respect_blocklist":{"default":true,"type":"boolean"},"daily_new_leads":{"description":"Cap on leads started per day in this campaign.","type":"integer","minimum":1,"maximum":500},"approval":{"default":"required","description":"Per-lead drafts written by an API key (an agent): required = a person (or a key with the approve scope) approves each one before it can be sent; not_required = they are approved automatically once they pass the content checks. Only a workspace admin, in the app, can set not_required.","type":"string","enum":["required","not_required"]},"send_in_lead_timezone":{"default":false,"description":"Also respect the lead's local time: an action goes only when the sender's working hours hold both in the sender's time zone and in the lead's (lead time zone from their location, or set on the lead). Leads with no known time zone, or whose window never overlaps the sender's within a week, follow the sender's hours alone.","type":"boolean"}}}}}}}},"parameters":[{"schema":{"type":"string","minLength":3,"maxLength":80},"in":"path","name":"id","required":true,"description":"Campaign id"},{"schema":{"type":"string","maxLength":200},"in":"header","name":"idempotency-key","required":false,"description":"Makes the request safe to retry: the same key returns the first response."}],"responses":{"200":{"description":"The full state of a campaign in one object.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"status":{"type":"string","enum":["draft","approved","active","paused","completed","archived"]},"settings":{"type":"object","properties":{"timezone":{"description":"Override the senders' time zones for this campaign.","type":"string"},"stop_on_reply":{"default":true,"description":"A reply from the lead (in any campaign) stops the lead here.","type":"boolean"},"exclude_in_other_campaigns":{"default":true,"description":"Skip leads that are active in another campaign of the workspace.","type":"boolean"},"exclude_contacted_before":{"default":true,"description":"Skip leads any sender of the workspace already messaged or invited.","type":"boolean"},"exclude_other_sender_conversations":{"default":true,"description":"Skip leads who already talk with another sender of the workspace.","type":"boolean"},"respect_blocklist":{"default":true,"type":"boolean"},"daily_new_leads":{"description":"Cap on leads started per day in this campaign.","type":"integer","minimum":1,"maximum":500},"approval":{"default":"required","description":"Per-lead drafts written by an API key (an agent): required = a person (or a key with the approve scope) approves each one before it can be sent; not_required = they are approved automatically once they pass the content checks. Only a workspace admin, in the app, can set not_required.","type":"string","enum":["required","not_required"]},"send_in_lead_timezone":{"default":false,"description":"Also respect the lead's local time: an action goes only when the sender's working hours hold both in the sender's time zone and in the lead's (lead time zone from their location, or set on the lead). Leads with no known time zone, or whose window never overlaps the sender's within a week, follow the sender's hours alone.","type":"boolean"}},"required":["stop_on_reply","exclude_in_other_campaigns","exclude_contacted_before","exclude_other_sender_conversations","respect_blocklist","approval","send_in_lead_timezone"],"additionalProperties":false,"description":"Campaign safety filters and schedule. The safety filters can only be turned off by a workspace admin in the app."},"sequence":{},"sequence_version":{"type":"number"},"sender_ids":{"type":"array","items":{"type":"string"}},"senders":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":["string","null"]},"status":{"type":"string"},"account_type":{"type":"string"}},"required":["id","name","status","account_type"],"additionalProperties":false}},"leads":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"},"description":"Lead counts: total and per state (pending, active, waiting, replied, finished, stopped, skipped, failed)."},"steps":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"sent":{"type":"number"},"failed":{"type":"number"},"scheduled":{"type":"number"},"skipped":{"type":"number"},"unknown":{"type":"number"},"waiting_here":{"type":"number"},"by_variant":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}},"waiting_reasons":{"description":"Leads at this step whose action is still to be done and whose sender cannot do it now, by sender and cause (largest first). Absent when none.","type":"array","items":{"type":"object","properties":{"sender_id":{"type":"string"},"cause":{"type":"string","enum":["frozen","disconnected","restricted","checkpoint","errored","connecting","removed","paused","outside_hours","limit","not_checked"],"description":"frozen: a freeze in force (`rule` says which). disconnected / restricted / checkpoint / errored / connecting / paused: the sender's status. outside_hours: its working hours. limit: today's or this week's cap for the kinds named. not_checked: the account safety check has not run, invitations wait."},"rule":{"type":["string","null"]},"until":{"type":["string","null"]},"n":{"type":"number"}},"required":["sender_id","cause","rule","until","n"],"additionalProperties":false}}},"required":["sent","failed","scheduled","skipped","unknown","waiting_here","by_variant"],"additionalProperties":false},"description":"Per sequence step: actions sent/failed/scheduled and leads waiting at the step."},"blocked":{"description":"Is it sending right now: the senders of this campaign that cannot act now, and why and until when, most severe first. Empty: every sender can act.","type":"array","items":{"type":"object","properties":{"sender_id":{"type":"string"},"cause":{"type":"string","enum":["frozen","disconnected","restricted","checkpoint","errored","connecting","removed","paused","outside_hours","limit","not_checked"],"description":"frozen: a freeze in force (`rule` says which). disconnected / restricted / checkpoint / errored / connecting / paused: the sender's status. outside_hours: its working hours. limit: today's or this week's cap for the kinds named. not_checked: the account safety check has not run, invitations wait."},"code":{"type":"string","description":"The guardrail code behind it (sender_frozen, outside_hours, daily_limit, …)."},"rule":{"description":"For a freeze: weekly_invites | daily_actions | pushback | pending_invites | disconnected | manual.","type":["string","null"]},"kinds":{"type":"array","items":{"type":"string"},"description":"['all'], or the action kinds that wait."},"until":{"description":"When it ends, when that is known.","type":["string","null"]},"reason":{"type":"string"},"by":{"description":"Who set a freeze: 'engine' (Relay's own rules) or an actor.","type":["string","null"]},"leads":{"type":"number","description":"Open leads of this campaign pinned to the sender."}},"required":["sender_id","cause","code","rule","kinds","until","reason","by","leads"],"additionalProperties":false}},"ready":{"type":"object","properties":{"can_start":{"type":"boolean"},"blockers":{"type":"array","items":{"type":"string"}},"sequence_problems":{"type":"array","items":{"type":"object","properties":{"node":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false},"description":"Every problem found, each a sentence to act on."}},"required":["can_start","blockers","sequence_problems"],"additionalProperties":false}},"required":["id","name","status","settings","sequence","sequence_version","sender_ids","senders","leads","steps","ready"],"additionalProperties":{},"description":"The full state of a campaign in one object."}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}}},"/v1/campaigns/{id}/sequence":{"put":{"summary":"Replace the sequence","tags":["Campaigns"],"description":"Not while running (pause first). On a paused campaign, steps where leads are waiting must keep their ids. Saving resets an approval. Returns the campaign plus `problems`.\n\nRequires the `write` scope.\n\nAccepts an `Idempotency-Key` header.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"start":{"description":"Id of the first node.","type":["string","null"]},"nodes":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":40,"pattern":"^[a-z0-9_-]+$"},"label":{"type":"string","maxLength":80},"external_ref":{"type":"string","maxLength":100},"type":{"type":"string","enum":["view_profile"]},"next":{"description":"Id of the next node; null or missing ends the sequence for this lead.","type":["string","null"]}},"required":["id","type"]},{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":40,"pattern":"^[a-z0-9_-]+$"},"label":{"type":"string","maxLength":80},"external_ref":{"type":"string","maxLength":100},"type":{"type":"string","enum":["follow"]},"next":{"description":"Id of the next node; null or missing ends the sequence for this lead.","type":["string","null"]}},"required":["id","type"]},{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":40,"pattern":"^[a-z0-9_-]+$"},"label":{"type":"string","maxLength":80},"external_ref":{"type":"string","maxLength":100},"type":{"type":"string","enum":["like_post"]},"reaction":{"default":"like","type":"string","enum":["like","celebrate","support","love","insightful","funny"]},"within_days":{"default":30,"description":"Only posts newer than this; if none, the step is skipped.","type":"integer","minimum":1,"maximum":90},"next":{"description":"Id of the next node; null or missing ends the sequence for this lead.","type":["string","null"]}},"required":["id","type"]},{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":40,"pattern":"^[a-z0-9_-]+$"},"label":{"type":"string","maxLength":80},"external_ref":{"type":"string","maxLength":100},"type":{"type":"string","enum":["invite"]},"notes":{"description":"Invitation note variants, max 300 characters each after rendering. Omit (or leave empty) for no note. Message variants (A/B/C…). One is picked per lead, evenly; stats are kept per variant. Supports {first_name}, {company}, {custom.x}, fallbacks {first_name|there} and spintax {Hi|Hello}.","maxItems":5,"type":"array","items":{"type":"string","minLength":1,"maxLength":8000}},"withdraw_after_days":{"default":21,"description":"Withdraw the invite if still pending after this many days.","type":"integer","minimum":1,"maximum":90},"accept_wait_days":{"default":14,"description":"How long to wait for acceptance before taking the `no` branch.","type":"integer","minimum":1,"maximum":90},"auto_winner":{"description":"Pick a winning variant automatically: once every variant has after_sends sends and one is better by min_lift, new leads get only that one.","type":"object","properties":{"after_sends":{"default":100,"description":"Sends each variant needs before a winner can be picked (at least 50).","type":"integer","minimum":50,"maximum":5000},"metric":{"default":"reply_rate","description":"acceptance_rate only for invite steps.","type":"string","enum":["reply_rate","acceptance_rate"]},"min_lift":{"default":20,"description":"Percent the best variant must beat the next best by, e.g. 20 = 20% better.","type":"number","minimum":0,"maximum":500}}},"draft":{"description":"Take this step's text per lead from an approved draft instead of the template.","type":"object","properties":{"fallback":{"default":"none","description":"none: a lead with no approved draft waits at this step and nothing is sent. template: a lead with no draft at all gets the step's template (a draft still waiting for approval is waited for).","type":"string","enum":["none","template"]},"brief":{"description":"What the text for this step should do, for whoever writes the drafts.","type":"string","maxLength":2000}}},"yes":{"description":"Node after the invite is accepted (or the lead was already connected).","type":["string","null"]},"no":{"description":"Node when not accepted in time or withdrawn.","type":["string","null"]}},"required":["id","type"]},{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":40,"pattern":"^[a-z0-9_-]+$"},"label":{"type":"string","maxLength":80},"external_ref":{"type":"string","maxLength":100},"type":{"type":"string","enum":["message"]},"messages":{"default":[],"description":"Message variants (A/B/C…). One is picked per lead, evenly; stats are kept per variant. Supports {first_name}, {company}, {custom.x}, fallbacks {first_name|there} and spintax {Hi|Hello}. Required (at least one) unless the step has `draft`.","maxItems":5,"type":"array","items":{"type":"string","minLength":1,"maxLength":8000}},"auto_winner":{"description":"Pick a winning variant automatically: once every variant has after_sends sends and one is better by min_lift, new leads get only that one.","type":"object","properties":{"after_sends":{"default":100,"description":"Sends each variant needs before a winner can be picked (at least 50).","type":"integer","minimum":50,"maximum":5000},"metric":{"default":"reply_rate","description":"acceptance_rate only for invite steps.","type":"string","enum":["reply_rate","acceptance_rate"]},"min_lift":{"default":20,"description":"Percent the best variant must beat the next best by, e.g. 20 = 20% better.","type":"number","minimum":0,"maximum":500}}},"draft":{"description":"Take this step's text per lead from an approved draft instead of the template.","type":"object","properties":{"fallback":{"default":"none","description":"none: a lead with no approved draft waits at this step and nothing is sent. template: a lead with no draft at all gets the step's template (a draft still waiting for approval is waited for).","type":"string","enum":["none","template"]},"brief":{"description":"What the text for this step should do, for whoever writes the drafts.","type":"string","maxLength":2000}}},"next":{"description":"Id of the next node; null or missing ends the sequence for this lead.","type":["string","null"]}},"required":["id","type"]},{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":40,"pattern":"^[a-z0-9_-]+$"},"label":{"type":"string","maxLength":80},"external_ref":{"type":"string","maxLength":100},"type":{"type":"string","enum":["inmail"]},"subjects":{"maxItems":5,"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"description":"Subject variants. Note: InMails from standard (Classic) LinkedIn accounts carry no subject, so on those senders only the message is delivered. With `draft`, each draft carries its own subject and these are only used by the template fallback."},"messages":{"default":[],"description":"Message variants (A/B/C…). One is picked per lead, evenly; stats are kept per variant. Supports {first_name}, {company}, {custom.x}, fallbacks {first_name|there} and spintax {Hi|Hello}. Required (at least one) unless the step has `draft`.","maxItems":5,"type":"array","items":{"type":"string","minLength":1,"maxLength":8000}},"auto_winner":{"description":"Pick a winning variant automatically: once every variant has after_sends sends and one is better by min_lift, new leads get only that one.","type":"object","properties":{"after_sends":{"default":100,"description":"Sends each variant needs before a winner can be picked (at least 50).","type":"integer","minimum":50,"maximum":5000},"metric":{"default":"reply_rate","description":"acceptance_rate only for invite steps.","type":"string","enum":["reply_rate","acceptance_rate"]},"min_lift":{"default":20,"description":"Percent the best variant must beat the next best by, e.g. 20 = 20% better.","type":"number","minimum":0,"maximum":500}}},"draft":{"description":"Take this step's text per lead from an approved draft instead of the template.","type":"object","properties":{"fallback":{"default":"none","description":"none: a lead with no approved draft waits at this step and nothing is sent. template: a lead with no draft at all gets the step's template (a draft still waiting for approval is waited for).","type":"string","enum":["none","template"]},"brief":{"description":"What the text for this step should do, for whoever writes the drafts.","type":"string","maxLength":2000}}},"next":{"description":"Id of the next node; null or missing ends the sequence for this lead.","type":["string","null"]}},"required":["id","type"]},{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":40,"pattern":"^[a-z0-9_-]+$"},"label":{"type":"string","maxLength":80},"external_ref":{"type":"string","maxLength":100},"type":{"type":"string","enum":["endorse"]},"max_skills":{"default":1,"type":"integer","minimum":1,"maximum":3},"next":{"description":"Id of the next node; null or missing ends the sequence for this lead.","type":["string","null"]}},"required":["id","type"]},{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":40,"pattern":"^[a-z0-9_-]+$"},"label":{"type":"string","maxLength":80},"external_ref":{"type":"string","maxLength":100},"type":{"type":"string","enum":["withdraw_invite"]},"next":{"description":"Id of the next node; null or missing ends the sequence for this lead.","type":["string","null"]}},"required":["id","type"]},{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":40,"pattern":"^[a-z0-9_-]+$"},"label":{"type":"string","maxLength":80},"external_ref":{"type":"string","maxLength":100},"type":{"type":"string","enum":["delay"]},"amount":{"type":"integer","minimum":1,"maximum":500},"unit":{"type":"string","enum":["hours","days"]},"next":{"description":"Id of the next node; null or missing ends the sequence for this lead.","type":["string","null"]}},"required":["id","type","amount","unit"]},{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":40,"pattern":"^[a-z0-9_-]+$"},"label":{"type":"string","maxLength":80},"external_ref":{"type":"string","maxLength":100},"type":{"type":"string","enum":["condition"]},"check":{"type":"string","enum":["is_connected","has_replied","has_email","is_open_profile","accepted_invite"],"description":"is_connected: 1st-degree now · has_replied: replied in any conversation with this sender · has_email · is_open_profile (free InMail) · accepted_invite."},"yes":{"description":"Id of the next node; null or missing ends the sequence for this lead.","type":["string","null"]},"no":{"description":"Id of the next node; null or missing ends the sequence for this lead.","type":["string","null"]}},"required":["id","type","check"]}]},"description":"All nodes keyed by their id."}},"required":["start","nodes"],"description":"A campaign sequence: a graph of steps with branches.","example":{"start":"view","nodes":{"view":{"id":"view","type":"view_profile","next":"invite"},"invite":{"id":"invite","type":"invite","notes":["Hi {first_name|there}, I enjoyed your post on {custom.topic|growth}. Happy to connect."],"withdraw_after_days":21,"accept_wait_days":14,"yes":"wait1","no":null},"wait1":{"id":"wait1","type":"delay","amount":1,"unit":"days","next":"msg1"},"msg1":{"id":"msg1","type":"message","messages":["Thanks for connecting, {first_name}! {Curious|Quick question}: how is {company} handling outbound today?","Good to be connected, {first_name}. What is {company} focused on this quarter?"],"next":"wait2"},"wait2":{"id":"wait2","type":"delay","amount":4,"unit":"days","next":"replied"},"replied":{"id":"replied","type":"condition","check":"has_replied","yes":null,"no":"msg2"},"msg2":{"id":"msg2","type":"message","messages":["Hi {first_name}, worth a short call next week?"],"next":null}}}}}},"description":"A campaign sequence: a graph of steps with branches."},"parameters":[{"schema":{"type":"string","minLength":3,"maxLength":80},"in":"path","name":"id","required":true,"description":"Campaign id"},{"schema":{"type":"string","maxLength":200},"in":"header","name":"idempotency-key","required":false,"description":"Makes the request safe to retry: the same key returns the first response."}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"status":{"type":"string","enum":["draft","approved","active","paused","completed","archived"]},"settings":{"type":"object","properties":{"timezone":{"description":"Override the senders' time zones for this campaign.","type":"string"},"stop_on_reply":{"default":true,"description":"A reply from the lead (in any campaign) stops the lead here.","type":"boolean"},"exclude_in_other_campaigns":{"default":true,"description":"Skip leads that are active in another campaign of the workspace.","type":"boolean"},"exclude_contacted_before":{"default":true,"description":"Skip leads any sender of the workspace already messaged or invited.","type":"boolean"},"exclude_other_sender_conversations":{"default":true,"description":"Skip leads who already talk with another sender of the workspace.","type":"boolean"},"respect_blocklist":{"default":true,"type":"boolean"},"daily_new_leads":{"description":"Cap on leads started per day in this campaign.","type":"integer","minimum":1,"maximum":500},"approval":{"default":"required","description":"Per-lead drafts written by an API key (an agent): required = a person (or a key with the approve scope) approves each one before it can be sent; not_required = they are approved automatically once they pass the content checks. Only a workspace admin, in the app, can set not_required.","type":"string","enum":["required","not_required"]},"send_in_lead_timezone":{"default":false,"description":"Also respect the lead's local time: an action goes only when the sender's working hours hold both in the sender's time zone and in the lead's (lead time zone from their location, or set on the lead). Leads with no known time zone, or whose window never overlaps the sender's within a week, follow the sender's hours alone.","type":"boolean"}},"required":["stop_on_reply","exclude_in_other_campaigns","exclude_contacted_before","exclude_other_sender_conversations","respect_blocklist","approval","send_in_lead_timezone"],"additionalProperties":false,"description":"Campaign safety filters and schedule. The safety filters can only be turned off by a workspace admin in the app."},"sequence":{},"sequence_version":{"type":"number"},"sender_ids":{"type":"array","items":{"type":"string"}},"senders":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":["string","null"]},"status":{"type":"string"},"account_type":{"type":"string"}},"required":["id","name","status","account_type"],"additionalProperties":false}},"leads":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"},"description":"Lead counts: total and per state (pending, active, waiting, replied, finished, stopped, skipped, failed)."},"steps":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"sent":{"type":"number"},"failed":{"type":"number"},"scheduled":{"type":"number"},"skipped":{"type":"number"},"unknown":{"type":"number"},"waiting_here":{"type":"number"},"by_variant":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}},"waiting_reasons":{"description":"Leads at this step whose action is still to be done and whose sender cannot do it now, by sender and cause (largest first). Absent when none.","type":"array","items":{"type":"object","properties":{"sender_id":{"type":"string"},"cause":{"type":"string","enum":["frozen","disconnected","restricted","checkpoint","errored","connecting","removed","paused","outside_hours","limit","not_checked"],"description":"frozen: a freeze in force (`rule` says which). disconnected / restricted / checkpoint / errored / connecting / paused: the sender's status. outside_hours: its working hours. limit: today's or this week's cap for the kinds named. not_checked: the account safety check has not run, invitations wait."},"rule":{"type":["string","null"]},"until":{"type":["string","null"]},"n":{"type":"number"}},"required":["sender_id","cause","rule","until","n"],"additionalProperties":false}}},"required":["sent","failed","scheduled","skipped","unknown","waiting_here","by_variant"],"additionalProperties":false},"description":"Per sequence step: actions sent/failed/scheduled and leads waiting at the step."},"blocked":{"description":"Is it sending right now: the senders of this campaign that cannot act now, and why and until when, most severe first. Empty: every sender can act.","type":"array","items":{"type":"object","properties":{"sender_id":{"type":"string"},"cause":{"type":"string","enum":["frozen","disconnected","restricted","checkpoint","errored","connecting","removed","paused","outside_hours","limit","not_checked"],"description":"frozen: a freeze in force (`rule` says which). disconnected / restricted / checkpoint / errored / connecting / paused: the sender's status. outside_hours: its working hours. limit: today's or this week's cap for the kinds named. not_checked: the account safety check has not run, invitations wait."},"code":{"type":"string","description":"The guardrail code behind it (sender_frozen, outside_hours, daily_limit, …)."},"rule":{"description":"For a freeze: weekly_invites | daily_actions | pushback | pending_invites | disconnected | manual.","type":["string","null"]},"kinds":{"type":"array","items":{"type":"string"},"description":"['all'], or the action kinds that wait."},"until":{"description":"When it ends, when that is known.","type":["string","null"]},"reason":{"type":"string"},"by":{"description":"Who set a freeze: 'engine' (Relay's own rules) or an actor.","type":["string","null"]},"leads":{"type":"number","description":"Open leads of this campaign pinned to the sender."}},"required":["sender_id","cause","code","rule","kinds","until","reason","by","leads"],"additionalProperties":false}},"ready":{"type":"object","properties":{"can_start":{"type":"boolean"},"blockers":{"type":"array","items":{"type":"string"}},"sequence_problems":{"type":"array","items":{"type":"object","properties":{"node":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false},"description":"Every problem found, each a sentence to act on."}},"required":["can_start","blockers","sequence_problems"],"additionalProperties":false},"problems":{"type":"array","items":{"type":"object","properties":{"node":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false},"description":"Every problem found, each a sentence to act on."}},"required":["id","name","status","settings","sequence","sequence_version","sender_ids","senders","leads","steps","ready","problems"],"additionalProperties":{}}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}}},"/v1/sequences/validate":{"post":{"summary":"Check a sequence without saving it","tags":["Campaigns"],"description":"Returns every problem at once: broken links, loops, unreachable steps, messages reachable by non-connections, notes over 300 characters (rendered with a long sample name), unknown variables.\n\nRequires the `read` scope.\n\nAccepts an `Idempotency-Key` header.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sequence":{"example":{"start":"view","nodes":{"view":{"id":"view","type":"view_profile","next":"invite"},"invite":{"id":"invite","type":"invite","notes":["Hi {first_name|there}, I enjoyed your post on {custom.topic|growth}. Happy to connect."],"withdraw_after_days":21,"accept_wait_days":14,"yes":"wait1","no":null},"wait1":{"id":"wait1","type":"delay","amount":1,"unit":"days","next":"msg1"},"msg1":{"id":"msg1","type":"message","messages":["Thanks for connecting, {first_name}! {Curious|Quick question}: how is {company} handling outbound today?","Good to be connected, {first_name}. What is {company} focused on this quarter?"],"next":"wait2"},"wait2":{"id":"wait2","type":"delay","amount":4,"unit":"days","next":"replied"},"replied":{"id":"replied","type":"condition","check":"has_replied","yes":null,"no":"msg2"},"msg2":{"id":"msg2","type":"message","messages":["Hi {first_name}, worth a short call next week?"],"next":null}}}}},"required":["sequence"]}}}},"parameters":[{"schema":{"type":"string","maxLength":200},"in":"header","name":"idempotency-key","required":false,"description":"Makes the request safe to retry: the same key returns the first response."}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"valid":{"type":"boolean"},"problems":{"type":"array","items":{"type":"object","properties":{"node":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false},"description":"Every problem found, each a sentence to act on."}},"required":["valid","problems"],"additionalProperties":false}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}}},"/v1/campaigns/{id}/leads":{"post":{"summary":"Add leads to a campaign","tags":["Campaigns"],"description":"By lead_ids, inline leads (upserted first) or a list_id. Leads are enrolled immediately (also in a draft) and checked against the safety filters; each skipped lead comes back with its reason. Repeating the call is safe.\n\nRequires the `write` scope.\n\nAccepts an `Idempotency-Key` header.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"lead_ids":{"maxItems":5000,"type":"array","items":{"type":"string"}},"leads":{"description":"Inline leads: upserted first, then enrolled.","maxItems":1000,"type":"array","items":{"type":"object","properties":{"profile_url":{"description":"LinkedIn profile URL (https://www.linkedin.com/in/<vanity> or /in/ACoA…).","type":"string","maxLength":500},"public_id":{"description":"The vanity part of the profile URL.","type":"string","maxLength":200},"member_id":{"description":"LinkedIn member id (ACoA…), the canonical identity when known.","type":"string","maxLength":100},"first_name":{"type":"string","maxLength":200},"last_name":{"type":"string","maxLength":200},"headline":{"type":"string","maxLength":500},"company":{"type":"string","maxLength":300},"title":{"type":"string","maxLength":300},"location":{"type":"string","maxLength":300},"email":{"type":"string","maxLength":300},"custom":{"description":"Custom fields, usable in messages as {custom.<name>}.","type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z0-9_]+$"},"additionalProperties":{}},"tags":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":60}},"timezone":{"description":"The lead's IANA time zone (e.g. America/Chicago). Optional: when absent it is derived from location. Used by campaigns that send in the lead's time zone.","type":"string","maxLength":60}},"description":"A lead. At least one of profile_url, public_id or member_id is required."}},"list_id":{"description":"Enroll every lead of a list.","type":"string"},"sender_id":{"description":"Pin these leads to one of the campaign's senders (otherwise the engine assigns).","type":"string"}}}}}},"parameters":[{"schema":{"type":"string","minLength":3,"maxLength":80},"in":"path","name":"id","required":true,"description":"Campaign id"},{"schema":{"type":"string","maxLength":200},"in":"header","name":"idempotency-key","required":false,"description":"Makes the request safe to retry: the same key returns the first response."}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"campaign_id":{"type":"string"},"enrolled":{"type":"number"},"already_enrolled":{"type":"number"},"skipped":{"type":"number"},"invalid":{"type":"number"},"results":{"type":"array","items":{"type":"object","properties":{"lead_id":{"type":"string"},"status":{"type":"string","enum":["enrolled","already_enrolled","skipped"]},"reason":{"type":"string"}},"required":["lead_id","status"],"additionalProperties":false}}},"required":["campaign_id","enrolled","already_enrolled","skipped","invalid","results"],"additionalProperties":false}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}},"get":{"summary":"Leads in a campaign with their state and step","tags":["Campaigns"],"description":"Requires the `read` scope.","parameters":[{"schema":{"type":"string","enum":["pending","active","waiting","replied","finished","stopped","skipped","failed"]},"in":"query","name":"state","required":false},{"schema":{"type":"integer","minimum":1,"maximum":200},"in":"query","name":"limit","required":false,"description":"Page size (default 50, max 200)."},{"schema":{"type":"string","maxLength":200},"in":"query","name":"cursor","required":false,"description":"Pass next_cursor from the previous page."},{"schema":{"type":"string","minLength":3,"maxLength":80},"in":"path","name":"id","required":true,"description":"Campaign id"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}}},"/v1/campaigns/{id}/leads/{lead_id}":{"delete":{"summary":"Stop a lead in this campaign","tags":["Campaigns"],"description":"Requires the `write` scope.\n\nAccepts an `Idempotency-Key` header.","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true},{"schema":{"type":"string"},"in":"path","name":"lead_id","required":true},{"schema":{"type":"string","maxLength":200},"in":"header","name":"idempotency-key","required":false,"description":"Makes the request safe to retry: the same key returns the first response."}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}}},"/v1/campaigns/{id}/preview":{"post":{"summary":"Preview a step for a real lead","tags":["Campaigns"],"description":"Renders the step exactly as the engine would send it to this lead (same variant, same spintax). `would_send` is false when a variable has no value or a note is too long. Pass `template` (and optionally `subject`, `node_type`) to preview text that is not saved yet, e.g. while editing: it renders with the same seed the engine will use for that node id.\n\nRequires the `read` scope.\n\nAccepts an `Idempotency-Key` header.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"node":{"type":"string","description":"Step id (may be a step not saved yet when `template` is given)."},"lead_id":{"type":"string"},"variant":{"description":"Variant index (0 = A). Default: the variant this lead gets.","type":"integer","minimum":0,"maximum":4},"template":{"description":"Unsaved text to render instead of the saved step.","type":"string","maxLength":8000},"subject":{"description":"Unsaved InMail subject, with `template`.","type":"string","maxLength":200},"node_type":{"description":"Type of the unsaved step (invite notes are checked against 300 characters).","type":"string","enum":["invite","message","inmail"]}},"required":["node","lead_id"]}}}},"parameters":[{"schema":{"type":"string","minLength":3,"maxLength":80},"in":"path","name":"id","required":true,"description":"Campaign id"},{"schema":{"type":"string","maxLength":200},"in":"header","name":"idempotency-key","required":false,"description":"Makes the request safe to retry: the same key returns the first response."}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}}},"/v1/campaigns/{id}/approve":{"post":{"summary":"Approve a draft","tags":["Campaigns"],"description":"Freezes the reviewed sequence: changing it afterwards returns the campaign to draft.\n\nRequires the `send` scope.\n\nAccepts an `Idempotency-Key` header.","parameters":[{"schema":{"type":"string","minLength":3,"maxLength":80},"in":"path","name":"id","required":true,"description":"Campaign id"},{"schema":{"type":"string","maxLength":200},"in":"header","name":"idempotency-key","required":false,"description":"Makes the request safe to retry: the same key returns the first response."}],"responses":{"200":{"description":"The full state of a campaign in one object.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"status":{"type":"string","enum":["draft","approved","active","paused","completed","archived"]},"settings":{"type":"object","properties":{"timezone":{"description":"Override the senders' time zones for this campaign.","type":"string"},"stop_on_reply":{"default":true,"description":"A reply from the lead (in any campaign) stops the lead here.","type":"boolean"},"exclude_in_other_campaigns":{"default":true,"description":"Skip leads that are active in another campaign of the workspace.","type":"boolean"},"exclude_contacted_before":{"default":true,"description":"Skip leads any sender of the workspace already messaged or invited.","type":"boolean"},"exclude_other_sender_conversations":{"default":true,"description":"Skip leads who already talk with another sender of the workspace.","type":"boolean"},"respect_blocklist":{"default":true,"type":"boolean"},"daily_new_leads":{"description":"Cap on leads started per day in this campaign.","type":"integer","minimum":1,"maximum":500},"approval":{"default":"required","description":"Per-lead drafts written by an API key (an agent): required = a person (or a key with the approve scope) approves each one before it can be sent; not_required = they are approved automatically once they pass the content checks. Only a workspace admin, in the app, can set not_required.","type":"string","enum":["required","not_required"]},"send_in_lead_timezone":{"default":false,"description":"Also respect the lead's local time: an action goes only when the sender's working hours hold both in the sender's time zone and in the lead's (lead time zone from their location, or set on the lead). Leads with no known time zone, or whose window never overlaps the sender's within a week, follow the sender's hours alone.","type":"boolean"}},"required":["stop_on_reply","exclude_in_other_campaigns","exclude_contacted_before","exclude_other_sender_conversations","respect_blocklist","approval","send_in_lead_timezone"],"additionalProperties":false,"description":"Campaign safety filters and schedule. The safety filters can only be turned off by a workspace admin in the app."},"sequence":{},"sequence_version":{"type":"number"},"sender_ids":{"type":"array","items":{"type":"string"}},"senders":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":["string","null"]},"status":{"type":"string"},"account_type":{"type":"string"}},"required":["id","name","status","account_type"],"additionalProperties":false}},"leads":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"},"description":"Lead counts: total and per state (pending, active, waiting, replied, finished, stopped, skipped, failed)."},"steps":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"sent":{"type":"number"},"failed":{"type":"number"},"scheduled":{"type":"number"},"skipped":{"type":"number"},"unknown":{"type":"number"},"waiting_here":{"type":"number"},"by_variant":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}},"waiting_reasons":{"description":"Leads at this step whose action is still to be done and whose sender cannot do it now, by sender and cause (largest first). Absent when none.","type":"array","items":{"type":"object","properties":{"sender_id":{"type":"string"},"cause":{"type":"string","enum":["frozen","disconnected","restricted","checkpoint","errored","connecting","removed","paused","outside_hours","limit","not_checked"],"description":"frozen: a freeze in force (`rule` says which). disconnected / restricted / checkpoint / errored / connecting / paused: the sender's status. outside_hours: its working hours. limit: today's or this week's cap for the kinds named. not_checked: the account safety check has not run, invitations wait."},"rule":{"type":["string","null"]},"until":{"type":["string","null"]},"n":{"type":"number"}},"required":["sender_id","cause","rule","until","n"],"additionalProperties":false}}},"required":["sent","failed","scheduled","skipped","unknown","waiting_here","by_variant"],"additionalProperties":false},"description":"Per sequence step: actions sent/failed/scheduled and leads waiting at the step."},"blocked":{"description":"Is it sending right now: the senders of this campaign that cannot act now, and why and until when, most severe first. Empty: every sender can act.","type":"array","items":{"type":"object","properties":{"sender_id":{"type":"string"},"cause":{"type":"string","enum":["frozen","disconnected","restricted","checkpoint","errored","connecting","removed","paused","outside_hours","limit","not_checked"],"description":"frozen: a freeze in force (`rule` says which). disconnected / restricted / checkpoint / errored / connecting / paused: the sender's status. outside_hours: its working hours. limit: today's or this week's cap for the kinds named. not_checked: the account safety check has not run, invitations wait."},"code":{"type":"string","description":"The guardrail code behind it (sender_frozen, outside_hours, daily_limit, …)."},"rule":{"description":"For a freeze: weekly_invites | daily_actions | pushback | pending_invites | disconnected | manual.","type":["string","null"]},"kinds":{"type":"array","items":{"type":"string"},"description":"['all'], or the action kinds that wait."},"until":{"description":"When it ends, when that is known.","type":["string","null"]},"reason":{"type":"string"},"by":{"description":"Who set a freeze: 'engine' (Relay's own rules) or an actor.","type":["string","null"]},"leads":{"type":"number","description":"Open leads of this campaign pinned to the sender."}},"required":["sender_id","cause","code","rule","kinds","until","reason","by","leads"],"additionalProperties":false}},"ready":{"type":"object","properties":{"can_start":{"type":"boolean"},"blockers":{"type":"array","items":{"type":"string"}},"sequence_problems":{"type":"array","items":{"type":"object","properties":{"node":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false},"description":"Every problem found, each a sentence to act on."}},"required":["can_start","blockers","sequence_problems"],"additionalProperties":false}},"required":["id","name","status","settings","sequence","sequence_version","sender_ids","senders","leads","steps","ready"],"additionalProperties":{},"description":"The full state of a campaign in one object."}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}}},"/v1/campaigns/{id}/start":{"post":{"summary":"Start sending","tags":["Campaigns"],"description":"Refused (with blockers) unless the sequence is clean, a sender is connected and leads are waiting. In workspaces with approval_required, only approved campaigns start. Sending then follows each sender's limits and hours.\n\nRequires the `send` scope.\n\nAccepts an `Idempotency-Key` header.","parameters":[{"schema":{"type":"string","minLength":3,"maxLength":80},"in":"path","name":"id","required":true,"description":"Campaign id"},{"schema":{"type":"string","maxLength":200},"in":"header","name":"idempotency-key","required":false,"description":"Makes the request safe to retry: the same key returns the first response."}],"responses":{"200":{"description":"The full state of a campaign in one object.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"status":{"type":"string","enum":["draft","approved","active","paused","completed","archived"]},"settings":{"type":"object","properties":{"timezone":{"description":"Override the senders' time zones for this campaign.","type":"string"},"stop_on_reply":{"default":true,"description":"A reply from the lead (in any campaign) stops the lead here.","type":"boolean"},"exclude_in_other_campaigns":{"default":true,"description":"Skip leads that are active in another campaign of the workspace.","type":"boolean"},"exclude_contacted_before":{"default":true,"description":"Skip leads any sender of the workspace already messaged or invited.","type":"boolean"},"exclude_other_sender_conversations":{"default":true,"description":"Skip leads who already talk with another sender of the workspace.","type":"boolean"},"respect_blocklist":{"default":true,"type":"boolean"},"daily_new_leads":{"description":"Cap on leads started per day in this campaign.","type":"integer","minimum":1,"maximum":500},"approval":{"default":"required","description":"Per-lead drafts written by an API key (an agent): required = a person (or a key with the approve scope) approves each one before it can be sent; not_required = they are approved automatically once they pass the content checks. Only a workspace admin, in the app, can set not_required.","type":"string","enum":["required","not_required"]},"send_in_lead_timezone":{"default":false,"description":"Also respect the lead's local time: an action goes only when the sender's working hours hold both in the sender's time zone and in the lead's (lead time zone from their location, or set on the lead). Leads with no known time zone, or whose window never overlaps the sender's within a week, follow the sender's hours alone.","type":"boolean"}},"required":["stop_on_reply","exclude_in_other_campaigns","exclude_contacted_before","exclude_other_sender_conversations","respect_blocklist","approval","send_in_lead_timezone"],"additionalProperties":false,"description":"Campaign safety filters and schedule. The safety filters can only be turned off by a workspace admin in the app."},"sequence":{},"sequence_version":{"type":"number"},"sender_ids":{"type":"array","items":{"type":"string"}},"senders":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":["string","null"]},"status":{"type":"string"},"account_type":{"type":"string"}},"required":["id","name","status","account_type"],"additionalProperties":false}},"leads":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"},"description":"Lead counts: total and per state (pending, active, waiting, replied, finished, stopped, skipped, failed)."},"steps":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"sent":{"type":"number"},"failed":{"type":"number"},"scheduled":{"type":"number"},"skipped":{"type":"number"},"unknown":{"type":"number"},"waiting_here":{"type":"number"},"by_variant":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}},"waiting_reasons":{"description":"Leads at this step whose action is still to be done and whose sender cannot do it now, by sender and cause (largest first). Absent when none.","type":"array","items":{"type":"object","properties":{"sender_id":{"type":"string"},"cause":{"type":"string","enum":["frozen","disconnected","restricted","checkpoint","errored","connecting","removed","paused","outside_hours","limit","not_checked"],"description":"frozen: a freeze in force (`rule` says which). disconnected / restricted / checkpoint / errored / connecting / paused: the sender's status. outside_hours: its working hours. limit: today's or this week's cap for the kinds named. not_checked: the account safety check has not run, invitations wait."},"rule":{"type":["string","null"]},"until":{"type":["string","null"]},"n":{"type":"number"}},"required":["sender_id","cause","rule","until","n"],"additionalProperties":false}}},"required":["sent","failed","scheduled","skipped","unknown","waiting_here","by_variant"],"additionalProperties":false},"description":"Per sequence step: actions sent/failed/scheduled and leads waiting at the step."},"blocked":{"description":"Is it sending right now: the senders of this campaign that cannot act now, and why and until when, most severe first. Empty: every sender can act.","type":"array","items":{"type":"object","properties":{"sender_id":{"type":"string"},"cause":{"type":"string","enum":["frozen","disconnected","restricted","checkpoint","errored","connecting","removed","paused","outside_hours","limit","not_checked"],"description":"frozen: a freeze in force (`rule` says which). disconnected / restricted / checkpoint / errored / connecting / paused: the sender's status. outside_hours: its working hours. limit: today's or this week's cap for the kinds named. not_checked: the account safety check has not run, invitations wait."},"code":{"type":"string","description":"The guardrail code behind it (sender_frozen, outside_hours, daily_limit, …)."},"rule":{"description":"For a freeze: weekly_invites | daily_actions | pushback | pending_invites | disconnected | manual.","type":["string","null"]},"kinds":{"type":"array","items":{"type":"string"},"description":"['all'], or the action kinds that wait."},"until":{"description":"When it ends, when that is known.","type":["string","null"]},"reason":{"type":"string"},"by":{"description":"Who set a freeze: 'engine' (Relay's own rules) or an actor.","type":["string","null"]},"leads":{"type":"number","description":"Open leads of this campaign pinned to the sender."}},"required":["sender_id","cause","code","rule","kinds","until","reason","by","leads"],"additionalProperties":false}},"ready":{"type":"object","properties":{"can_start":{"type":"boolean"},"blockers":{"type":"array","items":{"type":"string"}},"sequence_problems":{"type":"array","items":{"type":"object","properties":{"node":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false},"description":"Every problem found, each a sentence to act on."}},"required":["can_start","blockers","sequence_problems"],"additionalProperties":false}},"required":["id","name","status","settings","sequence","sequence_version","sender_ids","senders","leads","steps","ready"],"additionalProperties":{},"description":"The full state of a campaign in one object."}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}}},"/v1/campaigns/{id}/pause":{"post":{"summary":"Pause","tags":["Campaigns"],"description":"Stops new actions at once; leads keep their place.\n\nRequires the `write` scope.\n\nAccepts an `Idempotency-Key` header.","parameters":[{"schema":{"type":"string","minLength":3,"maxLength":80},"in":"path","name":"id","required":true,"description":"Campaign id"},{"schema":{"type":"string","maxLength":200},"in":"header","name":"idempotency-key","required":false,"description":"Makes the request safe to retry: the same key returns the first response."}],"responses":{"200":{"description":"The full state of a campaign in one object.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"status":{"type":"string","enum":["draft","approved","active","paused","completed","archived"]},"settings":{"type":"object","properties":{"timezone":{"description":"Override the senders' time zones for this campaign.","type":"string"},"stop_on_reply":{"default":true,"description":"A reply from the lead (in any campaign) stops the lead here.","type":"boolean"},"exclude_in_other_campaigns":{"default":true,"description":"Skip leads that are active in another campaign of the workspace.","type":"boolean"},"exclude_contacted_before":{"default":true,"description":"Skip leads any sender of the workspace already messaged or invited.","type":"boolean"},"exclude_other_sender_conversations":{"default":true,"description":"Skip leads who already talk with another sender of the workspace.","type":"boolean"},"respect_blocklist":{"default":true,"type":"boolean"},"daily_new_leads":{"description":"Cap on leads started per day in this campaign.","type":"integer","minimum":1,"maximum":500},"approval":{"default":"required","description":"Per-lead drafts written by an API key (an agent): required = a person (or a key with the approve scope) approves each one before it can be sent; not_required = they are approved automatically once they pass the content checks. Only a workspace admin, in the app, can set not_required.","type":"string","enum":["required","not_required"]},"send_in_lead_timezone":{"default":false,"description":"Also respect the lead's local time: an action goes only when the sender's working hours hold both in the sender's time zone and in the lead's (lead time zone from their location, or set on the lead). Leads with no known time zone, or whose window never overlaps the sender's within a week, follow the sender's hours alone.","type":"boolean"}},"required":["stop_on_reply","exclude_in_other_campaigns","exclude_contacted_before","exclude_other_sender_conversations","respect_blocklist","approval","send_in_lead_timezone"],"additionalProperties":false,"description":"Campaign safety filters and schedule. The safety filters can only be turned off by a workspace admin in the app."},"sequence":{},"sequence_version":{"type":"number"},"sender_ids":{"type":"array","items":{"type":"string"}},"senders":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":["string","null"]},"status":{"type":"string"},"account_type":{"type":"string"}},"required":["id","name","status","account_type"],"additionalProperties":false}},"leads":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"},"description":"Lead counts: total and per state (pending, active, waiting, replied, finished, stopped, skipped, failed)."},"steps":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"sent":{"type":"number"},"failed":{"type":"number"},"scheduled":{"type":"number"},"skipped":{"type":"number"},"unknown":{"type":"number"},"waiting_here":{"type":"number"},"by_variant":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}},"waiting_reasons":{"description":"Leads at this step whose action is still to be done and whose sender cannot do it now, by sender and cause (largest first). Absent when none.","type":"array","items":{"type":"object","properties":{"sender_id":{"type":"string"},"cause":{"type":"string","enum":["frozen","disconnected","restricted","checkpoint","errored","connecting","removed","paused","outside_hours","limit","not_checked"],"description":"frozen: a freeze in force (`rule` says which). disconnected / restricted / checkpoint / errored / connecting / paused: the sender's status. outside_hours: its working hours. limit: today's or this week's cap for the kinds named. not_checked: the account safety check has not run, invitations wait."},"rule":{"type":["string","null"]},"until":{"type":["string","null"]},"n":{"type":"number"}},"required":["sender_id","cause","rule","until","n"],"additionalProperties":false}}},"required":["sent","failed","scheduled","skipped","unknown","waiting_here","by_variant"],"additionalProperties":false},"description":"Per sequence step: actions sent/failed/scheduled and leads waiting at the step."},"blocked":{"description":"Is it sending right now: the senders of this campaign that cannot act now, and why and until when, most severe first. Empty: every sender can act.","type":"array","items":{"type":"object","properties":{"sender_id":{"type":"string"},"cause":{"type":"string","enum":["frozen","disconnected","restricted","checkpoint","errored","connecting","removed","paused","outside_hours","limit","not_checked"],"description":"frozen: a freeze in force (`rule` says which). disconnected / restricted / checkpoint / errored / connecting / paused: the sender's status. outside_hours: its working hours. limit: today's or this week's cap for the kinds named. not_checked: the account safety check has not run, invitations wait."},"code":{"type":"string","description":"The guardrail code behind it (sender_frozen, outside_hours, daily_limit, …)."},"rule":{"description":"For a freeze: weekly_invites | daily_actions | pushback | pending_invites | disconnected | manual.","type":["string","null"]},"kinds":{"type":"array","items":{"type":"string"},"description":"['all'], or the action kinds that wait."},"until":{"description":"When it ends, when that is known.","type":["string","null"]},"reason":{"type":"string"},"by":{"description":"Who set a freeze: 'engine' (Relay's own rules) or an actor.","type":["string","null"]},"leads":{"type":"number","description":"Open leads of this campaign pinned to the sender."}},"required":["sender_id","cause","code","rule","kinds","until","reason","by","leads"],"additionalProperties":false}},"ready":{"type":"object","properties":{"can_start":{"type":"boolean"},"blockers":{"type":"array","items":{"type":"string"}},"sequence_problems":{"type":"array","items":{"type":"object","properties":{"node":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false},"description":"Every problem found, each a sentence to act on."}},"required":["can_start","blockers","sequence_problems"],"additionalProperties":false}},"required":["id","name","status","settings","sequence","sequence_version","sender_ids","senders","leads","steps","ready"],"additionalProperties":{},"description":"The full state of a campaign in one object."}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}}},"/v1/campaigns/{id}/resume":{"post":{"summary":"Resume a paused campaign","tags":["Campaigns"],"description":"Leads continue from where they were.\n\nRequires the `send` scope.\n\nAccepts an `Idempotency-Key` header.","parameters":[{"schema":{"type":"string","minLength":3,"maxLength":80},"in":"path","name":"id","required":true,"description":"Campaign id"},{"schema":{"type":"string","maxLength":200},"in":"header","name":"idempotency-key","required":false,"description":"Makes the request safe to retry: the same key returns the first response."}],"responses":{"200":{"description":"The full state of a campaign in one object.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"status":{"type":"string","enum":["draft","approved","active","paused","completed","archived"]},"settings":{"type":"object","properties":{"timezone":{"description":"Override the senders' time zones for this campaign.","type":"string"},"stop_on_reply":{"default":true,"description":"A reply from the lead (in any campaign) stops the lead here.","type":"boolean"},"exclude_in_other_campaigns":{"default":true,"description":"Skip leads that are active in another campaign of the workspace.","type":"boolean"},"exclude_contacted_before":{"default":true,"description":"Skip leads any sender of the workspace already messaged or invited.","type":"boolean"},"exclude_other_sender_conversations":{"default":true,"description":"Skip leads who already talk with another sender of the workspace.","type":"boolean"},"respect_blocklist":{"default":true,"type":"boolean"},"daily_new_leads":{"description":"Cap on leads started per day in this campaign.","type":"integer","minimum":1,"maximum":500},"approval":{"default":"required","description":"Per-lead drafts written by an API key (an agent): required = a person (or a key with the approve scope) approves each one before it can be sent; not_required = they are approved automatically once they pass the content checks. Only a workspace admin, in the app, can set not_required.","type":"string","enum":["required","not_required"]},"send_in_lead_timezone":{"default":false,"description":"Also respect the lead's local time: an action goes only when the sender's working hours hold both in the sender's time zone and in the lead's (lead time zone from their location, or set on the lead). Leads with no known time zone, or whose window never overlaps the sender's within a week, follow the sender's hours alone.","type":"boolean"}},"required":["stop_on_reply","exclude_in_other_campaigns","exclude_contacted_before","exclude_other_sender_conversations","respect_blocklist","approval","send_in_lead_timezone"],"additionalProperties":false,"description":"Campaign safety filters and schedule. The safety filters can only be turned off by a workspace admin in the app."},"sequence":{},"sequence_version":{"type":"number"},"sender_ids":{"type":"array","items":{"type":"string"}},"senders":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":["string","null"]},"status":{"type":"string"},"account_type":{"type":"string"}},"required":["id","name","status","account_type"],"additionalProperties":false}},"leads":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"},"description":"Lead counts: total and per state (pending, active, waiting, replied, finished, stopped, skipped, failed)."},"steps":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"sent":{"type":"number"},"failed":{"type":"number"},"scheduled":{"type":"number"},"skipped":{"type":"number"},"unknown":{"type":"number"},"waiting_here":{"type":"number"},"by_variant":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}},"waiting_reasons":{"description":"Leads at this step whose action is still to be done and whose sender cannot do it now, by sender and cause (largest first). Absent when none.","type":"array","items":{"type":"object","properties":{"sender_id":{"type":"string"},"cause":{"type":"string","enum":["frozen","disconnected","restricted","checkpoint","errored","connecting","removed","paused","outside_hours","limit","not_checked"],"description":"frozen: a freeze in force (`rule` says which). disconnected / restricted / checkpoint / errored / connecting / paused: the sender's status. outside_hours: its working hours. limit: today's or this week's cap for the kinds named. not_checked: the account safety check has not run, invitations wait."},"rule":{"type":["string","null"]},"until":{"type":["string","null"]},"n":{"type":"number"}},"required":["sender_id","cause","rule","until","n"],"additionalProperties":false}}},"required":["sent","failed","scheduled","skipped","unknown","waiting_here","by_variant"],"additionalProperties":false},"description":"Per sequence step: actions sent/failed/scheduled and leads waiting at the step."},"blocked":{"description":"Is it sending right now: the senders of this campaign that cannot act now, and why and until when, most severe first. Empty: every sender can act.","type":"array","items":{"type":"object","properties":{"sender_id":{"type":"string"},"cause":{"type":"string","enum":["frozen","disconnected","restricted","checkpoint","errored","connecting","removed","paused","outside_hours","limit","not_checked"],"description":"frozen: a freeze in force (`rule` says which). disconnected / restricted / checkpoint / errored / connecting / paused: the sender's status. outside_hours: its working hours. limit: today's or this week's cap for the kinds named. not_checked: the account safety check has not run, invitations wait."},"code":{"type":"string","description":"The guardrail code behind it (sender_frozen, outside_hours, daily_limit, …)."},"rule":{"description":"For a freeze: weekly_invites | daily_actions | pushback | pending_invites | disconnected | manual.","type":["string","null"]},"kinds":{"type":"array","items":{"type":"string"},"description":"['all'], or the action kinds that wait."},"until":{"description":"When it ends, when that is known.","type":["string","null"]},"reason":{"type":"string"},"by":{"description":"Who set a freeze: 'engine' (Relay's own rules) or an actor.","type":["string","null"]},"leads":{"type":"number","description":"Open leads of this campaign pinned to the sender."}},"required":["sender_id","cause","code","rule","kinds","until","reason","by","leads"],"additionalProperties":false}},"ready":{"type":"object","properties":{"can_start":{"type":"boolean"},"blockers":{"type":"array","items":{"type":"string"}},"sequence_problems":{"type":"array","items":{"type":"object","properties":{"node":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false},"description":"Every problem found, each a sentence to act on."}},"required":["can_start","blockers","sequence_problems"],"additionalProperties":false}},"required":["id","name","status","settings","sequence","sequence_version","sender_ids","senders","leads","steps","ready"],"additionalProperties":{},"description":"The full state of a campaign in one object."}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}}},"/v1/campaigns/{id}/archive":{"post":{"summary":"Archive","tags":["Campaigns"],"description":"Stops every lead and hides the campaign from the default list. Irreversible.\n\nRequires the `write` scope.\n\nAccepts an `Idempotency-Key` header.","parameters":[{"schema":{"type":"string","minLength":3,"maxLength":80},"in":"path","name":"id","required":true,"description":"Campaign id"},{"schema":{"type":"string","maxLength":200},"in":"header","name":"idempotency-key","required":false,"description":"Makes the request safe to retry: the same key returns the first response."}],"responses":{"200":{"description":"The full state of a campaign in one object.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"status":{"type":"string","enum":["draft","approved","active","paused","completed","archived"]},"settings":{"type":"object","properties":{"timezone":{"description":"Override the senders' time zones for this campaign.","type":"string"},"stop_on_reply":{"default":true,"description":"A reply from the lead (in any campaign) stops the lead here.","type":"boolean"},"exclude_in_other_campaigns":{"default":true,"description":"Skip leads that are active in another campaign of the workspace.","type":"boolean"},"exclude_contacted_before":{"default":true,"description":"Skip leads any sender of the workspace already messaged or invited.","type":"boolean"},"exclude_other_sender_conversations":{"default":true,"description":"Skip leads who already talk with another sender of the workspace.","type":"boolean"},"respect_blocklist":{"default":true,"type":"boolean"},"daily_new_leads":{"description":"Cap on leads started per day in this campaign.","type":"integer","minimum":1,"maximum":500},"approval":{"default":"required","description":"Per-lead drafts written by an API key (an agent): required = a person (or a key with the approve scope) approves each one before it can be sent; not_required = they are approved automatically once they pass the content checks. Only a workspace admin, in the app, can set not_required.","type":"string","enum":["required","not_required"]},"send_in_lead_timezone":{"default":false,"description":"Also respect the lead's local time: an action goes only when the sender's working hours hold both in the sender's time zone and in the lead's (lead time zone from their location, or set on the lead). Leads with no known time zone, or whose window never overlaps the sender's within a week, follow the sender's hours alone.","type":"boolean"}},"required":["stop_on_reply","exclude_in_other_campaigns","exclude_contacted_before","exclude_other_sender_conversations","respect_blocklist","approval","send_in_lead_timezone"],"additionalProperties":false,"description":"Campaign safety filters and schedule. The safety filters can only be turned off by a workspace admin in the app."},"sequence":{},"sequence_version":{"type":"number"},"sender_ids":{"type":"array","items":{"type":"string"}},"senders":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":["string","null"]},"status":{"type":"string"},"account_type":{"type":"string"}},"required":["id","name","status","account_type"],"additionalProperties":false}},"leads":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"},"description":"Lead counts: total and per state (pending, active, waiting, replied, finished, stopped, skipped, failed)."},"steps":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"sent":{"type":"number"},"failed":{"type":"number"},"scheduled":{"type":"number"},"skipped":{"type":"number"},"unknown":{"type":"number"},"waiting_here":{"type":"number"},"by_variant":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}},"waiting_reasons":{"description":"Leads at this step whose action is still to be done and whose sender cannot do it now, by sender and cause (largest first). Absent when none.","type":"array","items":{"type":"object","properties":{"sender_id":{"type":"string"},"cause":{"type":"string","enum":["frozen","disconnected","restricted","checkpoint","errored","connecting","removed","paused","outside_hours","limit","not_checked"],"description":"frozen: a freeze in force (`rule` says which). disconnected / restricted / checkpoint / errored / connecting / paused: the sender's status. outside_hours: its working hours. limit: today's or this week's cap for the kinds named. not_checked: the account safety check has not run, invitations wait."},"rule":{"type":["string","null"]},"until":{"type":["string","null"]},"n":{"type":"number"}},"required":["sender_id","cause","rule","until","n"],"additionalProperties":false}}},"required":["sent","failed","scheduled","skipped","unknown","waiting_here","by_variant"],"additionalProperties":false},"description":"Per sequence step: actions sent/failed/scheduled and leads waiting at the step."},"blocked":{"description":"Is it sending right now: the senders of this campaign that cannot act now, and why and until when, most severe first. Empty: every sender can act.","type":"array","items":{"type":"object","properties":{"sender_id":{"type":"string"},"cause":{"type":"string","enum":["frozen","disconnected","restricted","checkpoint","errored","connecting","removed","paused","outside_hours","limit","not_checked"],"description":"frozen: a freeze in force (`rule` says which). disconnected / restricted / checkpoint / errored / connecting / paused: the sender's status. outside_hours: its working hours. limit: today's or this week's cap for the kinds named. not_checked: the account safety check has not run, invitations wait."},"code":{"type":"string","description":"The guardrail code behind it (sender_frozen, outside_hours, daily_limit, …)."},"rule":{"description":"For a freeze: weekly_invites | daily_actions | pushback | pending_invites | disconnected | manual.","type":["string","null"]},"kinds":{"type":"array","items":{"type":"string"},"description":"['all'], or the action kinds that wait."},"until":{"description":"When it ends, when that is known.","type":["string","null"]},"reason":{"type":"string"},"by":{"description":"Who set a freeze: 'engine' (Relay's own rules) or an actor.","type":["string","null"]},"leads":{"type":"number","description":"Open leads of this campaign pinned to the sender."}},"required":["sender_id","cause","code","rule","kinds","until","reason","by","leads"],"additionalProperties":false}},"ready":{"type":"object","properties":{"can_start":{"type":"boolean"},"blockers":{"type":"array","items":{"type":"string"}},"sequence_problems":{"type":"array","items":{"type":"object","properties":{"node":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false},"description":"Every problem found, each a sentence to act on."}},"required":["can_start","blockers","sequence_problems"],"additionalProperties":false}},"required":["id","name","status","settings","sequence","sequence_version","sender_ids","senders","leads","steps","ready"],"additionalProperties":{},"description":"The full state of a campaign in one object."}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}}},"/v1/drafts":{"get":{"summary":"Drafts, with the lead beside the text (the approval queue)","tags":["Drafts & approvals"],"description":"Default: the drafts waiting for a decision: first those whose lead already waits at the step (`due`), then the rest, each oldest first. status=approved|rejected|sent looks back, newest first. `counts.pending` is the size of the queue (of the campaign, with campaign_id).\n\nRequires the `read` scope.","parameters":[{"schema":{"type":"string","enum":["pending","approved","rejected","sent","superseded"]},"in":"query","name":"status","required":false,"description":"Default pending."},{"schema":{"type":"string"},"in":"query","name":"campaign_id","required":false},{"schema":{"type":"string"},"in":"query","name":"node","required":false,"description":"Only this step."},{"schema":{"type":"string"},"in":"query","name":"lead_id","required":false},{"schema":{"type":"integer","minimum":1,"maximum":100},"in":"query","name":"limit","required":false,"description":"Page size (default 50, max 100)."},{"schema":{"type":"string","maxLength":200},"in":"query","name":"cursor","required":false,"description":"Pass next_cursor from the previous page."}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"campaign_id":{"type":"string"},"campaign_name":{"type":"string"},"campaign_lead_id":{"type":"string"},"lead_id":{"type":"string"},"node":{"type":"string"},"step_label":{"type":"string"},"kind":{"type":"string","enum":["invite","message","inmail"]},"body":{"type":"string"},"subject":{"type":["string","null"]},"characters":{"type":"number"},"max_characters":{"type":"number"},"status":{"type":"string","enum":["pending","approved","rejected","sent","superseded"],"description":"pending (waits for a decision) · approved (goes out when the lead reaches the step) · rejected · sent · superseded (replaced by a newer draft)."},"written_by":{"type":"string","description":"key:<prefix> | mcp:<prefix> | user:<id>"},"written_by_name":{"type":["string","null"]},"written_by_kind":{"type":"string","enum":["key","user"]},"created_at":{"type":"string"},"original_body":{"description":"What was first written, kept when a person edited the draft.","type":["string","null"]},"original_subject":{"type":["string","null"]},"edited_by":{"type":["string","null"]},"edited_by_name":{"type":["string","null"]},"edited_at":{"type":["string","null"]},"decided_by":{"type":["string","null"]},"decided_by_name":{"type":["string","null"]},"decided_at":{"type":["string","null"]},"decision_note":{"type":["string","null"]},"auto_approved":{"type":"boolean","description":"Approved without a separate decision: written by a person, or the campaign's approval is not_required."},"sent_at":{"type":["string","null"]},"lead":{"type":"object","properties":{"id":{"type":"string"},"first_name":{"type":["string","null"]},"last_name":{"type":["string","null"]},"headline":{"type":["string","null"]},"title":{"type":["string","null"]},"company":{"type":["string","null"]},"location":{"type":["string","null"]},"profile_url":{"type":["string","null"]}},"required":["id","first_name","last_name","headline","title","company","location","profile_url"],"additionalProperties":false},"lead_state":{"type":"string"},"due":{"type":"boolean","description":"The lead stands at this step now."},"can_approve":{"type":"boolean","description":"false for the key that wrote the draft, and without the approve scope."},"cannot_approve_reason":{"anyOf":[{"type":"string","enum":["no_approve_scope","own_draft"]},{"type":"null"}],"description":"Why a pending draft cannot be approved by this caller."}},"required":["id","campaign_id","campaign_name","campaign_lead_id","lead_id","node","step_label","kind","body","subject","characters","max_characters","status","written_by","written_by_name","written_by_kind","created_at","original_body","original_subject","edited_by","edited_by_name","edited_at","decided_by","decided_by_name","decided_at","decision_note","auto_approved","sent_at","lead","lead_state","due","can_approve","cannot_approve_reason"],"additionalProperties":{},"description":"The text one lead gets at one step, with who wrote and decided it."}},"next_cursor":{"type":["string","null"]},"counts":{"type":"object","properties":{"pending":{"type":"number"}},"required":["pending"],"additionalProperties":false}},"required":["data","next_cursor","counts"],"additionalProperties":false}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}}},"/v1/drafts/summary":{"get":{"summary":"How many drafts wait for a decision","tags":["Drafts & approvals"],"description":"Requires the `read` scope.","parameters":[{"schema":{"type":"string"},"in":"query","name":"campaign_id","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"pending":{"type":"number"}},"required":["pending"],"additionalProperties":false}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}}},"/v1/drafts/{id}":{"get":{"summary":"One draft","tags":["Drafts & approvals"],"description":"Requires the `read` scope.","parameters":[{"schema":{"type":"string","minLength":3,"maxLength":80},"in":"path","name":"id","required":true,"description":"Draft id"}],"responses":{"200":{"description":"The text one lead gets at one step, with who wrote and decided it.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"campaign_id":{"type":"string"},"campaign_name":{"type":"string"},"campaign_lead_id":{"type":"string"},"lead_id":{"type":"string"},"node":{"type":"string"},"step_label":{"type":"string"},"kind":{"type":"string","enum":["invite","message","inmail"]},"body":{"type":"string"},"subject":{"type":["string","null"]},"characters":{"type":"number"},"max_characters":{"type":"number"},"status":{"type":"string","enum":["pending","approved","rejected","sent","superseded"],"description":"pending (waits for a decision) · approved (goes out when the lead reaches the step) · rejected · sent · superseded (replaced by a newer draft)."},"written_by":{"type":"string","description":"key:<prefix> | mcp:<prefix> | user:<id>"},"written_by_name":{"type":["string","null"]},"written_by_kind":{"type":"string","enum":["key","user"]},"created_at":{"type":"string"},"original_body":{"description":"What was first written, kept when a person edited the draft.","type":["string","null"]},"original_subject":{"type":["string","null"]},"edited_by":{"type":["string","null"]},"edited_by_name":{"type":["string","null"]},"edited_at":{"type":["string","null"]},"decided_by":{"type":["string","null"]},"decided_by_name":{"type":["string","null"]},"decided_at":{"type":["string","null"]},"decision_note":{"type":["string","null"]},"auto_approved":{"type":"boolean","description":"Approved without a separate decision: written by a person, or the campaign's approval is not_required."},"sent_at":{"type":["string","null"]},"lead":{"type":"object","properties":{"id":{"type":"string"},"first_name":{"type":["string","null"]},"last_name":{"type":["string","null"]},"headline":{"type":["string","null"]},"title":{"type":["string","null"]},"company":{"type":["string","null"]},"location":{"type":["string","null"]},"profile_url":{"type":["string","null"]}},"required":["id","first_name","last_name","headline","title","company","location","profile_url"],"additionalProperties":false},"lead_state":{"type":"string"},"due":{"type":"boolean","description":"The lead stands at this step now."},"can_approve":{"type":"boolean","description":"false for the key that wrote the draft, and without the approve scope."},"cannot_approve_reason":{"anyOf":[{"type":"string","enum":["no_approve_scope","own_draft"]},{"type":"null"}],"description":"Why a pending draft cannot be approved by this caller."}},"required":["id","campaign_id","campaign_name","campaign_lead_id","lead_id","node","step_label","kind","body","subject","characters","max_characters","status","written_by","written_by_name","written_by_kind","created_at","original_body","original_subject","edited_by","edited_by_name","edited_at","decided_by","decided_by_name","decided_at","decision_note","auto_approved","sent_at","lead","lead_state","due","can_approve","cannot_approve_reason"],"additionalProperties":{},"description":"The text one lead gets at one step, with who wrote and decided it."}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}},"patch":{"summary":"Edit a draft without deciding (people only)","tags":["Drafts & approvals"],"description":"The text first written is kept as original_body. The same content checks apply.\n\nRequires the `approve` scope.\n\nAccepts an `Idempotency-Key` header.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"body":{"type":"string","minLength":1,"maxLength":8000,"description":"The exact text the lead gets: no variables, no spintax. Invitation notes up to 300 characters, messages and InMails up to 8000."},"subject":{"description":"InMail steps only.","type":"string","maxLength":200}}}}}},"parameters":[{"schema":{"type":"string","minLength":3,"maxLength":80},"in":"path","name":"id","required":true,"description":"Draft id"},{"schema":{"type":"string","maxLength":200},"in":"header","name":"idempotency-key","required":false,"description":"Makes the request safe to retry: the same key returns the first response."}],"responses":{"200":{"description":"The text one lead gets at one step, with who wrote and decided it.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"campaign_id":{"type":"string"},"campaign_name":{"type":"string"},"campaign_lead_id":{"type":"string"},"lead_id":{"type":"string"},"node":{"type":"string"},"step_label":{"type":"string"},"kind":{"type":"string","enum":["invite","message","inmail"]},"body":{"type":"string"},"subject":{"type":["string","null"]},"characters":{"type":"number"},"max_characters":{"type":"number"},"status":{"type":"string","enum":["pending","approved","rejected","sent","superseded"],"description":"pending (waits for a decision) · approved (goes out when the lead reaches the step) · rejected · sent · superseded (replaced by a newer draft)."},"written_by":{"type":"string","description":"key:<prefix> | mcp:<prefix> | user:<id>"},"written_by_name":{"type":["string","null"]},"written_by_kind":{"type":"string","enum":["key","user"]},"created_at":{"type":"string"},"original_body":{"description":"What was first written, kept when a person edited the draft.","type":["string","null"]},"original_subject":{"type":["string","null"]},"edited_by":{"type":["string","null"]},"edited_by_name":{"type":["string","null"]},"edited_at":{"type":["string","null"]},"decided_by":{"type":["string","null"]},"decided_by_name":{"type":["string","null"]},"decided_at":{"type":["string","null"]},"decision_note":{"type":["string","null"]},"auto_approved":{"type":"boolean","description":"Approved without a separate decision: written by a person, or the campaign's approval is not_required."},"sent_at":{"type":["string","null"]},"lead":{"type":"object","properties":{"id":{"type":"string"},"first_name":{"type":["string","null"]},"last_name":{"type":["string","null"]},"headline":{"type":["string","null"]},"title":{"type":["string","null"]},"company":{"type":["string","null"]},"location":{"type":["string","null"]},"profile_url":{"type":["string","null"]}},"required":["id","first_name","last_name","headline","title","company","location","profile_url"],"additionalProperties":false},"lead_state":{"type":"string"},"due":{"type":"boolean","description":"The lead stands at this step now."},"can_approve":{"type":"boolean","description":"false for the key that wrote the draft, and without the approve scope."},"cannot_approve_reason":{"anyOf":[{"type":"string","enum":["no_approve_scope","own_draft"]},{"type":"null"}],"description":"Why a pending draft cannot be approved by this caller."}},"required":["id","campaign_id","campaign_name","campaign_lead_id","lead_id","node","step_label","kind","body","subject","characters","max_characters","status","written_by","written_by_name","written_by_kind","created_at","original_body","original_subject","edited_by","edited_by_name","edited_at","decided_by","decided_by_name","decided_at","decision_note","auto_approved","sent_at","lead","lead_state","due","can_approve","cannot_approve_reason"],"additionalProperties":{},"description":"The text one lead gets at one step, with who wrote and decided it."}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}}},"/v1/campaigns/{id}/drafts/needed":{"get":{"summary":"Leads that need a draft, with their context","tags":["Drafts & approvals"],"description":"For the steps of the campaign that take their text per lead from a draft (`draft` on the step): every lead still in the campaign that has not had the step and has no draft waiting or approved, with profile fields, tags, custom fields, the earlier messages of the thread and the last rejected draft with its note. `due` marks leads standing at the step now; due_only=true leaves out leads who may never reach it.\n\nRequires the `read` scope.","parameters":[{"schema":{"type":"string"},"in":"query","name":"node","required":false,"description":"Only this step (default: every step that takes drafts)."},{"schema":{"type":"string","enum":["true","false"]},"in":"query","name":"due_only","required":false},{"schema":{"type":"integer","minimum":1,"maximum":50},"in":"query","name":"limit","required":false,"description":"Page size (default 20, max 50)."},{"schema":{"type":"string","maxLength":200},"in":"query","name":"cursor","required":false,"description":"Pass next_cursor from the previous page."},{"schema":{"type":"string","minLength":3,"maxLength":80},"in":"path","name":"id","required":true,"description":"Campaign id"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}}},"/v1/campaigns/{id}/drafts":{"post":{"summary":"Write the draft for one lead at one step","tags":["Drafts & approvals"],"description":"Replaces the lead's live draft at that step (approval starts again). Checked on the server, and again just before it is sent: length for the step's kind, not empty, no unresolved placeholder, not for a do-not-contact lead, and the same text (the lead's own name and company aside) for at most 3 leads of a campaign; a refusal is 422 draft_invalid with every problem. Written by an API key: `pending` until a person, or a different key with the approve scope, approves it (unless a workspace admin set the campaign's approval to not_required). Written by a person: approved on save. A key writes at most 300 drafts a day by default (429 budget_exceeded with resets_at). dry_run=true checks without saving.\n\nRequires the `write` scope.\n\nAccepts an `Idempotency-Key` header.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"lead_id":{"type":"string"},"node":{"type":"string","description":"The step id; it must have `draft`."},"body":{"type":"string","minLength":1,"maxLength":8000,"description":"The exact text the lead gets: no variables, no spintax. Invitation notes up to 300 characters, messages and InMails up to 8000."},"subject":{"description":"InMail steps only.","type":"string","maxLength":200},"dry_run":{"description":"Check only: nothing is saved or counted.","type":"boolean"}},"required":["lead_id","node","body"]}}}},"parameters":[{"schema":{"type":"string","minLength":3,"maxLength":80},"in":"path","name":"id","required":true,"description":"Campaign id"},{"schema":{"type":"string","maxLength":200},"in":"header","name":"idempotency-key","required":false,"description":"Makes the request safe to retry: the same key returns the first response."}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}}},"/v1/drafts/{id}/approve":{"post":{"summary":"Approve a draft","tags":["Drafts & approvals"],"description":"Needs the `approve` scope: people who are members or admins of the workspace have it; an API key only when it was created with it (no key has it by default). A key can never approve a draft the same key wrote. With `body` (people only) the draft is approved with that edit.\n\nRequires the `approve` scope.\n\nAccepts an `Idempotency-Key` header.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"body":{"type":"string","minLength":1,"maxLength":8000,"description":"The exact text the lead gets: no variables, no spintax. Invitation notes up to 300 characters, messages and InMails up to 8000."},"subject":{"description":"InMail steps only.","type":"string","maxLength":200}}}}}},"parameters":[{"schema":{"type":"string","minLength":3,"maxLength":80},"in":"path","name":"id","required":true,"description":"Draft id"},{"schema":{"type":"string","maxLength":200},"in":"header","name":"idempotency-key","required":false,"description":"Makes the request safe to retry: the same key returns the first response."}],"responses":{"200":{"description":"The text one lead gets at one step, with who wrote and decided it.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"campaign_id":{"type":"string"},"campaign_name":{"type":"string"},"campaign_lead_id":{"type":"string"},"lead_id":{"type":"string"},"node":{"type":"string"},"step_label":{"type":"string"},"kind":{"type":"string","enum":["invite","message","inmail"]},"body":{"type":"string"},"subject":{"type":["string","null"]},"characters":{"type":"number"},"max_characters":{"type":"number"},"status":{"type":"string","enum":["pending","approved","rejected","sent","superseded"],"description":"pending (waits for a decision) · approved (goes out when the lead reaches the step) · rejected · sent · superseded (replaced by a newer draft)."},"written_by":{"type":"string","description":"key:<prefix> | mcp:<prefix> | user:<id>"},"written_by_name":{"type":["string","null"]},"written_by_kind":{"type":"string","enum":["key","user"]},"created_at":{"type":"string"},"original_body":{"description":"What was first written, kept when a person edited the draft.","type":["string","null"]},"original_subject":{"type":["string","null"]},"edited_by":{"type":["string","null"]},"edited_by_name":{"type":["string","null"]},"edited_at":{"type":["string","null"]},"decided_by":{"type":["string","null"]},"decided_by_name":{"type":["string","null"]},"decided_at":{"type":["string","null"]},"decision_note":{"type":["string","null"]},"auto_approved":{"type":"boolean","description":"Approved without a separate decision: written by a person, or the campaign's approval is not_required."},"sent_at":{"type":["string","null"]},"lead":{"type":"object","properties":{"id":{"type":"string"},"first_name":{"type":["string","null"]},"last_name":{"type":["string","null"]},"headline":{"type":["string","null"]},"title":{"type":["string","null"]},"company":{"type":["string","null"]},"location":{"type":["string","null"]},"profile_url":{"type":["string","null"]}},"required":["id","first_name","last_name","headline","title","company","location","profile_url"],"additionalProperties":false},"lead_state":{"type":"string"},"due":{"type":"boolean","description":"The lead stands at this step now."},"can_approve":{"type":"boolean","description":"false for the key that wrote the draft, and without the approve scope."},"cannot_approve_reason":{"anyOf":[{"type":"string","enum":["no_approve_scope","own_draft"]},{"type":"null"}],"description":"Why a pending draft cannot be approved by this caller."}},"required":["id","campaign_id","campaign_name","campaign_lead_id","lead_id","node","step_label","kind","body","subject","characters","max_characters","status","written_by","written_by_name","written_by_kind","created_at","original_body","original_subject","edited_by","edited_by_name","edited_at","decided_by","decided_by_name","decided_at","decision_note","auto_approved","sent_at","lead","lead_state","due","can_approve","cannot_approve_reason"],"additionalProperties":{},"description":"The text one lead gets at one step, with who wrote and decided it."}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}}},"/v1/drafts/{id}/reject":{"post":{"summary":"Reject a draft","tags":["Drafts & approvals"],"description":"Also takes back an approved draft that has not been sent. The lead waits at the step for a new draft; the note is shown to whoever writes it.\n\nRequires the `approve` scope.\n\nAccepts an `Idempotency-Key` header.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"note":{"type":"string","maxLength":1000}}}}}},"parameters":[{"schema":{"type":"string","minLength":3,"maxLength":80},"in":"path","name":"id","required":true,"description":"Draft id"},{"schema":{"type":"string","maxLength":200},"in":"header","name":"idempotency-key","required":false,"description":"Makes the request safe to retry: the same key returns the first response."}],"responses":{"200":{"description":"The text one lead gets at one step, with who wrote and decided it.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"campaign_id":{"type":"string"},"campaign_name":{"type":"string"},"campaign_lead_id":{"type":"string"},"lead_id":{"type":"string"},"node":{"type":"string"},"step_label":{"type":"string"},"kind":{"type":"string","enum":["invite","message","inmail"]},"body":{"type":"string"},"subject":{"type":["string","null"]},"characters":{"type":"number"},"max_characters":{"type":"number"},"status":{"type":"string","enum":["pending","approved","rejected","sent","superseded"],"description":"pending (waits for a decision) · approved (goes out when the lead reaches the step) · rejected · sent · superseded (replaced by a newer draft)."},"written_by":{"type":"string","description":"key:<prefix> | mcp:<prefix> | user:<id>"},"written_by_name":{"type":["string","null"]},"written_by_kind":{"type":"string","enum":["key","user"]},"created_at":{"type":"string"},"original_body":{"description":"What was first written, kept when a person edited the draft.","type":["string","null"]},"original_subject":{"type":["string","null"]},"edited_by":{"type":["string","null"]},"edited_by_name":{"type":["string","null"]},"edited_at":{"type":["string","null"]},"decided_by":{"type":["string","null"]},"decided_by_name":{"type":["string","null"]},"decided_at":{"type":["string","null"]},"decision_note":{"type":["string","null"]},"auto_approved":{"type":"boolean","description":"Approved without a separate decision: written by a person, or the campaign's approval is not_required."},"sent_at":{"type":["string","null"]},"lead":{"type":"object","properties":{"id":{"type":"string"},"first_name":{"type":["string","null"]},"last_name":{"type":["string","null"]},"headline":{"type":["string","null"]},"title":{"type":["string","null"]},"company":{"type":["string","null"]},"location":{"type":["string","null"]},"profile_url":{"type":["string","null"]}},"required":["id","first_name","last_name","headline","title","company","location","profile_url"],"additionalProperties":false},"lead_state":{"type":"string"},"due":{"type":"boolean","description":"The lead stands at this step now."},"can_approve":{"type":"boolean","description":"false for the key that wrote the draft, and without the approve scope."},"cannot_approve_reason":{"anyOf":[{"type":"string","enum":["no_approve_scope","own_draft"]},{"type":"null"}],"description":"Why a pending draft cannot be approved by this caller."}},"required":["id","campaign_id","campaign_name","campaign_lead_id","lead_id","node","step_label","kind","body","subject","characters","max_characters","status","written_by","written_by_name","written_by_kind","created_at","original_body","original_subject","edited_by","edited_by_name","edited_at","decided_by","decided_by_name","decided_at","decision_note","auto_approved","sent_at","lead","lead_state","due","can_approve","cannot_approve_reason"],"additionalProperties":{},"description":"The text one lead gets at one step, with who wrote and decided it."}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}}},"/v1/drafts/bulk":{"post":{"summary":"Approve or reject several drafts","tags":["Drafts & approvals"],"description":"By id only (at most 100): the drafts the caller was shown. Each is decided on its own; `results` says which went through.\n\nRequires the `approve` scope.\n\nAccepts an `Idempotency-Key` header.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"action":{"type":"string","enum":["approve","reject"]},"ids":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string"}},"note":{"type":"string","maxLength":1000}},"required":["action","ids"]}}}},"parameters":[{"schema":{"type":"string","maxLength":200},"in":"header","name":"idempotency-key","required":false,"description":"Makes the request safe to retry: the same key returns the first response."}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}}},"/v1/audit":{"get":{"summary":"The audit trail (workspace admins)","tags":["Workspace"],"description":"Newest first: drafts written, edited, approved and rejected, budget refusals, and refused attempts by a key to loosen a sender or approve its own draft. Each row names the actor (user:<id>, key:<prefix>, mcp:<prefix>, engine) and, for a key, its key id.\n\nRequires the `read` scope.","parameters":[{"schema":{"type":"string","maxLength":60},"in":"query","name":"action","required":false,"description":"An action or its family, e.g. draft or budget.refused."},{"schema":{"type":"string","maxLength":120},"in":"query","name":"actor","required":false},{"schema":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"in":"query","name":"before","required":false,"description":"next_before from the previous page."},{"schema":{"type":"integer","minimum":1,"maximum":200},"in":"query","name":"limit","required":false,"description":"Page size (default 50, max 200)."}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}}},"/v1/conversations":{"get":{"summary":"Conversations across all senders (unibox)","tags":["Inbox"],"description":"Newest activity first. awaiting_reply=true: the last message is from the lead.\n\nRequires the `read` scope.","parameters":[{"schema":{"type":"string"},"in":"query","name":"sender_id","required":false},{"schema":{"type":"string"},"in":"query","name":"campaign_id","required":false},{"schema":{"type":"string"},"in":"query","name":"lead_id","required":false},{"schema":{"type":"string","enum":["true","false"]},"in":"query","name":"unread","required":false},{"schema":{"type":"string"},"in":"query","name":"label","required":false},{"schema":{"type":"string","enum":["true","false"]},"in":"query","name":"archived","required":false},{"schema":{"type":"string","enum":["true","false"]},"in":"query","name":"awaiting_reply","required":false},{"schema":{"type":"string","maxLength":200},"in":"query","name":"search","required":false},{"schema":{"type":"integer","minimum":1,"maximum":100},"in":"query","name":"limit","required":false,"description":"Page size (default 30, max 100)."},{"schema":{"type":"string","maxLength":200},"in":"query","name":"cursor","required":false,"description":"Pass next_cursor from the previous page."}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}}},"/v1/conversations/{id}":{"get":{"summary":"A conversation with its messages and queued replies","tags":["Inbox"],"description":"Requires the `read` scope.","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":200},"in":"query","name":"limit","required":false,"description":"Page size (default 50, max 200)."},{"schema":{"type":"string","minLength":3,"maxLength":80},"in":"path","name":"id","required":true,"description":"Conversation id"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}},"patch":{"summary":"Label or archive a conversation","tags":["Inbox"],"description":"Requires the `write` scope.\n\nAccepts an `Idempotency-Key` header.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"labels":{"maxItems":20,"type":"array","items":{"type":"string","maxLength":60}},"archived":{"type":"boolean"}}}}}},"parameters":[{"schema":{"type":"string","minLength":3,"maxLength":80},"in":"path","name":"id","required":true,"description":"Conversation id"},{"schema":{"type":"string","maxLength":200},"in":"header","name":"idempotency-key","required":false,"description":"Makes the request safe to retry: the same key returns the first response."}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}}},"/v1/conversations/{id}/reply":{"post":{"summary":"Send a reply","tags":["Inbox"],"description":"Queued and sent by the engine within about a minute, inside the sender's daily message limit. With an Idempotency-Key the same reply is never sent twice.\n\nRequires the `send` scope.\n\nAccepts an `Idempotency-Key` header.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":8000}},"required":["text"]}}}},"parameters":[{"schema":{"type":"string","minLength":3,"maxLength":80},"in":"path","name":"id","required":true,"description":"Conversation id"},{"schema":{"type":"string","maxLength":200},"in":"header","name":"idempotency-key","required":false,"description":"Makes the request safe to retry: the same key returns the first response."}],"responses":{"202":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}}},"/v1/conversations/{id}/read":{"post":{"summary":"Mark read","tags":["Inbox"],"description":"Requires the `write` scope.\n\nAccepts an `Idempotency-Key` header.","parameters":[{"schema":{"type":"string","minLength":3,"maxLength":80},"in":"path","name":"id","required":true,"description":"Conversation id"},{"schema":{"type":"string","maxLength":200},"in":"header","name":"idempotency-key","required":false,"description":"Makes the request safe to retry: the same key returns the first response."}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}}},"/v1/stats":{"get":{"summary":"Outreach numbers, optionally grouped","tags":["Analytics"],"description":"Totals for the window, filtered by campaign (campaign_id, or a comma-separated campaign_ids list) or sender; group_by=day|sender|campaign|step|variant adds a breakdown (day includes empty days). groups[] = {key, ...the totals fields}, sorted by key; key is the day, sender id, campaign id (\"(none)\" for events outside a campaign), step id or step:variant. Only keys with events appear (except days). Totals include contacted (first outreach in the window) and interested (leads with an interested reply). Per-variant numbers make A/B tests readable.\n\nRequires the `read` scope.","parameters":[{"schema":{"type":"string"},"in":"query","name":"from","required":false,"description":"ISO date or datetime (default: 30 days ago)."},{"schema":{"type":"string"},"in":"query","name":"to","required":false,"description":"ISO date or datetime (default: now)."},{"schema":{"type":"string"},"in":"query","name":"campaign_id","required":false,"description":"Only this campaign."},{"schema":{"type":"string"},"in":"query","name":"campaign_ids","required":false,"description":"Comma-separated campaign ids: totals and groups cover only these campaigns (combines with campaign_id)."},{"schema":{"type":"string"},"in":"query","name":"sender_id","required":false},{"schema":{"type":"string","enum":["day","sender","campaign","step","variant"]},"in":"query","name":"group_by","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"},"totals":{"type":"object","properties":{"invites_sent":{"type":"number"},"invites_accepted":{"type":"number"},"invites_withdrawn":{"type":"number"},"messages_sent":{"type":"number"},"inmails_sent":{"type":"number"},"replies":{"type":"number"},"profile_views":{"type":"number"},"follows":{"type":"number"},"likes":{"type":"number"},"endorsements":{"type":"number"},"leads_enrolled":{"type":"number"},"leads_finished":{"type":"number"},"contacted":{"type":"number","description":"Leads whose first outreach (invite, message or InMail; hand-typed inbox replies excluded) fell in the window, within the campaign/sender filter."},"interested":{"type":"number","description":"Leads with a reply classified interested (tag auto:interested) in the window, counted once per lead."},"acceptance_rate":{"description":"Percent: accepted / invites sent.","type":["number","null"]},"reply_rate":{"description":"Percent: replies / (messages + InMails sent), or / invites when no messages yet.","type":["number","null"]}},"required":["invites_sent","invites_accepted","invites_withdrawn","messages_sent","inmails_sent","replies","profile_views","follows","likes","endorsements","leads_enrolled","leads_finished","contacted","interested","acceptance_rate","reply_rate"],"additionalProperties":false},"group_by":{"type":"string"},"groups":{"type":"array","items":{"type":"object","properties":{"invites_sent":{"type":"number"},"invites_accepted":{"type":"number"},"invites_withdrawn":{"type":"number"},"messages_sent":{"type":"number"},"inmails_sent":{"type":"number"},"replies":{"type":"number"},"profile_views":{"type":"number"},"follows":{"type":"number"},"likes":{"type":"number"},"endorsements":{"type":"number"},"leads_enrolled":{"type":"number"},"leads_finished":{"type":"number"},"contacted":{"type":"number","description":"Leads whose first outreach (invite, message or InMail; hand-typed inbox replies excluded) fell in the window, within the campaign/sender filter."},"interested":{"type":"number","description":"Leads with a reply classified interested (tag auto:interested) in the window, counted once per lead."},"acceptance_rate":{"description":"Percent: accepted / invites sent.","type":["number","null"]},"reply_rate":{"description":"Percent: replies / (messages + InMails sent), or / invites when no messages yet.","type":["number","null"]},"key":{"type":"string"}},"required":["invites_sent","invites_accepted","invites_withdrawn","messages_sent","inmails_sent","replies","profile_views","follows","likes","endorsements","leads_enrolled","leads_finished","contacted","interested","acceptance_rate","reply_rate","key"],"additionalProperties":{}}}},"required":["from","to","totals"],"additionalProperties":{}}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}}},"/v1/pipeline":{"get":{"summary":"Leads by how far they got: invited → connected → messaged → replied → interested → call booked","tags":["Analytics"],"description":"Each lead sits in the furthest stage it reached: invited (invitation pending), connected (accepted, nothing messaged yet), messaged (no reply yet), replied, interested (reply classified interested, or the conversation is labelled \"interested\"), booked (a conversation is labelled \"meeting_booked\"). A lead is in the window when its first outreach fell in it (default: the last 90 days). Per stage: count, reached (this stage or later), conversion (% of the previous stage that reached this one) and the newest cards (who, title and company, the sender, the campaign, the step, and the last reply for replied/interested/booked). For more cards of one stage pass stage and offset=next_offset. Withdrawn invitations that were never accepted leave the board (`withdrawn` counts them). Mark a booked call with PATCH /v1/conversations/:id {labels:[…,\"meeting_booked\"]}.\n\nRequires the `read` scope.","parameters":[{"schema":{"type":"string"},"in":"query","name":"from","required":false,"description":"ISO date (default: 90 days ago)."},{"schema":{"type":"string"},"in":"query","name":"to","required":false,"description":"ISO date (default: now)."},{"schema":{"type":"string"},"in":"query","name":"campaign_ids","required":false,"description":"Comma-separated campaign ids: only these campaigns."},{"schema":{"type":"string"},"in":"query","name":"sender_id","required":false,"description":"Only this sender."},{"schema":{"type":"string","enum":["invited","connected","messaged","replied","interested","booked"]},"in":"query","name":"stage","required":false,"description":"Only this stage (for paging with offset)."},{"schema":{"type":"integer","minimum":0,"maximum":100000},"in":"query","name":"offset","required":false,"description":"Skip this many cards in the stage (next_offset from the previous answer)."},{"schema":{"type":"integer","minimum":1,"maximum":100},"in":"query","name":"limit","required":false,"description":"Cards per stage (default 8, max 100)."}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}}},"/v1/activity":{"get":{"summary":"Recent activity, newest first (for a live feed)","tags":["Analytics"],"description":"What happened lately, newest first, with names resolved: invites sent and accepted, messages and InMails, replies (with their classification and the first 200 characters), profile visits, accounts connecting, resting and coming back, campaigns starting, pausing and finishing, A/B winners. Default: the last 24 hours. Page back with before=next_before. For a complete, gap-free stream use GET /v1/events instead.\n\nRequires the `read` scope.","parameters":[{"schema":{"type":"string"},"in":"query","name":"since","required":false,"description":"ISO datetime (default: 24 hours ago)."},{"schema":{"type":"string"},"in":"query","name":"types","required":false,"description":"Comma-separated event types (default: the feed types above)."},{"schema":{"type":"string"},"in":"query","name":"before","required":false,"description":"An event id: only older events (next_before from the previous page)."},{"schema":{"type":"integer","minimum":1,"maximum":200},"in":"query","name":"limit","required":false,"description":"Page size (default 30, max 200)."}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}}},"/v1/overview":{"get":{"summary":"Workspace overview: numbers by day, campaigns, senders' health, inbox","tags":["Analytics"],"description":"Requires the `read` scope.","parameters":[{"schema":{"type":"string"},"in":"query","name":"from","required":false,"description":"ISO date or datetime (default: 30 days ago)."},{"schema":{"type":"string"},"in":"query","name":"to","required":false,"description":"ISO date or datetime (default: now)."},{"schema":{"type":"string"},"in":"query","name":"campaign_id","required":false,"description":"Only this campaign."},{"schema":{"type":"string"},"in":"query","name":"campaign_ids","required":false,"description":"Comma-separated campaign ids: totals and groups cover only these campaigns (combines with campaign_id)."}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}}},"/v1/events":{"get":{"summary":"The event feed (cursor)","tags":["Events & webhooks"],"description":"Every state change, oldest first after the cursor. Poll with after=<next_after> to never miss or repeat an event. Types: sender.connected, sender.status_changed, sender.limit_hit, sender.cooldown, sender.frozen, sender.unfrozen, campaign.created, campaign.approved, campaign.started, campaign.paused, campaign.resumed, campaign.completed, campaign.variant_winner, lead.enrolled, lead.skipped, lead.stopped, lead.finished, lead.failed, profile.viewed, lead.followed, post.liked, skills.endorsed, invite.sent, invite.accepted, invite.withdrawn, message.sent, inmail.sent, message.received, reply.received, action.failed, action.unknown, draft.written, draft.approved, draft.rejected.\n\nRequires the `read` scope.","parameters":[{"schema":{"type":"string"},"in":"query","name":"after","required":false,"description":"An event id; returns events after it."},{"schema":{"type":"string"},"in":"query","name":"types","required":false,"description":"Comma-separated event types."},{"schema":{"type":"string"},"in":"query","name":"campaign_id","required":false},{"schema":{"type":"string"},"in":"query","name":"lead_id","required":false},{"schema":{"type":"integer","minimum":1,"maximum":500},"in":"query","name":"limit","required":false,"description":"Page size (default 100, max 500)."}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}}},"/v1/webhooks":{"get":{"summary":"List webhooks","tags":["Events & webhooks"],"description":"Requires the `read` scope.","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}},"post":{"summary":"Subscribe a URL to events","tags":["Events & webhooks"],"description":"events: a list of types or [\"*\"]. Deliveries are POSTed as JSON {id, type, workspace_id, campaign_id, sender_id, lead_id, data, at} with header Relay-Signature (legacy copy: Reach-Signature): t=<unix>,v1=<hex HMAC-SHA256(secret, \"<t>.<body>\")>. Retried with backoff for 24h; the event id is stable, so dedupe on it. The secret is returned once.\n\nRequires the `write` scope.\n\nAccepts an `Idempotency-Key` header.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"events":{"type":"array","items":{"type":"string"}},"campaign_ids":{"type":"array","items":{"type":"string"}},"description":{"type":"string","maxLength":300}},"required":["url"]}}}},"parameters":[{"schema":{"type":"string","maxLength":200},"in":"header","name":"idempotency-key","required":false,"description":"Makes the request safe to retry: the same key returns the first response."}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}}},"/v1/webhooks/{id}":{"patch":{"summary":"Update a webhook","tags":["Events & webhooks"],"description":"Requires the `write` scope.\n\nAccepts an `Idempotency-Key` header.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"events":{"type":"array","items":{"type":"string"}},"campaign_ids":{"type":"array","items":{"type":"string"}},"active":{"type":"boolean"},"description":{"type":"string","maxLength":300}}}}}},"parameters":[{"schema":{"type":"string","minLength":3,"maxLength":80},"in":"path","name":"id","required":true,"description":"Webhook id"},{"schema":{"type":"string","maxLength":200},"in":"header","name":"idempotency-key","required":false,"description":"Makes the request safe to retry: the same key returns the first response."}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}},"delete":{"summary":"Delete a webhook","tags":["Events & webhooks"],"description":"Requires the `write` scope.\n\nAccepts an `Idempotency-Key` header.","parameters":[{"schema":{"type":"string","minLength":3,"maxLength":80},"in":"path","name":"id","required":true,"description":"Webhook id"},{"schema":{"type":"string","maxLength":200},"in":"header","name":"idempotency-key","required":false,"description":"Makes the request safe to retry: the same key returns the first response."}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}}},"/v1/webhooks/{id}/test":{"post":{"summary":"Send a test event","tags":["Events & webhooks"],"description":"Requires the `write` scope.\n\nAccepts an `Idempotency-Key` header.","parameters":[{"schema":{"type":"string","minLength":3,"maxLength":80},"in":"path","name":"id","required":true,"description":"Webhook id"},{"schema":{"type":"string","maxLength":200},"in":"header","name":"idempotency-key","required":false,"description":"Makes the request safe to retry: the same key returns the first response."}],"responses":{"202":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}}},"/v1/webhooks/{id}/deliveries":{"get":{"summary":"Recent deliveries and their results","tags":["Events & webhooks"],"description":"Requires the `read` scope.","parameters":[{"schema":{"type":"string","minLength":3,"maxLength":80},"in":"path","name":"id","required":true,"description":"Webhook id"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}}},"/v1/conversations/bulk":{"post":{"summary":"One action on many conversations","tags":["Inbox"],"description":"mark_read, archive, unarchive, add_label or remove_label, on `ids` or on everything matching `filter` (at most 1000 per call). Returns how many changed.\n\nRequires the `write` scope.\n\nAccepts an `Idempotency-Key` header.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"action":{"type":"string","enum":["mark_read","archive","unarchive","add_label","remove_label"]},"ids":{"maxItems":1000,"type":"array","items":{"type":"string","minLength":3,"maxLength":80,"description":"Conversation id"}},"filter":{"type":"object","properties":{"sender_id":{"type":"string"},"campaign_id":{"type":"string"},"lead_id":{"type":"string"},"unread":{"type":"boolean"},"label":{"type":"string"},"archived":{"type":"boolean"},"awaiting_reply":{"type":"boolean"},"search":{"type":"string","maxLength":200},"auto_tag":{"description":"Lead auto-tag from replies, e.g. interested, not_interested, out_of_office.","type":"string","maxLength":60},"classification":{"description":"Any inbound message in the thread classified as this.","type":"string","enum":["interested","not_interested","auto_reply","other"]}},"description":"The same filters as GET /v1/conversations."},"label":{"description":"For add_label / remove_label.","type":"string","minLength":1,"maxLength":60}},"required":["action"]}}}},"parameters":[{"schema":{"type":"string","maxLength":200},"in":"header","name":"idempotency-key","required":false,"description":"Makes the request safe to retry: the same key returns the first response."}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}}},"/v1/conversations/{id}/archive":{"post":{"summary":"Archive a conversation","tags":["Inbox"],"description":"Requires the `write` scope.\n\nAccepts an `Idempotency-Key` header.","parameters":[{"schema":{"type":"string","minLength":3,"maxLength":80},"in":"path","name":"id","required":true,"description":"Conversation id"},{"schema":{"type":"string","maxLength":200},"in":"header","name":"idempotency-key","required":false,"description":"Makes the request safe to retry: the same key returns the first response."}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}}},"/v1/conversations/{id}/unarchive":{"post":{"summary":"Bring a conversation back from the archive","tags":["Inbox"],"description":"Requires the `write` scope.\n\nAccepts an `Idempotency-Key` header.","parameters":[{"schema":{"type":"string","minLength":3,"maxLength":80},"in":"path","name":"id","required":true,"description":"Conversation id"},{"schema":{"type":"string","maxLength":200},"in":"header","name":"idempotency-key","required":false,"description":"Makes the request safe to retry: the same key returns the first response."}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}}},"/v1/conversations/{id}/add-to-campaign":{"post":{"summary":"Enrol this thread's lead in a campaign","tags":["Inbox"],"description":"Same safety filters as any enrolment: the answer says enrolled, already_enrolled or skipped (with the reason).\n\nRequires the `write` scope.\n\nAccepts an `Idempotency-Key` header.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"campaign_id":{"type":"string","minLength":3,"maxLength":80,"description":"Campaign id"}},"required":["campaign_id"]}}}},"parameters":[{"schema":{"type":"string","minLength":3,"maxLength":80},"in":"path","name":"id","required":true,"description":"Conversation id"},{"schema":{"type":"string","maxLength":200},"in":"header","name":"idempotency-key","required":false,"description":"Makes the request safe to retry: the same key returns the first response."}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}}},"/v1/conversations/{id}/block":{"post":{"summary":"Blocklist this thread's lead (or their company)","tags":["Inbox"],"description":"Adds the lead (kind=lead, default) or their company (kind=company) to the workspace blocklist; they leave every running campaign at once.\n\nRequires the `write` scope.\n\nAccepts an `Idempotency-Key` header.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["lead","company"]},"note":{"type":"string","maxLength":300}}}}}},"parameters":[{"schema":{"type":"string","minLength":3,"maxLength":80},"in":"path","name":"id","required":true,"description":"Conversation id"},{"schema":{"type":"string","maxLength":200},"in":"header","name":"idempotency-key","required":false,"description":"Makes the request safe to retry: the same key returns the first response."}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}}},"/v1/conversations/{id}/do-not-contact":{"post":{"summary":"Mark this thread's lead do-not-contact","tags":["Inbox"],"description":"They leave every running campaign at once and are never enrolled again. Send {\"value\": false} to undo.\n\nRequires the `write` scope.\n\nAccepts an `Idempotency-Key` header.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"boolean"}}}}}},"parameters":[{"schema":{"type":"string","minLength":3,"maxLength":80},"in":"path","name":"id","required":true,"description":"Conversation id"},{"schema":{"type":"string","maxLength":200},"in":"header","name":"idempotency-key","required":false,"description":"Makes the request safe to retry: the same key returns the first response."}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}}},"/v1/saved-replies":{"get":{"summary":"List saved replies","tags":["Inbox"],"description":"Requires the `read` scope.","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}},"post":{"summary":"Create a saved reply","tags":["Inbox"],"description":"Text with the same variables as sequence messages: {first_name|there}, {company}, {custom.x}, spintax {Hi|Hello}. Names are unique per workspace.\n\nRequires the `write` scope.\n\nAccepts an `Idempotency-Key` header.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"text":{"type":"string","minLength":1,"maxLength":8000}},"required":["name","text"]}}}},"parameters":[{"schema":{"type":"string","maxLength":200},"in":"header","name":"idempotency-key","required":false,"description":"Makes the request safe to retry: the same key returns the first response."}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}}},"/v1/saved-replies/{id}":{"patch":{"summary":"Edit a saved reply","tags":["Inbox"],"description":"Requires the `write` scope.\n\nAccepts an `Idempotency-Key` header.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"text":{"type":"string","minLength":1,"maxLength":8000}}}}}},"parameters":[{"schema":{"type":"string","minLength":3,"maxLength":80},"in":"path","name":"id","required":true,"description":"Saved reply id"},{"schema":{"type":"string","maxLength":200},"in":"header","name":"idempotency-key","required":false,"description":"Makes the request safe to retry: the same key returns the first response."}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}},"delete":{"summary":"Delete a saved reply","tags":["Inbox"],"description":"Requires the `write` scope.\n\nAccepts an `Idempotency-Key` header.","parameters":[{"schema":{"type":"string","minLength":3,"maxLength":80},"in":"path","name":"id","required":true,"description":"Saved reply id"},{"schema":{"type":"string","maxLength":200},"in":"header","name":"idempotency-key","required":false,"description":"Makes the request safe to retry: the same key returns the first response."}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}}},"/v1/conversations/{id}/render-saved-reply":{"post":{"summary":"Render a saved reply for this thread's lead","tags":["Inbox"],"description":"Nothing is sent: send the returned text with POST /v1/conversations/{id}/reply. `ready` is false when a variable has no value for this lead.\n\nRequires the `read` scope.\n\nAccepts an `Idempotency-Key` header.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"saved_reply_id":{"type":"string","minLength":3,"maxLength":80,"description":"Saved reply id"}},"required":["saved_reply_id"]}}}},"parameters":[{"schema":{"type":"string","minLength":3,"maxLength":80},"in":"path","name":"id","required":true,"description":"Conversation id"},{"schema":{"type":"string","maxLength":200},"in":"header","name":"idempotency-key","required":false,"description":"Makes the request safe to retry: the same key returns the first response."}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}}},"/v1/campaigns/{id}/duplicate":{"post":{"summary":"Duplicate a campaign as a new draft","tags":["Campaigns"],"description":"Copies the sequence, settings and senders. include_leads=true enrols the same leads through the normal safety filters (leads still running in the source come back skipped).\n\nRequires the `write` scope.\n\nAccepts an `Idempotency-Key` header.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":160},"include_leads":{"type":"boolean"}}}}}},"parameters":[{"schema":{"type":"string","minLength":3,"maxLength":80},"in":"path","name":"id","required":true,"description":"Campaign id"},{"schema":{"type":"string","maxLength":200},"in":"header","name":"idempotency-key","required":false,"description":"Makes the request safe to retry: the same key returns the first response."}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}}},"/v1/campaigns/{id}/save-as-template":{"post":{"summary":"Save a campaign as a template","tags":["Campaigns"],"description":"Requires the `write` scope.\n\nAccepts an `Idempotency-Key` header.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":160},"description":{"type":"string","maxLength":500}},"required":["name"]}}}},"parameters":[{"schema":{"type":"string","minLength":3,"maxLength":80},"in":"path","name":"id","required":true,"description":"Campaign id"},{"schema":{"type":"string","maxLength":200},"in":"header","name":"idempotency-key","required":false,"description":"Makes the request safe to retry: the same key returns the first response."}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}}},"/v1/campaign-templates":{"get":{"summary":"Templates: built-in starters and this workspace's own","tags":["Campaigns"],"description":"Requires the `read` scope.","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}},"post":{"summary":"Create a template from a sequence","tags":["Campaigns"],"description":"Requires the `write` scope.\n\nAccepts an `Idempotency-Key` header.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":160},"description":{"type":"string","maxLength":500},"sequence":{},"settings":{"type":"object","properties":{"timezone":{"description":"Override the senders' time zones for this campaign.","type":"string"},"stop_on_reply":{"default":true,"description":"A reply from the lead (in any campaign) stops the lead here.","type":"boolean"},"exclude_in_other_campaigns":{"default":true,"description":"Skip leads that are active in another campaign of the workspace.","type":"boolean"},"exclude_contacted_before":{"default":true,"description":"Skip leads any sender of the workspace already messaged or invited.","type":"boolean"},"exclude_other_sender_conversations":{"default":true,"description":"Skip leads who already talk with another sender of the workspace.","type":"boolean"},"respect_blocklist":{"default":true,"type":"boolean"},"daily_new_leads":{"description":"Cap on leads started per day in this campaign.","type":"integer","minimum":1,"maximum":500},"approval":{"default":"required","description":"Per-lead drafts written by an API key (an agent): required = a person (or a key with the approve scope) approves each one before it can be sent; not_required = they are approved automatically once they pass the content checks. Only a workspace admin, in the app, can set not_required.","type":"string","enum":["required","not_required"]},"send_in_lead_timezone":{"default":false,"description":"Also respect the lead's local time: an action goes only when the sender's working hours hold both in the sender's time zone and in the lead's (lead time zone from their location, or set on the lead). Leads with no known time zone, or whose window never overlaps the sender's within a week, follow the sender's hours alone.","type":"boolean"}}}},"required":["name","sequence"]}}}},"parameters":[{"schema":{"type":"string","maxLength":200},"in":"header","name":"idempotency-key","required":false,"description":"Makes the request safe to retry: the same key returns the first response."}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}}},"/v1/campaign-templates/{id}":{"get":{"summary":"Get a template","tags":["Campaigns"],"description":"Requires the `read` scope.","parameters":[{"schema":{"type":"string","minLength":3,"maxLength":80},"in":"path","name":"id","required":true,"description":"Template id"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}},"delete":{"summary":"Delete a template","tags":["Campaigns"],"description":"Requires the `write` scope.\n\nAccepts an `Idempotency-Key` header.","parameters":[{"schema":{"type":"string","minLength":3,"maxLength":80},"in":"path","name":"id","required":true,"description":"Template id"},{"schema":{"type":"string","maxLength":200},"in":"header","name":"idempotency-key","required":false,"description":"Makes the request safe to retry: the same key returns the first response."}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}}},"/v1/campaign-templates/{id}/create-campaign":{"post":{"summary":"Create a draft campaign from a template","tags":["Campaigns"],"description":"Requires the `write` scope.\n\nAccepts an `Idempotency-Key` header.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":160},"sender_ids":{"maxItems":50,"type":"array","items":{"type":"string"}},"settings":{"type":"object","properties":{"timezone":{"description":"Override the senders' time zones for this campaign.","type":"string"},"stop_on_reply":{"default":true,"description":"A reply from the lead (in any campaign) stops the lead here.","type":"boolean"},"exclude_in_other_campaigns":{"default":true,"description":"Skip leads that are active in another campaign of the workspace.","type":"boolean"},"exclude_contacted_before":{"default":true,"description":"Skip leads any sender of the workspace already messaged or invited.","type":"boolean"},"exclude_other_sender_conversations":{"default":true,"description":"Skip leads who already talk with another sender of the workspace.","type":"boolean"},"respect_blocklist":{"default":true,"type":"boolean"},"daily_new_leads":{"description":"Cap on leads started per day in this campaign.","type":"integer","minimum":1,"maximum":500},"approval":{"default":"required","description":"Per-lead drafts written by an API key (an agent): required = a person (or a key with the approve scope) approves each one before it can be sent; not_required = they are approved automatically once they pass the content checks. Only a workspace admin, in the app, can set not_required.","type":"string","enum":["required","not_required"]},"send_in_lead_timezone":{"default":false,"description":"Also respect the lead's local time: an action goes only when the sender's working hours hold both in the sender's time zone and in the lead's (lead time zone from their location, or set on the lead). Leads with no known time zone, or whose window never overlaps the sender's within a week, follow the sender's hours alone.","type":"boolean"}}}},"required":["name"]}}}},"parameters":[{"schema":{"type":"string","minLength":3,"maxLength":80},"in":"path","name":"id","required":true,"description":"Template id"},{"schema":{"type":"string","maxLength":200},"in":"header","name":"idempotency-key","required":false,"description":"Makes the request safe to retry: the same key returns the first response."}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}}},"/v1/exports/leads.csv":{"get":{"summary":"Export leads as CSV","tags":["Exports"],"description":"Leads (filters: list_id, tag, search, do_not_contact). Streamed, UTF-8 with a BOM for Excel; cells that look like formulas are neutralised.\n\nRequires the `read` scope.","parameters":[{"schema":{"type":"string"},"in":"query","name":"list_id","required":false},{"schema":{"type":"string"},"in":"query","name":"tag","required":false},{"schema":{"type":"string","maxLength":200},"in":"query","name":"search","required":false},{"schema":{"type":"string","enum":["true","false"]},"in":"query","name":"do_not_contact","required":false},{"schema":{"type":"string"},"in":"query","name":"campaign_id","required":false},{"schema":{"type":"string"},"in":"query","name":"campaign_ids","required":false,"description":"stats only: comma-separated campaign ids."},{"schema":{"type":"string"},"in":"query","name":"state","required":false},{"schema":{"type":"string"},"in":"query","name":"from","required":false},{"schema":{"type":"string"},"in":"query","name":"to","required":false},{"schema":{"type":"string"},"in":"query","name":"sender_id","required":false},{"schema":{"type":"string","enum":["day","sender","campaign","step","variant"]},"in":"query","name":"group_by","required":false},{"schema":{"type":"string","enum":["true","false"]},"in":"query","name":"unread","required":false},{"schema":{"type":"string","enum":["true","false"]},"in":"query","name":"archived","required":false},{"schema":{"type":"string"},"in":"query","name":"label","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}}},"/v1/exports/campaign-leads.csv":{"get":{"summary":"Export campaign leads as CSV","tags":["Exports"],"description":"A campaign's leads with state, current step, sender, last action and whether they replied (campaign_id required; state optional). Streamed, UTF-8 with a BOM for Excel; cells that look like formulas are neutralised.\n\nRequires the `read` scope.","parameters":[{"schema":{"type":"string"},"in":"query","name":"list_id","required":false},{"schema":{"type":"string"},"in":"query","name":"tag","required":false},{"schema":{"type":"string","maxLength":200},"in":"query","name":"search","required":false},{"schema":{"type":"string","enum":["true","false"]},"in":"query","name":"do_not_contact","required":false},{"schema":{"type":"string"},"in":"query","name":"campaign_id","required":false},{"schema":{"type":"string"},"in":"query","name":"campaign_ids","required":false,"description":"stats only: comma-separated campaign ids."},{"schema":{"type":"string"},"in":"query","name":"state","required":false},{"schema":{"type":"string"},"in":"query","name":"from","required":false},{"schema":{"type":"string"},"in":"query","name":"to","required":false},{"schema":{"type":"string"},"in":"query","name":"sender_id","required":false},{"schema":{"type":"string","enum":["day","sender","campaign","step","variant"]},"in":"query","name":"group_by","required":false},{"schema":{"type":"string","enum":["true","false"]},"in":"query","name":"unread","required":false},{"schema":{"type":"string","enum":["true","false"]},"in":"query","name":"archived","required":false},{"schema":{"type":"string"},"in":"query","name":"label","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}}},"/v1/exports/stats.csv":{"get":{"summary":"Export stats as CSV","tags":["Exports"],"description":"Numbers grouped by day (default), sender, campaign, step or variant, with a total row (from, to, campaign_id or comma-separated campaign_ids, sender_id, group_by). Streamed, UTF-8 with a BOM for Excel; cells that look like formulas are neutralised.\n\nRequires the `read` scope.","parameters":[{"schema":{"type":"string"},"in":"query","name":"list_id","required":false},{"schema":{"type":"string"},"in":"query","name":"tag","required":false},{"schema":{"type":"string","maxLength":200},"in":"query","name":"search","required":false},{"schema":{"type":"string","enum":["true","false"]},"in":"query","name":"do_not_contact","required":false},{"schema":{"type":"string"},"in":"query","name":"campaign_id","required":false},{"schema":{"type":"string"},"in":"query","name":"campaign_ids","required":false,"description":"stats only: comma-separated campaign ids."},{"schema":{"type":"string"},"in":"query","name":"state","required":false},{"schema":{"type":"string"},"in":"query","name":"from","required":false},{"schema":{"type":"string"},"in":"query","name":"to","required":false},{"schema":{"type":"string"},"in":"query","name":"sender_id","required":false},{"schema":{"type":"string","enum":["day","sender","campaign","step","variant"]},"in":"query","name":"group_by","required":false},{"schema":{"type":"string","enum":["true","false"]},"in":"query","name":"unread","required":false},{"schema":{"type":"string","enum":["true","false"]},"in":"query","name":"archived","required":false},{"schema":{"type":"string"},"in":"query","name":"label","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}}},"/v1/exports/conversations.csv":{"get":{"summary":"Export conversations as CSV","tags":["Exports"],"description":"Conversations (sender_id, campaign_id, unread, archived, label). Streamed, UTF-8 with a BOM for Excel; cells that look like formulas are neutralised.\n\nRequires the `read` scope.","parameters":[{"schema":{"type":"string"},"in":"query","name":"list_id","required":false},{"schema":{"type":"string"},"in":"query","name":"tag","required":false},{"schema":{"type":"string","maxLength":200},"in":"query","name":"search","required":false},{"schema":{"type":"string","enum":["true","false"]},"in":"query","name":"do_not_contact","required":false},{"schema":{"type":"string"},"in":"query","name":"campaign_id","required":false},{"schema":{"type":"string"},"in":"query","name":"campaign_ids","required":false,"description":"stats only: comma-separated campaign ids."},{"schema":{"type":"string"},"in":"query","name":"state","required":false},{"schema":{"type":"string"},"in":"query","name":"from","required":false},{"schema":{"type":"string"},"in":"query","name":"to","required":false},{"schema":{"type":"string"},"in":"query","name":"sender_id","required":false},{"schema":{"type":"string","enum":["day","sender","campaign","step","variant"]},"in":"query","name":"group_by","required":false},{"schema":{"type":"string","enum":["true","false"]},"in":"query","name":"unread","required":false},{"schema":{"type":"string","enum":["true","false"]},"in":"query","name":"archived","required":false},{"schema":{"type":"string"},"in":"query","name":"label","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}}},"/v1/exports/link":{"post":{"summary":"A signed download link for an export (15 minutes)","tags":["Exports"],"description":"For clients that can't stream a download (an AI tool, a chat): returns a URL anyone holding it can fetch for 15 minutes.\n\nRequires the `read` scope.\n\nAccepts an `Idempotency-Key` header.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["leads","campaign_leads","stats","conversations"]},"params":{"type":"object","properties":{"list_id":{"type":"string"},"tag":{"type":"string"},"search":{"type":"string","maxLength":200},"do_not_contact":{"type":"string","enum":["true","false"]},"campaign_id":{"type":"string"},"campaign_ids":{"description":"stats only: comma-separated campaign ids.","type":"string"},"state":{"type":"string"},"from":{"type":"string"},"to":{"type":"string"},"sender_id":{"type":"string"},"group_by":{"type":"string","enum":["day","sender","campaign","step","variant"]},"unread":{"type":"string","enum":["true","false"]},"archived":{"type":"string","enum":["true","false"]},"label":{"type":"string"}},"additionalProperties":{}}},"required":["kind"]}}}},"parameters":[{"schema":{"type":"string","maxLength":200},"in":"header","name":"idempotency-key","required":false,"description":"Makes the request safe to retry: the same key returns the first response."}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}}},"/v1/exports/download":{"get":{"summary":"Download through a signed link","tags":["Exports"],"parameters":[{"schema":{"type":"string","minLength":10,"maxLength":4000},"in":"query","name":"token","required":true}],"security":[],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}}},"/v1/health":{"get":{"summary":"Is everything running for this workspace","tags":["Health"],"description":"The engine heartbeat, queues (due leads, scheduled, overdue and unknown actions, webhook deliveries), every sender (status, freeze, last action, last error, inbox poll age) and the LinkedIn connection. Each check is ok, warn or bad, with what to do.\n\nRequires the `read` scope.","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}}},"/v1/health/organization":{"get":{"summary":"Health of every workspace (organisation owners/admins)","tags":["Health"],"description":"Requires the `read` scope.","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}}},"/v1/members/{id}/invite-link":{"post":{"summary":"A new one-time invite link for a member","tags":["Workspace"],"description":"Relay sends no email: pass the link on yourself. It works once, for 7 days; a new link cancels the previous one. The person sets their name and password and is signed in.\n\nRequires the `write` scope.\n\nAccepts an `Idempotency-Key` header.","parameters":[{"schema":{"type":"string","minLength":3,"maxLength":80},"in":"path","name":"id","required":true,"description":"User id"},{"schema":{"type":"string","maxLength":200},"in":"header","name":"idempotency-key","required":false,"description":"Makes the request safe to retry: the same key returns the first response."}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}}},"/v1/members/{id}/reset-link":{"post":{"summary":"A one-time password reset link (organisation owners)","tags":["Workspace"],"description":"For a person who forgot their password. Only an organisation owner can issue it; it works once, for 7 days, and signs the person in after they set a new password.\n\nRequires the `write` scope.\n\nAccepts an `Idempotency-Key` header.","parameters":[{"schema":{"type":"string","minLength":3,"maxLength":80},"in":"path","name":"id","required":true,"description":"User id"},{"schema":{"type":"string","maxLength":200},"in":"header","name":"idempotency-key","required":false,"description":"Makes the request safe to retry: the same key returns the first response."}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}}},"/v1/members/{id}":{"delete":{"summary":"Remove a member from this workspace (admins)","tags":["Workspace"],"description":"Requires the `write` scope.\n\nAccepts an `Idempotency-Key` header.","parameters":[{"schema":{"type":"string","minLength":3,"maxLength":80},"in":"path","name":"id","required":true,"description":"User id"},{"schema":{"type":"string","maxLength":200},"in":"header","name":"idempotency-key","required":false,"description":"Makes the request safe to retry: the same key returns the first response."}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}}},"/auth/invite/{token}":{"get":{"summary":"What an invite link is for (email, workspace, expiry)","tags":["Auth"],"parameters":[{"schema":{"type":"string","minLength":20,"maxLength":200},"in":"path","name":"token","required":true}],"security":[],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}},"post":{"summary":"Accept an invite: set name and password, get signed in","tags":["Auth"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"password":{"type":"string","minLength":12,"maxLength":500,"description":"At least 12 characters."},"name":{"type":"string","minLength":1,"maxLength":120}},"required":["password"]}}}},"parameters":[{"schema":{"type":"string","minLength":20,"maxLength":200},"in":"path","name":"token","required":true}],"security":[],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}}},"/v1/integrations/catalogue":{"get":{"summary":"Every tool Relay connects to","tags":["Integrations"],"description":"Each connector with its category (crm, cold_email, data, enrichment, chat), how it authenticates, the credentials and settings to send when connecting, what it can do, its default field map and triggers, and status (available, or needs_app_registration for OAuth tools whose app isn't registered yet). Also the automation platforms (Zapier, Make, n8n) that use REST hooks, and CSV import from a link.\n\nRequires the `read` scope.","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}}},"/v1/integrations":{"get":{"summary":"Connected tools","tags":["Integrations"],"description":"Credentials are never returned: secret fields show only their last four characters.\n\nRequires the `read` scope.","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}},"post":{"summary":"Connect a tool","tags":["Integrations"],"description":"Tests the credentials against the tool first and saves nothing if the tool refuses them. Triggers default to the connector's (e.g. CRM: on invite.accepted and reply.received, push the lead and log the touch). OAuth tools (Salesforce, Zoho CRM, Google Sheets) use POST /v1/integrations/oauth/start instead. Not allowed for a key pinned to one sender.\n\nRequires the `write` scope.\n\nAccepts an `Idempotency-Key` header.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"connector":{"type":"string","description":"Connector key from the catalogue, e.g. hubspot, pipedrive, instantly, slack."},"name":{"description":"Your name for this connection (default: the tool's name).","type":"string","maxLength":80},"credentials":{"description":"The connector's credential fields (API key, token, webhook URL …). Stored encrypted; never shown again.","type":"object","propertyNames":{"type":"string","maxLength":60},"additionalProperties":{"type":"string","maxLength":4000}},"settings":{"description":"The connector's settings (campaign id, base id, board id …).","type":"object","propertyNames":{"type":"string","maxLength":60},"additionalProperties":{"type":"string","maxLength":4000}},"field_map":{"type":"object","propertyNames":{"type":"string","maxLength":100},"additionalProperties":{"type":"string","maxLength":300},"description":"Tool field → Relay value: a lead field (first_name, last_name, full_name, email, company, title, headline, location, linkedin_url, tags, custom.<name>), the event's campaign, sender, event or text, or a template like \"{first_name} at {company}\". Empty: the connector's default map."},"triggers":{"maxItems":30,"type":"array","items":{"type":"object","properties":{"event":{"type":"string","description":"A Relay event type, or \"*\" for all: sender.connected, sender.status_changed, sender.limit_hit, sender.cooldown, sender.frozen, sender.unfrozen, campaign.created, campaign.approved, campaign.started, campaign.paused, campaign.resumed, campaign.completed, campaign.variant_winner, lead.enrolled, lead.skipped, lead.stopped, lead.finished, lead.failed, profile.viewed, lead.followed, post.liked, skills.endorsed, invite.sent, invite.accepted, invite.withdrawn, message.sent, inmail.sent, message.received, reply.received, action.failed, action.unknown, draft.written, draft.approved, draft.rejected."},"actions":{"minItems":1,"type":"array","items":{"type":"string","enum":["push_lead","log_activity","add_to_sequence","notify","enrich"],"description":"push_lead: create or update the person in the tool · log_activity: a note/task for the LinkedIn touch · add_to_sequence: enrol in the tool's email campaign · notify: post to a channel · enrich: fill the lead's email, title and company."}}},"required":["event","actions"],"description":"When this event happens (for a lead in the connection's campaigns), run these actions in the tool."}},"campaign_ids":{"description":"Only events of these campaigns (default: all).","maxItems":200,"type":"array","items":{"type":"string","minLength":3,"maxLength":80,"description":"Campaign id"}}},"required":["connector"]}}}},"parameters":[{"schema":{"type":"string","maxLength":200},"in":"header","name":"idempotency-key","required":false,"description":"Makes the request safe to retry: the same key returns the first response."}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}}},"/v1/integrations/automation":{"get":{"summary":"Triggers and actions for Zapier, Make and n8n","tags":["Integrations"],"description":"Every event you can subscribe to (with a sample payload link) and the Relay API calls to use as actions.\n\nRequires the `read` scope.","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}}},"/v1/integrations/oauth/start":{"post":{"summary":"Start connecting an OAuth tool","tags":["Integrations"],"description":"Returns the tool's consent page; open it in a browser. After consent the connection appears in GET /v1/integrations. Refused with not_configured while the tool's app isn't registered.\n\nRequires the `write` scope.\n\nAccepts an `Idempotency-Key` header.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"connector":{"type":"string","enum":["salesforce","zoho_crm","google_sheets"]},"name":{"type":"string","maxLength":80},"settings":{"type":"object","propertyNames":{"type":"string","maxLength":60},"additionalProperties":{"type":"string","maxLength":4000}}},"required":["connector"]}}}},"parameters":[{"schema":{"type":"string","maxLength":200},"in":"header","name":"idempotency-key","required":false,"description":"Makes the request safe to retry: the same key returns the first response."}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}}},"/v1/integrations/{id}":{"get":{"summary":"One connection","tags":["Integrations"],"description":"Requires the `read` scope.","parameters":[{"schema":{"type":"string","minLength":3,"maxLength":80},"in":"path","name":"id","required":true,"description":"Integration id"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}},"patch":{"summary":"Change a connection","tags":["Integrations"],"description":"Send only what changes. New credentials are merged with the stored ones and tested at once; enabled:false pauses every delivery.\n\nRequires the `write` scope.\n\nAccepts an `Idempotency-Key` header.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":80},"credentials":{"type":"object","propertyNames":{"type":"string","maxLength":60},"additionalProperties":{"type":"string","maxLength":4000}},"settings":{"type":"object","propertyNames":{"type":"string","maxLength":60},"additionalProperties":{"type":"string","maxLength":4000}},"field_map":{"type":"object","propertyNames":{"type":"string","maxLength":100},"additionalProperties":{"type":"string","maxLength":300},"description":"Tool field → Relay value: a lead field (first_name, last_name, full_name, email, company, title, headline, location, linkedin_url, tags, custom.<name>), the event's campaign, sender, event or text, or a template like \"{first_name} at {company}\". Empty: the connector's default map."},"triggers":{"maxItems":30,"type":"array","items":{"type":"object","properties":{"event":{"type":"string","description":"A Relay event type, or \"*\" for all: sender.connected, sender.status_changed, sender.limit_hit, sender.cooldown, sender.frozen, sender.unfrozen, campaign.created, campaign.approved, campaign.started, campaign.paused, campaign.resumed, campaign.completed, campaign.variant_winner, lead.enrolled, lead.skipped, lead.stopped, lead.finished, lead.failed, profile.viewed, lead.followed, post.liked, skills.endorsed, invite.sent, invite.accepted, invite.withdrawn, message.sent, inmail.sent, message.received, reply.received, action.failed, action.unknown, draft.written, draft.approved, draft.rejected."},"actions":{"minItems":1,"type":"array","items":{"type":"string","enum":["push_lead","log_activity","add_to_sequence","notify","enrich"],"description":"push_lead: create or update the person in the tool · log_activity: a note/task for the LinkedIn touch · add_to_sequence: enrol in the tool's email campaign · notify: post to a channel · enrich: fill the lead's email, title and company."}}},"required":["event","actions"],"description":"When this event happens (for a lead in the connection's campaigns), run these actions in the tool."}},"campaign_ids":{"maxItems":200,"type":"array","items":{"type":"string","minLength":3,"maxLength":80,"description":"Campaign id"}},"enabled":{"type":"boolean"}}}}}},"parameters":[{"schema":{"type":"string","minLength":3,"maxLength":80},"in":"path","name":"id","required":true,"description":"Integration id"},{"schema":{"type":"string","maxLength":200},"in":"header","name":"idempotency-key","required":false,"description":"Makes the request safe to retry: the same key returns the first response."}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}},"delete":{"summary":"Disconnect a tool","tags":["Integrations"],"description":"Removes the credentials and pending deliveries. Nothing is changed in the tool itself.\n\nRequires the `write` scope.\n\nAccepts an `Idempotency-Key` header.","parameters":[{"schema":{"type":"string","minLength":3,"maxLength":80},"in":"path","name":"id","required":true,"description":"Integration id"},{"schema":{"type":"string","maxLength":200},"in":"header","name":"idempotency-key","required":false,"description":"Makes the request safe to retry: the same key returns the first response."}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}}},"/v1/integrations/{id}/test":{"post":{"summary":"Check the connection now","tags":["Integrations"],"description":"Calls the tool with the stored credentials. A connection in error goes back to ok when this passes.\n\nRequires the `write` scope.\n\nAccepts an `Idempotency-Key` header.","parameters":[{"schema":{"type":"string","minLength":3,"maxLength":80},"in":"path","name":"id","required":true,"description":"Integration id"},{"schema":{"type":"string","maxLength":200},"in":"header","name":"idempotency-key","required":false,"description":"Makes the request safe to retry: the same key returns the first response."}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}}},"/v1/integrations/{id}/deliveries":{"get":{"summary":"What was sent to the tool","tags":["Integrations"],"description":"Newest first: the event, the actions, which were done, the tool's ids per action, and the error if it failed.\n\nRequires the `read` scope.","parameters":[{"schema":{"type":"string","enum":["pending","delivered","failed","skipped"]},"in":"query","name":"status","required":false},{"schema":{"type":"integer","minimum":1,"maximum":200},"in":"query","name":"limit","required":false},{"schema":{"type":"string","minLength":3,"maxLength":80},"in":"path","name":"id","required":true,"description":"Integration id"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}}},"/v1/integrations/{id}/deliveries/{delivery_id}/retry":{"post":{"summary":"Retry a failed delivery","tags":["Integrations"],"description":"Requires the `write` scope.\n\nAccepts an `Idempotency-Key` header.","parameters":[{"schema":{"type":"string","minLength":3,"maxLength":80},"in":"path","name":"id","required":true,"description":"Integration id"},{"schema":{"type":"string","minLength":3,"maxLength":200},"in":"path","name":"delivery_id","required":true},{"schema":{"type":"string","maxLength":200},"in":"header","name":"idempotency-key","required":false,"description":"Makes the request safe to retry: the same key returns the first response."}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}}},"/v1/integrations/{id}/push":{"post":{"summary":"Send leads to the tool now","tags":["Integrations"],"description":"Queues the leads for the given actions (default: whatever of enrich, push_lead, add_to_sequence the tool can do). At most 1000 per call.\n\nRequires the `write` scope.\n\nAccepts an `Idempotency-Key` header.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"lead_ids":{"minItems":1,"maxItems":1000,"type":"array","items":{"type":"string","minLength":3,"maxLength":80,"description":"Lead id"}},"actions":{"type":"array","items":{"type":"string","enum":["push_lead","log_activity","add_to_sequence","notify","enrich"],"description":"push_lead: create or update the person in the tool · log_activity: a note/task for the LinkedIn touch · add_to_sequence: enrol in the tool's email campaign · notify: post to a channel · enrich: fill the lead's email, title and company."}}},"required":["lead_ids"]}}}},"parameters":[{"schema":{"type":"string","minLength":3,"maxLength":80},"in":"path","name":"id","required":true,"description":"Integration id"},{"schema":{"type":"string","maxLength":200},"in":"header","name":"idempotency-key","required":false,"description":"Makes the request safe to retry: the same key returns the first response."}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}}},"/v1/integrations/{id}/pull":{"post":{"summary":"Bring the tool's people into a Relay list","tags":["Integrations"],"description":"Reads people from the tool (a CRM view, a campaign, a table or sheet) and upserts those with a LinkedIn URL into a list (new list unless list_id is given). Up to `max` (default 1000) per call; pass next_cursor to continue.\n\nRequires the `write` scope.\n\nAccepts an `Idempotency-Key` header.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"list_id":{"type":"string","minLength":3,"maxLength":80,"description":"List id"},"list_name":{"type":"string","maxLength":120},"cursor":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"max":{"type":"integer","minimum":1,"maximum":5000}}}}}},"parameters":[{"schema":{"type":"string","minLength":3,"maxLength":80},"in":"path","name":"id","required":true,"description":"Integration id"},{"schema":{"type":"string","maxLength":200},"in":"header","name":"idempotency-key","required":false,"description":"Makes the request safe to retry: the same key returns the first response."}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}}},"/v1/hooks/subscribe":{"post":{"summary":"Subscribe a URL to one event (REST hook)","tags":["Integrations"],"description":"For automation platforms: creates a signed webhook for one event type and returns its id (keep it to unsubscribe) and secret.\n\nRequires the `write` scope.\n\nAccepts an `Idempotency-Key` header.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"target_url":{"type":"string","format":"uri"},"event":{"type":"string","enum":["sender.connected","sender.status_changed","sender.limit_hit","sender.cooldown","sender.frozen","sender.unfrozen","campaign.created","campaign.approved","campaign.started","campaign.paused","campaign.resumed","campaign.completed","campaign.variant_winner","lead.enrolled","lead.skipped","lead.stopped","lead.finished","lead.failed","profile.viewed","lead.followed","post.liked","skills.endorsed","invite.sent","invite.accepted","invite.withdrawn","message.sent","inmail.sent","message.received","reply.received","action.failed","action.unknown","draft.written","draft.approved","draft.rejected"]},"source":{"description":"zapier, make, n8n …","type":"string","maxLength":40},"campaign_ids":{"type":"array","items":{"type":"string","minLength":3,"maxLength":80,"description":"Campaign id"}}},"required":["target_url","event"]}}}},"parameters":[{"schema":{"type":"string","maxLength":200},"in":"header","name":"idempotency-key","required":false,"description":"Makes the request safe to retry: the same key returns the first response."}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}}},"/v1/hooks/{id}":{"delete":{"summary":"Unsubscribe a REST hook","tags":["Integrations"],"description":"Requires the `write` scope.\n\nAccepts an `Idempotency-Key` header.","parameters":[{"schema":{"type":"string","minLength":3,"maxLength":80},"in":"path","name":"id","required":true,"description":"Webhook id"},{"schema":{"type":"string","maxLength":200},"in":"header","name":"idempotency-key","required":false,"description":"Makes the request safe to retry: the same key returns the first response."}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}}},"/v1/hooks/sample/{event}":{"get":{"summary":"Sample payload of an event","tags":["Integrations"],"description":"A list with one example event, the shape automation platforms use to map fields before a real event happens.\n\nRequires the `read` scope.","parameters":[{"schema":{"type":"string","maxLength":60},"in":"path","name":"event","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}}},"/v1/leads/import-url":{"post":{"summary":"Import leads from a CSV link","tags":["Leads"],"description":"Downloads a public CSV (up to 5 MB, 5000 rows) — a Google Sheet shared as \"anyone with the link\" works — and imports it like POST /v1/leads/import.\n\nRequires the `write` scope.\n\nAccepts an `Idempotency-Key` header.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","maxLength":2000,"format":"uri"},"list_id":{"type":"string","minLength":3,"maxLength":80,"description":"List id"},"list_name":{"type":"string","maxLength":120},"mapping":{"description":"CSV header → lead field (first_name, profile_url, …, custom.<name>, or \"ignore\").","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"tags":{"maxItems":20,"type":"array","items":{"type":"string","maxLength":60}}},"required":["url"]}}}},"parameters":[{"schema":{"type":"string","maxLength":200},"in":"header","name":"idempotency-key","required":false,"description":"Makes the request safe to retry: the same key returns the first response."}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}}},"/v1/find-leads/searches":{"post":{"summary":"Search for people (free) and get a preview","tags":["Find leads"],"description":"Searches an outside data source, never a LinkedIn account. Free. Returns the match count when the source gives one and up to 25 preview rows (first name and last initial, title, company, location; no profile URL). The search is saved: add people from it with POST /v1/find-leads/searches/{id}/add. Filters that work: job_titles or keywords (one of the two), countries, states, cities, company_names (current employer).\n\nRequires the `read` scope.\n\nAccepts an `Idempotency-Key` header.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"job_titles":{"default":[],"description":"Current job titles, any of them, e.g. [\"Head of Sales\", \"VP Sales\"].","maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":120}},"keywords":{"default":[],"description":"Free keywords. Only when there are no job titles (slower).","maxItems":10,"type":"array","items":{"type":"string","minLength":1,"maxLength":120}},"countries":{"default":[],"description":"Countries, e.g. [\"United Kingdom\"].","maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":80}},"states":{"default":[],"description":"States or regions.","maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":80}},"cities":{"default":[],"description":"Cities.","maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":80}},"company_names":{"default":[],"description":"Current employers, any of them.","maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":160}}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","maxLength":200},"in":"header","name":"idempotency-key","required":false,"description":"Makes the request safe to retry: the same key returns the first response."}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}},"get":{"summary":"Saved searches of this workspace","tags":["Find leads"],"description":"Requires the `read` scope.","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100},"in":"query","name":"limit","required":false,"description":"Page size (default 30, max 100)."}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}}},"/v1/find-leads/searches/{id}/add":{"post":{"summary":"Add the next N people of a search to a list (costs credits)","tags":["Find leads"],"description":"1 credit = 1 lead actually added. Reserves the credits and starts a background job; people already in your workspace are put on the list without a charge; people on the suppression list are skipped and profiles that cannot be read fail, also without a charge: the unused part is refunded when the job ends. At most 1000 per job and 5000 per organisation per day. If the balance (or a daily limit) is smaller than count, what it allows is added and `limited_by` says why. `dry_run: true` changes nothing and returns the plan. Poll GET /v1/find-leads/jobs/{id}.\n\nRequires the `write` scope.\n\nAccepts an `Idempotency-Key` header.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer","minimum":1,"maximum":1000},"list_id":{"description":"An existing list of this workspace.","type":"string"},"list_name":{"description":"Or the name of a new list.","type":"string","minLength":1,"maxLength":200},"dry_run":{"type":"boolean"}},"required":["count"]}}}},"parameters":[{"schema":{"type":"string","minLength":3,"maxLength":80},"in":"path","name":"id","required":true,"description":"Search id"},{"schema":{"type":"string","maxLength":200},"in":"header","name":"idempotency-key","required":false,"description":"Makes the request safe to retry: the same key returns the first response."}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}}},"/v1/find-leads/jobs":{"get":{"summary":"Recent add jobs of this workspace","tags":["Find leads"],"description":"Requires the `read` scope.","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100},"in":"query","name":"limit","required":false,"description":"Page size (default 20, max 100)."}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["queued","running","done","cancelled","failed"]},"search_id":{"type":"string"},"list_id":{"type":["string","null"]},"list_name":{"type":["string","null"]},"requested":{"type":"number"},"reserved":{"type":"number","description":"Credits taken when the job started."},"limited_by":{"anyOf":[{"type":"string","enum":["balance","daily_limit","key_budget"]},{"type":"null"}],"description":"Why fewer than requested were reserved."},"processed":{"type":"number"},"added":{"type":"number","description":"New leads stored and put on the list: the only ones that cost a credit."},"existing_added_to_list":{"type":"number","description":"Already in your workspace, added to the list: not charged."},"skipped_suppressed":{"type":"number","description":"On the suppression list: not charged."},"failed":{"type":"number","description":"No readable profile: not charged."},"not_processed":{"type":"number"},"credits_used":{"type":"number"},"credits_refunded":{"type":"number","description":"Given back when the job ended."},"error":{"type":["string","null"]},"created_at":{"type":"string"},"finished_at":{"type":["string","null"]},"note":{"type":"string"}},"required":["id","status","search_id","list_id","list_name","requested","reserved","limited_by","processed","added","existing_added_to_list","skipped_suppressed","failed","not_processed","credits_used","credits_refunded","error","created_at","finished_at"],"additionalProperties":false,"description":"An \"add found leads\" job."}}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}}},"/v1/find-leads/jobs/{id}":{"get":{"summary":"Progress and result of an add job","tags":["Find leads"],"description":"Requires the `read` scope.","parameters":[{"schema":{"type":"string","minLength":3,"maxLength":80},"in":"path","name":"id","required":true,"description":"Job id"}],"responses":{"200":{"description":"An \"add found leads\" job.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["queued","running","done","cancelled","failed"]},"search_id":{"type":"string"},"list_id":{"type":["string","null"]},"list_name":{"type":["string","null"]},"requested":{"type":"number"},"reserved":{"type":"number","description":"Credits taken when the job started."},"limited_by":{"anyOf":[{"type":"string","enum":["balance","daily_limit","key_budget"]},{"type":"null"}],"description":"Why fewer than requested were reserved."},"processed":{"type":"number"},"added":{"type":"number","description":"New leads stored and put on the list: the only ones that cost a credit."},"existing_added_to_list":{"type":"number","description":"Already in your workspace, added to the list: not charged."},"skipped_suppressed":{"type":"number","description":"On the suppression list: not charged."},"failed":{"type":"number","description":"No readable profile: not charged."},"not_processed":{"type":"number"},"credits_used":{"type":"number"},"credits_refunded":{"type":"number","description":"Given back when the job ended."},"error":{"type":["string","null"]},"created_at":{"type":"string"},"finished_at":{"type":["string","null"]},"note":{"type":"string"}},"required":["id","status","search_id","list_id","list_name","requested","reserved","limited_by","processed","added","existing_added_to_list","skipped_suppressed","failed","not_processed","credits_used","credits_refunded","error","created_at","finished_at"],"additionalProperties":false,"description":"An \"add found leads\" job."}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}}},"/v1/find-leads/jobs/{id}/cancel":{"post":{"summary":"Cancel an add job","tags":["Find leads"],"description":"Leads already added stay and stay charged; the rest of the reservation is refunded at once.\n\nRequires the `write` scope.\n\nAccepts an `Idempotency-Key` header.","parameters":[{"schema":{"type":"string","minLength":3,"maxLength":80},"in":"path","name":"id","required":true,"description":"Job id"},{"schema":{"type":"string","maxLength":200},"in":"header","name":"idempotency-key","required":false,"description":"Makes the request safe to retry: the same key returns the first response."}],"responses":{"200":{"description":"An \"add found leads\" job.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["queued","running","done","cancelled","failed"]},"search_id":{"type":"string"},"list_id":{"type":["string","null"]},"list_name":{"type":["string","null"]},"requested":{"type":"number"},"reserved":{"type":"number","description":"Credits taken when the job started."},"limited_by":{"anyOf":[{"type":"string","enum":["balance","daily_limit","key_budget"]},{"type":"null"}],"description":"Why fewer than requested were reserved."},"processed":{"type":"number"},"added":{"type":"number","description":"New leads stored and put on the list: the only ones that cost a credit."},"existing_added_to_list":{"type":"number","description":"Already in your workspace, added to the list: not charged."},"skipped_suppressed":{"type":"number","description":"On the suppression list: not charged."},"failed":{"type":"number","description":"No readable profile: not charged."},"not_processed":{"type":"number"},"credits_used":{"type":"number"},"credits_refunded":{"type":"number","description":"Given back when the job ended."},"error":{"type":["string","null"]},"created_at":{"type":"string"},"finished_at":{"type":["string","null"]},"note":{"type":"string"}},"required":["id","status","search_id","list_id","list_name","requested","reserved","limited_by","processed","added","existing_added_to_list","skipped_suppressed","failed","not_processed","credits_used","credits_refunded","error","created_at","finished_at"],"additionalProperties":false,"description":"An \"add found leads\" job."}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}}},"/v1/credits":{"get":{"summary":"The organisation's lead credit balance","tags":["Credits"],"description":"Credits belong to the organisation and work in every workspace. `included`: 500 per connected LinkedIn account per calendar month (UTC), not carried over. `purchased`: packs of 1000, never expire. Included credits are spent first.\n\nRequires the `read` scope.","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}}},"/v1/credits/ledger":{"get":{"summary":"Grants, spends and refunds (organisation owners and admins)","tags":["Credits"],"description":"Requires the `read` scope.","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":200},"in":"query","name":"limit","required":false,"description":"Page size (default 50, max 200)."},{"schema":{"type":"string","maxLength":80},"in":"query","name":"cursor","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}}},"/v1/credits/suppressions":{"post":{"summary":"Never add this person through credits again (organisation owners and admins)","tags":["Credits"],"description":"Give a LinkedIn profile URL, public id or member id, or an email. Applies to every workspace of the organisation.\n\nRequires the `write` scope.\n\nAccepts an `Idempotency-Key` header.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"linkedin":{"type":"string","minLength":2,"maxLength":500},"email":{"type":"string","maxLength":320},"note":{"type":"string","maxLength":300}}}}}},"parameters":[{"schema":{"type":"string","maxLength":200},"in":"header","name":"idempotency-key","required":false,"description":"Makes the request safe to retry: the same key returns the first response."}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}},"5XX":{"description":"Every error has this shape.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine code, e.g. not_found, invalid_state, sequence_invalid, forbidden."},"message":{"type":"string","description":"What went wrong, in a sentence."},"hint":{"description":"What to do next.","type":"string"},"details":{"description":"Structured detail: validation issues, sequence problems, readiness blockers."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}}}}}}},"servers":[{"url":"https://app.relaydin.com"}],"security":[{"apiKey":[]}],"tags":[{"name":"Workspace","description":"Who you are acting as, keys, members."},{"name":"Senders","description":"LinkedIn accounts, their limits, hours and health."},{"name":"Leads","description":"People, deduplicated per workspace."},{"name":"Lists"},{"name":"Blocklist"},{"name":"Campaigns","description":"Sequences, enrolment, lifecycle and previews."},{"name":"Drafts & approvals","description":"Per-lead text written by your own agent or a person, and its approval before anything is sent."},{"name":"Inbox","description":"All conversations of all senders."},{"name":"Analytics"},{"name":"Events & webhooks","description":"Everything that happens, as a feed and as signed pushes."},{"name":"Find leads","description":"Search an outside data source for people and add them to a list with lead credits. Off (501) on servers without a lead source."},{"name":"Credits"},{"name":"Integrations","description":"CRMs, cold-email tools, sheets, chat and enrichment, fed by Relay events; REST hooks for Zapier, Make and n8n."},{"name":"Auth","description":"Browser sessions for the web app."}]}