{"servers":[{"url":"https://backlinkgpt.com/api/v1","description":"Public API"}],"info":{"title":"BacklinkGPT API","version":"1.0.0","description":"Programmatic access to your BacklinkGPT workspace: the inbox of drafted outreach and replies, the backlinks the agent has won, and the outreach engine's controls.\n\nAuthenticate every request with a workspace API key in the `x-api-key` header. Keys are created and managed in the app under API → API Keys, and each key acts as the member who created it inside that workspace.\n\nPrefer talking to the agent from an AI assistant? The same workspace is reachable over MCP at `/api/mcp` (OAuth or API key); see the [MCP docs](/docs/mcp-server). Guides for the REST API live at [/docs/api](/docs/api).","contact":{"name":"BacklinkGPT","url":"https://backlinkgpt.com","email":"support@backlinkgpt.com"}},"components":{"securitySchemes":{"apiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key","description":"Workspace-scoped API key, sent as the `x-api-key` header.\n\nTo obtain one: 1. open BacklinkGPT → API → API Keys (owners and admins), 2. click Create API key and name it after the integration, 3. copy the key (it is shown once), 4. store it in your secrets manager.\n\nKeys inherit the creator's role, can be paused or deleted from the same page, and only work while the workspace has an active plan or trial."}}},"security":[{"apiKeyAuth":[]}],"tags":[{"name":"Inbox","description":"Read what needs a decision, approve or reject drafted outreach, reply to conversations, and record link acquisition outcomes."},{"name":"Backlinks","description":"List, record, and remove the backlinks the agent has won for the workspace."},{"name":"Outreach","description":"Steer the outreach engine: cadence, sender warm-up, and pacing controls."}],"openapi":"3.1.1","paths":{"/outreach/cadence-policy/sender-warmup":{"post":{"operationId":"outreachPolicy.setSenderWarmup","summary":"Toggle sender warm-up for a channel","description":"skip=true holds every connected sender of the channel at steady full capacity; skip=false resumes the gradual warm-up ramp at its stored position. Quarantined senders refuse.","tags":["Outreach"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"family":{"enum":["email","linkedin"],"type":"string"},"skip":{"type":"boolean"}},"required":["family","skip"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"family":{"enum":["email","linkedin"],"type":"string"},"skip":{"type":"boolean"},"dailyCap":{"type":"number"}},"required":["family","skip","dailyCap"]}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Not authenticated"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Insufficient permissions"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Resource not found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"408":{"description":"408","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"REQUEST_TIMEOUT"},"status":{"const":408},"message":{"type":"string","default":"Request timeout"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict detected"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"RATE_LIMITED"},"status":{"const":429},"message":{"type":"string","default":"Too many requests"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"INTERNAL_SERVER_ERROR"},"status":{"const":500},"message":{"type":"string","default":"Internal server error"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/inbox/accounts":{"get":{"operationId":"inbox.listAccounts","summary":"List inbox accounts","description":"Returns connected inbox-capable accounts for the active organization.","tags":["Inbox"],"parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"provider":{"enum":["LINKEDIN","WHATSAPP","INSTAGRAM","MESSENGER","TELEGRAM","TWITTER","MAIL","GOOGLE","OUTLOOK"],"type":"string"},"label":{"type":"string"},"email":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","provider","label","email"]}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Not authenticated"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Insufficient permissions"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Resource not found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"408":{"description":"408","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"REQUEST_TIMEOUT"},"status":{"const":408},"message":{"type":"string","default":"Request timeout"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict detected"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"RATE_LIMITED"},"status":{"const":429},"message":{"type":"string","default":"Too many requests"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"INTERNAL_SERVER_ERROR"},"status":{"const":500},"message":{"type":"string","default":"Internal server error"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/inbox/mailbox-counts":{"get":{"operationId":"inbox.getMailboxCounts","summary":"Get inbox mailbox counts","description":"Returns inbox, review, queue, and sent counts for the active organization.","tags":["Inbox"],"parameters":[{"name":"connectedAccountId","in":"query","schema":{"type":"string","minLength":1},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"inbox":{"type":"integer","minimum":0,"maximum":9007199254740991},"later":{"type":"integer","minimum":0,"maximum":9007199254740991},"review":{"type":"integer","minimum":0,"maximum":9007199254740991},"queue":{"type":"integer","minimum":0,"maximum":9007199254740991},"sent":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["inbox","later","review","queue","sent"]}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Not authenticated"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Insufficient permissions"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Resource not found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"408":{"description":"408","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"REQUEST_TIMEOUT"},"status":{"const":408},"message":{"type":"string","default":"Request timeout"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict detected"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"RATE_LIMITED"},"status":{"const":429},"message":{"type":"string","default":"Too many requests"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"INTERNAL_SERVER_ERROR"},"status":{"const":500},"message":{"type":"string","default":"Internal server error"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/inbox/items":{"get":{"operationId":"inbox.listItems","summary":"List inbox items","description":"Returns inbox items for a mailbox view, including conversation threads and queued/review attempts.","tags":["Inbox"],"parameters":[{"name":"mailbox","in":"query","schema":{"enum":["inbox","review","queue","sent"],"type":"string","default":"inbox"},"allowEmptyValue":true,"allowReserved":true},{"name":"connectedAccountId","in":"query","schema":{"type":"string","minLength":1},"allowEmptyValue":true,"allowReserved":true},{"name":"limit","in":"query","schema":{"type":"integer","minimum":-9007199254740991,"maximum":100,"exclusiveMinimum":0,"default":50},"allowEmptyValue":true,"allowReserved":true},{"name":"searchQuery","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"segment","in":"query","schema":{"enum":["open","later"],"type":"string","default":"open"},"allowEmptyValue":true,"allowReserved":true},{"name":"includeConversationId","in":"query","schema":{"type":"string","minLength":1},"allowEmptyValue":true,"allowReserved":true},{"name":"includeResolvedReviews","in":"query","schema":{"type":"boolean"},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"attemptId":{"anyOf":[{"type":"string"},{"type":"null"}]},"conversationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"type":"string"},"email":{"type":"string"},"contactLinkedinUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"photoUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"channel":{"type":"string"},"status":{"type":"string"},"engagementId":{"anyOf":[{"type":"string"},{"type":"null"}]},"opportunityId":{"anyOf":[{"type":"string"},{"type":"null"}]},"contactId":{"type":"string"},"subject":{"type":"string"},"text":{"type":"string"},"date":{"type":"string"},"read":{"type":"boolean"},"labels":{"type":"array","items":{"type":"string"}},"replyState":{"enum":["open","later","done"],"type":"string"},"snoozeUntil":{"anyOf":[{"type":"string"},{"type":"null"}]},"snoozeNote":{"anyOf":[{"type":"string"},{"type":"null"}]},"needsResponse":{"type":"boolean"},"sendBlockedReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"senderIdentity":{"anyOf":[{"type":"object","properties":{"email":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["email","name"]},{"type":"null"}]},"agentReasoning":{"anyOf":[{"type":"string"},{"type":"null"}]},"suggestedReplyBody":{"anyOf":[{"type":"string"},{"type":"null"}]},"suggestedReplyRationale":{"anyOf":[{"type":"string"},{"type":"null"}]},"suggestedReplyFacts":{"anyOf":[{"type":"object","properties":{"terms":{"anyOf":[{"type":"object","properties":{"price":{"type":"string","maxLength":100,"description":"The stated price, verbatim with currency, e.g. \"$500 one-time\" or \"€80/month\"."},"cadence":{"enum":["one_time","recurring","unspecified"],"type":"string"},"includes":{"type":"array","maxItems":8,"items":{"type":"string","maxLength":200},"description":"What the offer includes, e.g. \"permanent listing\", \"featured placement\", \"blurb\"."},"linkAttribute":{"enum":["dofollow","sponsored","nofollow","unspecified"],"type":"string","description":"Only what THEY stated about the link; unspecified when they did not say."},"timeline":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"description":"Stated turnaround, e.g. \"live this week\"."}},"required":["price","cadence","includes","linkAttribute","timeline"]},{"type":"null"}],"description":"Commercial terms if any were stated in the thread; null when money was never mentioned."},"termsComplete":{"type":"boolean","description":"True when the stated terms are specific enough that the only thing left is our yes/no."},"dealAssessment":{"anyOf":[{"type":"object","properties":{"verdict":{"enum":["fair","high","low","unknown"],"type":"string","description":"fair = in line with market for this site, high = they ask above market, low = below market (a good deal), unknown = no basis to judge."},"reason":{"type":"string","minLength":1,"maxLength":200,"description":"One sentence naming the drivers: DR, traffic, permanence, link attribute, price."},"counterPrice":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"description":"Our opening counter-offer, formatted like their quote (same currency and cadence), e.g. \"$120 one-time\". Filled for high and fair verdicts; null for low/unknown (nothing to counter)."}},"required":["verdict","reason"]},{"type":"null"}]},"theirQuestions":{"type":"array","maxItems":8,"items":{"type":"string","maxLength":300},"description":"Questions they asked us, close to verbatim."},"theyRequested":{"type":"array","maxItems":8,"items":{"type":"string","maxLength":200},"description":"Concrete things they want from us, e.g. \"description + logo\", \"our media kit\"."},"linkPlaced":{"type":"boolean"},"linkPlacedUrl":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}]}},"required":["terms","termsComplete","theirQuestions","theyRequested"]},{"type":"null"}]},"draftBrief":{"anyOf":[{"type":"object","properties":{"senderName":{"type":"string"},"senderSource":{"enum":["connected_account","workspace_user"],"type":"string"},"positioning":{"anyOf":[{"type":"string"},{"type":"null"}]},"guidance":{"type":"array","items":{"type":"string"}},"rejectionFeedback":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["senderName","senderSource","positioning","guidance","rejectionFeedback"]},{"type":"null"}]},"domainRating":{"anyOf":[{"type":"number"},{"type":"null"}]},"metricsMissing":{"type":"boolean"},"contactHasParallelDraft":{"type":"boolean"},"prospectDomain":{"anyOf":[{"type":"string"},{"type":"null"}]},"competitorPolicy":{"anyOf":[{"type":"object","properties":{"status":{"enum":["off_limits","ask_first","fair_game","none"],"type":"string"},"matchedName":{"anyOf":[{"type":"string"},{"type":"null"}]},"source":{"anyOf":[{"type":"string"},{"type":"null"}]},"addedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["status","matchedName","source","addedAt"]},{"type":"null"}]}},"required":["id","name","email","channel","status","engagementId","opportunityId","contactId","subject","text","date","read","labels"]}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Not authenticated"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Insufficient permissions"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Resource not found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"408":{"description":"408","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"REQUEST_TIMEOUT"},"status":{"const":408},"message":{"type":"string","default":"Request timeout"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict detected"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"RATE_LIMITED"},"status":{"const":429},"message":{"type":"string","default":"Too many requests"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"INTERNAL_SERVER_ERROR"},"status":{"const":500},"message":{"type":"string","default":"Internal server error"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/inbox/conversations/{conversationId}/thread":{"get":{"operationId":"inbox.getConversationThread","summary":"Get an outreach conversation thread","description":"Returns a message timeline for a conversation (inbound + outbound).","tags":["Inbox"],"parameters":[{"name":"conversationId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"threadId":{"anyOf":[{"type":"string"},{"type":"null"}]},"items":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"const":"outbound"},"id":{"type":"string"},"attemptId":{"anyOf":[{"type":"string"},{"type":"null"}]},"channel":{"enum":["email","linkedin_connection_request","linkedin_message","manual_task","wait","condition"],"type":"string"},"subject":{"anyOf":[{"type":"string"},{"type":"null"}]},"body":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"mime":{"anyOf":[{"type":"string"},{"type":"null"}]},"size":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["id","name","mime","size"]}}},"required":["type","id","attemptId","channel","subject","body","createdAt"]},{"type":"object","properties":{"type":{"const":"inbound"},"id":{"type":"string"},"messageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"threadId":{"anyOf":[{"type":"string"},{"type":"null"}]},"subject":{"anyOf":[{"type":"string"},{"type":"null"}]},"bodyPlain":{"anyOf":[{"type":"string"},{"type":"null"}]},"fromEmail":{"anyOf":[{"type":"string"},{"type":"null"}]},"fromName":{"anyOf":[{"type":"string"},{"type":"null"}]},"receivedAt":{"type":"string"},"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"mime":{"anyOf":[{"type":"string"},{"type":"null"}]},"size":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["id","name","mime","size"]}}},"required":["type","id","messageId","threadId","subject","bodyPlain","fromEmail","fromName","receivedAt"]}]}}},"required":["threadId","items"]}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Not authenticated"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Insufficient permissions"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Resource not found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"408":{"description":"408","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"REQUEST_TIMEOUT"},"status":{"const":408},"message":{"type":"string","default":"Request timeout"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict detected"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"RATE_LIMITED"},"status":{"const":429},"message":{"type":"string","default":"Too many requests"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"INTERNAL_SERVER_ERROR"},"status":{"const":500},"message":{"type":"string","default":"Internal server error"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/inbox/conversations/{conversationId}/link-acquired":{"post":{"operationId":"inbox.markConversationAsLinkAcquired","summary":"Mark conversation as link acquired","description":"Marks the linked opportunity as acquired, stores acquisition metadata, and links/creates a backlink record.","tags":["Inbox"],"parameters":[{"name":"conversationId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"valueExchangeTypeName":{"type":"string","minLength":1,"maxLength":80,"default":"earned"},"paidAmount":{"type":"number","minimum":0},"paidCurrency":{"type":"string","minLength":3,"maxLength":3,"default":"USD"},"acquiredAt":{"type":"string","format":"date-time","x-native-type":"date"},"acquiredOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"notes":{"type":"string","maxLength":2000},"pathname":{"type":"string","pattern":"^\\/.*"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"opportunityId":{"type":"string"},"backlinkId":{"type":"string"},"status":{"enum":["identified","analyzing","qualified","qualification_failed","ready_for_outreach","outreach_in_progress","on_hold","link_acquired","rejected","closed_lost","archived"],"type":"string"}},"required":["opportunityId","backlinkId","status"]}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Not authenticated"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Insufficient permissions"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Resource not found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"408":{"description":"408","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"REQUEST_TIMEOUT"},"status":{"const":408},"message":{"type":"string","default":"Request timeout"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict detected"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"RATE_LIMITED"},"status":{"const":429},"message":{"type":"string","default":"Too many requests"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"INTERNAL_SERVER_ERROR"},"status":{"const":500},"message":{"type":"string","default":"Internal server error"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/inbox/conversations/{conversationId}/reply-state":{"post":{"operationId":"inbox.setReplyState","summary":"Set a conversation's reply state","description":"Marks a conversation done (resolved without replying), parks it for later with an optional snooze date, or reopens it. Parking never lets the agent send over the thread; done optionally ends the engagement.","tags":["Inbox"],"parameters":[{"name":"conversationId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"state":{"enum":["open","later","done"],"type":"string"},"snoozeUntil":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"note":{"type":"string","maxLength":500},"endEngagement":{"type":"boolean","default":true},"pathname":{"type":"string","pattern":"^\\/.*"}},"required":["state"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"conversationId":{"type":"string"},"replyState":{"enum":["open","later","done"],"type":"string"},"snoozeUntil":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["conversationId","replyState","snoozeUntil"]}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Not authenticated"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Insufficient permissions"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Resource not found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"408":{"description":"408","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"REQUEST_TIMEOUT"},"status":{"const":408},"message":{"type":"string","default":"Request timeout"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict detected"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"RATE_LIMITED"},"status":{"const":429},"message":{"type":"string","default":"Too many requests"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"INTERNAL_SERVER_ERROR"},"status":{"const":500},"message":{"type":"string","default":"Internal server error"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/inbox/conversations/{conversationId}/stop-outreach":{"post":{"operationId":"inbox.stopOutreach","summary":"Stop outreach from a conversation","description":"Resolves the thread and ends the outreach with a policy: not a fit (drops the prospect page), do not contact (suppresses the person on every channel), or competitor (updates the competitor policy for the prospect domain).","tags":["Inbox"],"parameters":[{"name":"conversationId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"outcome":{"enum":["not_a_fit","do_not_contact","competitor"],"type":"string"},"reason":{"type":"string","minLength":1,"maxLength":500},"saveAsGuidance":{"type":"boolean"},"competitorAction":{"enum":["ask_first","block"],"type":"string"},"pathname":{"type":"string","pattern":"^\\/.*"}},"required":["outcome"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"conversationId":{"type":"string"},"outcome":{"enum":["not_a_fit","do_not_contact","competitor"],"type":"string"},"stoppedEngagements":{"type":"number"},"voidedDrafts":{"type":"number"},"droppedProspect":{"type":"boolean"},"savedRule":{"anyOf":[{"type":"string"},{"type":"null"}]},"competitorPolicy":{"anyOf":[{"type":"object","properties":{"action":{"enum":["ask_first","block"],"type":"string"},"domain":{"type":"string"},"entryName":{"type":"string"},"stoppedEngagements":{"type":"number"},"voidedDrafts":{"type":"number"}},"required":["action","domain","entryName","stoppedEngagements","voidedDrafts"]},{"type":"null"}]}},"required":["conversationId","outcome","stoppedEngagements","voidedDrafts","droppedProspect","savedRule","competitorPolicy"]}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Not authenticated"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Insufficient permissions"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Resource not found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"408":{"description":"408","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"REQUEST_TIMEOUT"},"status":{"const":408},"message":{"type":"string","default":"Request timeout"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict detected"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"RATE_LIMITED"},"status":{"const":429},"message":{"type":"string","default":"Too many requests"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"INTERNAL_SERVER_ERROR"},"status":{"const":500},"message":{"type":"string","default":"Internal server error"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/inbox/conversations/{conversationId}/reply":{"post":{"operationId":"inbox.replyToConversation","summary":"Reply to an outreach conversation","description":"Sends a reply (stored as a new outreach attempt + message).","tags":["Inbox"],"parameters":[{"name":"conversationId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"connectedAccountId":{"type":"string","minLength":1},"body":{"type":"string","minLength":1,"maxLength":20000},"subject":{"type":"string","minLength":1,"maxLength":300},"attachments":{"type":"array","maxItems":5,"items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":512},"name":{"type":"string","minLength":1,"maxLength":255},"mime":{"type":"string","minLength":1,"maxLength":255},"size":{"type":"number","maximum":10485760,"exclusiveMinimum":0}},"required":["key","name","mime","size"]}},"pathname":{"type":"string","pattern":"^\\/.*"}},"required":["body"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"sentAttemptId":{"type":"string"},"status":{"enum":["draft","scheduled","pending_review","approved","rejected","queued","processing","sent","executed","failed","delivered","opened","clicked","replied","bounced","unsubscribed","connection_request_sent","connection_accepted","connection_declined","message_sent","skipped"],"type":"string"}},"required":["sentAttemptId","status"]}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Not authenticated"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Insufficient permissions"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Resource not found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"408":{"description":"408","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"REQUEST_TIMEOUT"},"status":{"const":408},"message":{"type":"string","default":"Request timeout"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict detected"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"RATE_LIMITED"},"status":{"const":429},"message":{"type":"string","default":"Too many requests"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"INTERNAL_SERVER_ERROR"},"status":{"const":500},"message":{"type":"string","default":"Internal server error"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/inbox/attempts/{attemptId}/approve":{"post":{"operationId":"inbox.approveAttempt","summary":"Approve outreach attempt","description":"Approves a pending outreach attempt and queues it for sending.","tags":["Inbox"],"parameters":[{"name":"attemptId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"subject":{"type":"string","minLength":1,"maxLength":300},"body":{"type":"string","minLength":1,"maxLength":20000},"pathname":{"type":"string","pattern":"^\\/.*"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"attemptId":{"type":"string"},"status":{"enum":["draft","scheduled","pending_review","approved","rejected","queued","processing","sent","executed","failed","delivered","opened","clicked","replied","bounced","unsubscribed","connection_request_sent","connection_accepted","connection_declined","message_sent","skipped"],"type":"string"},"scheduledFor":{"type":"string"},"deferredByWindow":{"type":"boolean"}},"required":["attemptId","status","scheduledFor","deferredByWindow"]}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Not authenticated"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Insufficient permissions"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Resource not found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"408":{"description":"408","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"REQUEST_TIMEOUT"},"status":{"const":408},"message":{"type":"string","default":"Request timeout"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict detected"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"RATE_LIMITED"},"status":{"const":429},"message":{"type":"string","default":"Too many requests"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"INTERNAL_SERVER_ERROR"},"status":{"const":500},"message":{"type":"string","default":"Internal server error"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/inbox/attempts/{attemptId}/reject":{"post":{"operationId":"inbox.rejectAttempt","summary":"Reject outreach attempt","description":"Rejects a pending outreach attempt; the engagement re-plans its next action.","tags":["Inbox"],"parameters":[{"name":"attemptId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","minLength":1,"maxLength":500},"saveAsGuidance":{"type":"boolean"},"stopEngagement":{"type":"boolean"},"competitorAction":{"enum":["ask_first","block"],"type":"string"},"pathname":{"type":"string","pattern":"^\\/.*"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"attemptId":{"type":"string"},"status":{"enum":["draft","scheduled","pending_review","approved","rejected","queued","processing","sent","executed","failed","delivered","opened","clicked","replied","bounced","unsubscribed","connection_request_sent","connection_accepted","connection_declined","message_sent","skipped"],"type":"string"},"stoppedEngagement":{"type":"boolean"},"savedRule":{"anyOf":[{"type":"string"},{"type":"null"}]},"competitorPolicy":{"anyOf":[{"type":"object","properties":{"action":{"enum":["ask_first","block"],"type":"string"},"domain":{"type":"string"},"entryName":{"type":"string"},"stoppedEngagements":{"type":"number"},"voidedDrafts":{"type":"number"}},"required":["action","domain","entryName","stoppedEngagements","voidedDrafts"]},{"type":"null"}]}},"required":["attemptId","status","stoppedEngagement","savedRule","competitorPolicy"]}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Not authenticated"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Insufficient permissions"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Resource not found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"408":{"description":"408","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"REQUEST_TIMEOUT"},"status":{"const":408},"message":{"type":"string","default":"Request timeout"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict detected"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"RATE_LIMITED"},"status":{"const":429},"message":{"type":"string","default":"Too many requests"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"INTERNAL_SERVER_ERROR"},"status":{"const":500},"message":{"type":"string","default":"Internal server error"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/inbox/attempts/{attemptId}/redraft":{"post":{"operationId":"inbox.redraftAttempt","summary":"Redraft outreach attempt in place","description":"Synchronously rewrites a pending-review draft so it addresses the given feedback. The attempt keeps its id and stays pending review.","tags":["Inbox"],"parameters":[{"name":"attemptId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"feedback":{"type":"string","minLength":3,"maxLength":500},"saveAsGuidance":{"type":"boolean"},"applyToPendingReview":{"type":"boolean"},"pathname":{"type":"string","pattern":"^\\/.*"}},"required":["feedback"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"attemptId":{"type":"string"},"status":{"enum":["draft","scheduled","pending_review","approved","rejected","queued","processing","sent","executed","failed","delivered","opened","clicked","replied","bounced","unsubscribed","connection_request_sent","connection_accepted","connection_declined","message_sent","skipped"],"type":"string"},"subject":{"anyOf":[{"type":"string"},{"type":"null"}]},"body":{"type":"string"},"savedRule":{"anyOf":[{"type":"string"},{"type":"null"}]},"queuedRedrafts":{"type":"number"}},"required":["attemptId","status","subject","body","savedRule","queuedRedrafts"]}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Not authenticated"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Insufficient permissions"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Resource not found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"408":{"description":"408","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"REQUEST_TIMEOUT"},"status":{"const":408},"message":{"type":"string","default":"Request timeout"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict detected"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"RATE_LIMITED"},"status":{"const":429},"message":{"type":"string","default":"Too many requests"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"INTERNAL_SERVER_ERROR"},"status":{"const":500},"message":{"type":"string","default":"Internal server error"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/inbox/conversations/{conversationId}/redraft-reply":{"post":{"operationId":"inbox.redraftReply","summary":"Rewrite the suggested reply with feedback","description":"Synchronously rewrites the triage agent's suggested reply so it addresses the given feedback. The extracted facts are kept; only the draft body and rationale change.","tags":["Inbox"],"parameters":[{"name":"conversationId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"feedback":{"type":"string","minLength":3,"maxLength":500},"draft":{"type":"string","minLength":1,"maxLength":20000},"saveAsGuidance":{"type":"boolean"},"pathname":{"type":"string","pattern":"^\\/.*"}},"required":["feedback"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"conversationId":{"type":"string"},"body":{"type":"string"},"rationale":{"anyOf":[{"type":"string"},{"type":"null"}]},"savedRule":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["conversationId","body","rationale","savedRule"]}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Not authenticated"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Insufficient permissions"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Resource not found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"408":{"description":"408","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"REQUEST_TIMEOUT"},"status":{"const":408},"message":{"type":"string","default":"Request timeout"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict detected"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"RATE_LIMITED"},"status":{"const":429},"message":{"type":"string","default":"Too many requests"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"INTERNAL_SERVER_ERROR"},"status":{"const":500},"message":{"type":"string","default":"Internal server error"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/inbox/attempts/redraft-pending":{"post":{"operationId":"inbox.redraftPendingAttempts","summary":"Redraft pending drafts without connected sender identity","description":"Bulk-rejects pending-review drafts that lack a connected sender identity and pings the decide loop to regenerate them immediately.","tags":["Inbox"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"pathname":{"type":"string","pattern":"^\\/.*"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"redrafted":{"type":"number"}},"required":["redrafted"]}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Not authenticated"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Insufficient permissions"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Resource not found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"408":{"description":"408","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"REQUEST_TIMEOUT"},"status":{"const":408},"message":{"type":"string","default":"Request timeout"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict detected"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"RATE_LIMITED"},"status":{"const":429},"message":{"type":"string","default":"Too many requests"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"INTERNAL_SERVER_ERROR"},"status":{"const":500},"message":{"type":"string","default":"Internal server error"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/inbox/attempts/{attemptId}/send-now":{"post":{"operationId":"inbox.sendNowAttempt","summary":"Send outreach attempt immediately","description":"Queues an attempt and dispatches it immediately (does not wait for cron).","tags":["Inbox"],"parameters":[{"name":"attemptId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"pathname":{"type":"string","pattern":"^\\/.*"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"attemptId":{"type":"string"},"status":{"enum":["draft","scheduled","pending_review","approved","rejected","queued","processing","sent","executed","failed","delivered","opened","clicked","replied","bounced","unsubscribed","connection_request_sent","connection_accepted","connection_declined","message_sent","skipped"],"type":"string"}},"required":["attemptId","status"]}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Not authenticated"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Insufficient permissions"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Resource not found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"408":{"description":"408","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"REQUEST_TIMEOUT"},"status":{"const":408},"message":{"type":"string","default":"Request timeout"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict detected"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"RATE_LIMITED"},"status":{"const":429},"message":{"type":"string","default":"Too many requests"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"INTERNAL_SERVER_ERROR"},"status":{"const":500},"message":{"type":"string","default":"Internal server error"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/inbox/attempts/{attemptId}/reschedule":{"post":{"operationId":"inbox.rescheduleAttempt","summary":"Reschedule outreach attempt","description":"Moves an attempt back to scheduled with a new scheduledAt time.","tags":["Inbox"],"parameters":[{"name":"attemptId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"scheduledAt":{"type":"string","format":"date-time","x-native-type":"date"},"pathname":{"type":"string","pattern":"^\\/.*"}},"required":["scheduledAt"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"attemptId":{"type":"string"},"status":{"enum":["draft","scheduled","pending_review","approved","rejected","queued","processing","sent","executed","failed","delivered","opened","clicked","replied","bounced","unsubscribed","connection_request_sent","connection_accepted","connection_declined","message_sent","skipped"],"type":"string"},"scheduledAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]}},"required":["attemptId","status","scheduledAt"]}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Not authenticated"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Insufficient permissions"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Resource not found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"408":{"description":"408","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"REQUEST_TIMEOUT"},"status":{"const":408},"message":{"type":"string","default":"Request timeout"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict detected"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"RATE_LIMITED"},"status":{"const":429},"message":{"type":"string","default":"Too many requests"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"INTERNAL_SERVER_ERROR"},"status":{"const":500},"message":{"type":"string","default":"Internal server error"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/inbox/attempts/{attemptId}/cancel":{"post":{"operationId":"inbox.cancelAttempt","summary":"Cancel outreach attempt","description":"Marks an attempt skipped so it will not be sent.","tags":["Inbox"],"parameters":[{"name":"attemptId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","minLength":1,"maxLength":500},"pathname":{"type":"string","pattern":"^\\/.*"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"attemptId":{"type":"string"},"status":{"enum":["draft","scheduled","pending_review","approved","rejected","queued","processing","sent","executed","failed","delivered","opened","clicked","replied","bounced","unsubscribed","connection_request_sent","connection_accepted","connection_declined","message_sent","skipped"],"type":"string"}},"required":["attemptId","status"]}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Not authenticated"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Insufficient permissions"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Resource not found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"408":{"description":"408","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"REQUEST_TIMEOUT"},"status":{"const":408},"message":{"type":"string","default":"Request timeout"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict detected"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"RATE_LIMITED"},"status":{"const":429},"message":{"type":"string","default":"Too many requests"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"INTERNAL_SERVER_ERROR"},"status":{"const":500},"message":{"type":"string","default":"Internal server error"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/inbox/conversations/{conversationId}/context-export":{"get":{"operationId":"inbox.getConversationContextExport","summary":"Export a conversation's full context as markdown","description":"Assembles pages, contact, engagement state, deal facts, the complete transcript, and the current draft into one LLM-ready markdown document.","tags":["Inbox"],"parameters":[{"name":"conversationId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"markdown":{"type":"string"}},"required":["markdown"]}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Not authenticated"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Insufficient permissions"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Resource not found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"408":{"description":"408","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"REQUEST_TIMEOUT"},"status":{"const":408},"message":{"type":"string","default":"Request timeout"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict detected"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"RATE_LIMITED"},"status":{"const":429},"message":{"type":"string","default":"Too many requests"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"INTERNAL_SERVER_ERROR"},"status":{"const":500},"message":{"type":"string","default":"Internal server error"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/inbox/engagement-context":{"get":{"operationId":"inbox.getEngagementContext","summary":"Get engagement context","description":"Returns the contact, engagement state, prospect page (with latest authority metrics), and target page behind an inbox item.","tags":["Inbox"],"parameters":[{"name":"contactId","in":"query","required":true,"schema":{"type":"string","minLength":1},"allowEmptyValue":true,"allowReserved":true},{"name":"engagementId","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"allowEmptyValue":true,"allowReserved":true},{"name":"opportunityId","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"contact":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"companyName":{"anyOf":[{"type":"string"},{"type":"null"}]},"linkedinUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"photoUrl":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","email","title","companyName","linkedinUrl","photoUrl"]},{"type":"null"}]},"engagement":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"status":{"enum":["active","waiting_reply","paused","stopped","completed"],"type":"string"},"touchCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"discardedCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"nextCheckAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","status","touchCount","discardedCount","nextCheckAt"]},{"type":"null"}]},"opportunity":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"status":{"enum":["identified","analyzing","qualified","qualification_failed","ready_for_outreach","outreach_in_progress","on_hold","link_acquired","rejected","closed_lost","archived"],"type":"string"},"targetUrl":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","status","targetUrl"]},{"type":"null"}]},"prospectPage":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"domain":{"anyOf":[{"type":"string"},{"type":"null"}]},"recommendedAsk":{"anyOf":[{"enum":["add_to_list","editorial_update","backlink_exchange","guest_contribution","paid_inclusion","resource_link","follow_upgrade","other"],"type":"string"},{"type":"null"}]},"verdictRationale":{"anyOf":[{"type":"string"},{"type":"null"}]},"domainRating":{"anyOf":[{"type":"number"},{"type":"null"}]},"refDomains":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["id","url","title","domain","recommendedAsk","verdictRationale","domainRating","refDomains"]},{"type":"null"}]},"touches":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"channel":{"enum":["email","linkedin_connection_request","linkedin_message","manual_task","wait","condition"],"type":"string"},"status":{"enum":["draft","scheduled","pending_review","approved","rejected","queued","processing","sent","executed","failed","delivered","opened","clicked","replied","bounced","unsubscribed","connection_request_sent","connection_accepted","connection_declined","message_sent","skipped"],"type":"string"},"subject":{"anyOf":[{"type":"string"},{"type":"null"}]},"at":{"type":"string"}},"required":["id","channel","status","subject","at"]},"default":[]}},"required":["contact","engagement","opportunity","prospectPage"]}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Not authenticated"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Insufficient permissions"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Resource not found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"408":{"description":"408","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"REQUEST_TIMEOUT"},"status":{"const":408},"message":{"type":"string","default":"Request timeout"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict detected"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"RATE_LIMITED"},"status":{"const":429},"message":{"type":"string","default":"Too many requests"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"INTERNAL_SERVER_ERROR"},"status":{"const":500},"message":{"type":"string","default":"Internal server error"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/backlinks":{"get":{"operationId":"backlinks.list","summary":"List backlinks","description":"Returns paginated backlinks for the active organization with acquisition metadata.","tags":["Backlinks"],"parameters":[{"name":"page","in":"query","schema":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"default":1},"allowEmptyValue":true,"allowReserved":true},{"name":"perPage","in":"query","schema":{"type":"integer","minimum":-9007199254740991,"maximum":100,"exclusiveMinimum":0,"default":10},"allowEmptyValue":true,"allowReserved":true},{"name":"sortCol","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"sortDir","in":"query","schema":{"enum":["asc","desc"],"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"search","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"domainId","in":"query","schema":{"type":"array","items":{"type":"string"},"default":[]},"style":"deepObject","explode":true,"allowEmptyValue":true,"allowReserved":true},{"name":"nofollow","in":"query","schema":{"type":"array","items":{"enum":["follow","nofollow"],"type":"string"},"default":[]},"style":"deepObject","explode":true,"allowEmptyValue":true,"allowReserved":true},{"name":"domainRatingMin","in":"query","schema":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"allowEmptyValue":true,"allowReserved":true},{"name":"domainRatingMax","in":"query","schema":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"domainId":{"type":"string"},"urlFrom":{"type":"string"},"urlTo":{"type":"string"},"title":{"type":"string"},"anchor":{"anyOf":[{"type":"string"},{"type":"null"}]},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]},"nofollow":{"type":"boolean"},"image":{"type":"boolean"},"imageSource":{"anyOf":[{"type":"string"},{"type":"null"}]},"inlinkRank":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"domainInlinkRank":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"firstSeen":{"type":"string"},"lastVisited":{"type":"string"},"origin":{"enum":["discovered","manual","agent"],"type":"string"},"cost":{"anyOf":[{"type":"string"},{"type":"null"}]},"acquisition":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{"anyOf":[{},{"type":"null"}]}}]},{"type":"null"}]},"contactId":{"anyOf":[{"type":"string"},{"type":"null"}]},"domainRating":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"ratingsRefreshedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"lastLiveCheckAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"missedChecks":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"lostAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"lostNotifiedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"deletedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"actorType":{"enum":["user","system","api_token"],"type":"string"},"userId":{"type":"string"},"orgId":{"type":"string"},"domainUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"opportunityId":{"anyOf":[{"type":"string"},{"type":"null"}]},"acquiredAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"acquiredViaConversationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"acquisitionCost":{"anyOf":[{"type":"string"},{"type":"null"}]},"acquisitionCurrency":{"anyOf":[{"type":"string"},{"type":"null"}]},"contactName":{"anyOf":[{"type":"string"},{"type":"null"}]},"contactEmail":{"anyOf":[{"type":"string"},{"type":"null"}]},"contactLinkedinUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"contactPhotoUrl":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","domainId","urlFrom","urlTo","title","anchor","alt","nofollow","image","imageSource","inlinkRank","domainInlinkRank","firstSeen","lastVisited","origin","cost","acquisition","contactId","domainRating","ratingsRefreshedAt","lastLiveCheckAt","missedChecks","lostAt","lostNotifiedAt","createdAt","updatedAt","deletedAt","actorType","userId","orgId","domainUrl","opportunityId","acquiredAt","acquiredViaConversationId","acquisitionCost","acquisitionCurrency","contactName","contactEmail","contactLinkedinUrl","contactPhotoUrl"]}},"pageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"rowCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["data","pageCount","rowCount"]}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Not authenticated"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Insufficient permissions"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Resource not found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"408":{"description":"408","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"REQUEST_TIMEOUT"},"status":{"const":408},"message":{"type":"string","default":"Request timeout"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict detected"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"RATE_LIMITED"},"status":{"const":429},"message":{"type":"string","default":"Too many requests"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"INTERNAL_SERVER_ERROR"},"status":{"const":500},"message":{"type":"string","default":"Internal server error"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}},"post":{"operationId":"backlinks.create","summary":"Create backlink","description":"Creates a backlink record for the active organization and revalidates the list.","tags":["Backlinks"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"domainId":{"type":"string"},"urlFrom":{"type":"string"},"urlTo":{"type":"string"},"title":{"type":"string"},"anchor":{"anyOf":[{"type":"string"},{"type":"null"}]},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]},"nofollow":{"type":"boolean"},"image":{"type":"boolean"},"imageSource":{"anyOf":[{"type":"string"},{"type":"null"}]},"inlinkRank":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"domainInlinkRank":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"firstSeen":{"type":"string"},"lastVisited":{"type":"string"},"cost":{"anyOf":[{"type":"string"},{"type":"null"}]},"acquisition":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{}}]},{"type":"null"}]},"contactId":{"anyOf":[{"type":"string"},{"type":"null"}]},"domainRating":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"ratingsRefreshedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"lastLiveCheckAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"missedChecks":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"lostAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"lostNotifiedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]}},"required":["domainId","urlFrom","urlTo","title","nofollow","image","inlinkRank","domainInlinkRank","firstSeen","lastVisited"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"domainId":{"type":"string"},"urlFrom":{"type":"string"},"urlTo":{"type":"string"},"title":{"type":"string"},"anchor":{"anyOf":[{"type":"string"},{"type":"null"}]},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]},"nofollow":{"type":"boolean"},"image":{"type":"boolean"},"imageSource":{"anyOf":[{"type":"string"},{"type":"null"}]},"inlinkRank":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"domainInlinkRank":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"firstSeen":{"type":"string"},"lastVisited":{"type":"string"},"origin":{"enum":["discovered","manual","agent"],"type":"string"},"cost":{"anyOf":[{"type":"string"},{"type":"null"}]},"acquisition":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{"anyOf":[{},{"type":"null"}]}}]},{"type":"null"}]},"contactId":{"anyOf":[{"type":"string"},{"type":"null"}]},"domainRating":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"ratingsRefreshedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"lastLiveCheckAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"missedChecks":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"lostAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"lostNotifiedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"deletedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"actorType":{"enum":["user","system","api_token"],"type":"string"},"userId":{"type":"string"},"orgId":{"type":"string"}},"required":["id","domainId","urlFrom","urlTo","title","anchor","alt","nofollow","image","imageSource","inlinkRank","domainInlinkRank","firstSeen","lastVisited","origin","cost","acquisition","contactId","domainRating","ratingsRefreshedAt","lastLiveCheckAt","missedChecks","lostAt","lostNotifiedAt","createdAt","updatedAt","deletedAt","actorType","userId","orgId"],"description":"Backlink record scoped to the active organization."}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Not authenticated"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Insufficient permissions"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Resource not found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"408":{"description":"408","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"REQUEST_TIMEOUT"},"status":{"const":408},"message":{"type":"string","default":"Request timeout"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict detected"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"RATE_LIMITED"},"status":{"const":429},"message":{"type":"string","default":"Too many requests"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"INTERNAL_SERVER_ERROR"},"status":{"const":500},"message":{"type":"string","default":"Internal server error"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/backlinks/{id}":{"get":{"operationId":"backlinks.get","summary":"Get backlink","description":"Returns a single backlink record for the active organization.","tags":["Backlinks"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"domainId":{"type":"string"},"urlFrom":{"type":"string"},"urlTo":{"type":"string"},"title":{"type":"string"},"anchor":{"anyOf":[{"type":"string"},{"type":"null"}]},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]},"nofollow":{"type":"boolean"},"image":{"type":"boolean"},"imageSource":{"anyOf":[{"type":"string"},{"type":"null"}]},"inlinkRank":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"domainInlinkRank":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"firstSeen":{"type":"string"},"lastVisited":{"type":"string"},"origin":{"enum":["discovered","manual","agent"],"type":"string"},"cost":{"anyOf":[{"type":"string"},{"type":"null"}]},"acquisition":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{"anyOf":[{},{"type":"null"}]}}]},{"type":"null"}]},"contactId":{"anyOf":[{"type":"string"},{"type":"null"}]},"domainRating":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"ratingsRefreshedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"lastLiveCheckAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"missedChecks":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"lostAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"lostNotifiedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"deletedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"actorType":{"enum":["user","system","api_token"],"type":"string"},"userId":{"type":"string"},"orgId":{"type":"string"},"domainUrl":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","domainId","urlFrom","urlTo","title","anchor","alt","nofollow","image","imageSource","inlinkRank","domainInlinkRank","firstSeen","lastVisited","origin","cost","acquisition","contactId","domainRating","ratingsRefreshedAt","lastLiveCheckAt","missedChecks","lostAt","lostNotifiedAt","createdAt","updatedAt","deletedAt","actorType","userId","orgId","domainUrl"]}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Not authenticated"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Insufficient permissions"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Resource not found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"408":{"description":"408","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"REQUEST_TIMEOUT"},"status":{"const":408},"message":{"type":"string","default":"Request timeout"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict detected"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"RATE_LIMITED"},"status":{"const":429},"message":{"type":"string","default":"Too many requests"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"INTERNAL_SERVER_ERROR"},"status":{"const":500},"message":{"type":"string","default":"Internal server error"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}},"patch":{"operationId":"backlinks.update","summary":"Update backlink","description":"Updates a backlink record and revalidates relevant paths.","tags":["Backlinks"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"domainId":{"type":"string"},"urlFrom":{"type":"string"},"urlTo":{"type":"string"},"title":{"type":"string"},"anchor":{"anyOf":[{"type":"string"},{"type":"null"}]},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]},"nofollow":{"type":"boolean"},"image":{"type":"boolean"},"imageSource":{"anyOf":[{"type":"string"},{"type":"null"}]},"inlinkRank":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"domainInlinkRank":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"firstSeen":{"type":"string"},"lastVisited":{"type":"string"},"cost":{"anyOf":[{"type":"string"},{"type":"null"}]},"acquisition":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{}}]},{"type":"null"}]},"contactId":{"anyOf":[{"type":"string"},{"type":"null"}]},"domainRating":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"ratingsRefreshedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"lastLiveCheckAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"missedChecks":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"lostAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"lostNotifiedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]}},"required":["domainId","urlFrom","urlTo","title","nofollow","image","inlinkRank","domainInlinkRank","firstSeen","lastVisited"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"domainId":{"type":"string"},"urlFrom":{"type":"string"},"urlTo":{"type":"string"},"title":{"type":"string"},"anchor":{"anyOf":[{"type":"string"},{"type":"null"}]},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]},"nofollow":{"type":"boolean"},"image":{"type":"boolean"},"imageSource":{"anyOf":[{"type":"string"},{"type":"null"}]},"inlinkRank":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"domainInlinkRank":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"firstSeen":{"type":"string"},"lastVisited":{"type":"string"},"origin":{"enum":["discovered","manual","agent"],"type":"string"},"cost":{"anyOf":[{"type":"string"},{"type":"null"}]},"acquisition":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{"anyOf":[{},{"type":"null"}]}}]},{"type":"null"}]},"contactId":{"anyOf":[{"type":"string"},{"type":"null"}]},"domainRating":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"ratingsRefreshedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"lastLiveCheckAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"missedChecks":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"lostAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"lostNotifiedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"deletedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"actorType":{"enum":["user","system","api_token"],"type":"string"},"userId":{"type":"string"},"orgId":{"type":"string"}},"required":["id","domainId","urlFrom","urlTo","title","anchor","alt","nofollow","image","imageSource","inlinkRank","domainInlinkRank","firstSeen","lastVisited","origin","cost","acquisition","contactId","domainRating","ratingsRefreshedAt","lastLiveCheckAt","missedChecks","lostAt","lostNotifiedAt","createdAt","updatedAt","deletedAt","actorType","userId","orgId"],"description":"Backlink record scoped to the active organization."}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Not authenticated"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Insufficient permissions"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Resource not found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"408":{"description":"408","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"REQUEST_TIMEOUT"},"status":{"const":408},"message":{"type":"string","default":"Request timeout"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict detected"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"RATE_LIMITED"},"status":{"const":429},"message":{"type":"string","default":"Too many requests"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"INTERNAL_SERVER_ERROR"},"status":{"const":500},"message":{"type":"string","default":"Internal server error"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}},"delete":{"operationId":"backlinks.delete","summary":"Delete backlink","description":"Soft deletes a backlink and revalidates the backlinks view.","tags":["Backlinks"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"description":"Identifier of the backlink that was deleted."}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Not authenticated"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Insufficient permissions"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Resource not found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"408":{"description":"408","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"REQUEST_TIMEOUT"},"status":{"const":408},"message":{"type":"string","default":"Request timeout"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict detected"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"RATE_LIMITED"},"status":{"const":429},"message":{"type":"string","default":"Too many requests"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"INTERNAL_SERVER_ERROR"},"status":{"const":500},"message":{"type":"string","default":"Internal server error"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/backlinks/record-won":{"post":{"operationId":"backlinks.recordWon","summary":"Record won backlink","description":"Records a won backlink with acquisition details (paid/exchange/earned), verifies it live immediately, and enrolls it in daily lost-link monitoring.","tags":["Backlinks"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"urlFrom":{"type":"string","format":"uri"},"urlTo":{"type":"string","minLength":4},"title":{"type":"string","maxLength":500},"anchor":{"type":"string","maxLength":500},"nofollow":{"type":"boolean","default":false},"liveSince":{"type":"string","format":"date"},"acquisitionType":{"enum":["paid","exchange","earned"],"type":"string"},"cost":{"type":"number","minimum":0},"currency":{"type":"string","minLength":3,"maxLength":3},"contactName":{"type":"string","maxLength":200},"contactEmail":{"type":"string","format":"email"},"contactLinkedinUrl":{"type":"string","format":"uri"},"note":{"type":"string","maxLength":2000}},"required":["urlFrom","urlTo"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"backlinkId":{"type":"string"},"merged":{"type":"boolean"},"live":{"type":"boolean"},"nofollow":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"contactName":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["backlinkId","merged","live","nofollow","contactName"]}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Not authenticated"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Insufficient permissions"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Resource not found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"408":{"description":"408","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"REQUEST_TIMEOUT"},"status":{"const":408},"message":{"type":"string","default":"Request timeout"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict detected"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"RATE_LIMITED"},"status":{"const":429},"message":{"type":"string","default":"Too many requests"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"INTERNAL_SERVER_ERROR"},"status":{"const":500},"message":{"type":"string","default":"Internal server error"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/backlinks/{id}/check-live":{"post":{"operationId":"backlinks.checkLive","summary":"Check backlink live","description":"Fetches the source page right now and verifies the link is still present, updating the monitoring state (a recovered link clears its lost status immediately).","tags":["Backlinks"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"live":{"type":"boolean"},"reachable":{"type":"boolean"},"nofollow":{"anyOf":[{"type":"boolean"},{"type":"null"}]}},"required":["live","reachable","nofollow"]}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Not authenticated"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Insufficient permissions"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Resource not found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"408":{"description":"408","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"REQUEST_TIMEOUT"},"status":{"const":408},"message":{"type":"string","default":"Request timeout"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict detected"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"RATE_LIMITED"},"status":{"const":429},"message":{"type":"string","default":"Too many requests"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"INTERNAL_SERVER_ERROR"},"status":{"const":500},"message":{"type":"string","default":"Internal server error"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/backlinks/bulk/check-live":{"post":{"operationId":"backlinks.checkLiveBulk","summary":"Check backlinks live in bulk","description":"Fetches up to 100 source pages right now and verifies each link is still present, updating the monitoring state exactly like the single check.","tags":["Backlinks"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"string"}}},"required":["ids"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"checked":{"type":"number"},"live":{"type":"number"},"missing":{"type":"number"},"unreachable":{"type":"number"}},"required":["checked","live","missing","unreachable"]}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Not authenticated"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Insufficient permissions"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Resource not found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"408":{"description":"408","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"REQUEST_TIMEOUT"},"status":{"const":408},"message":{"type":"string","default":"Request timeout"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict detected"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"RATE_LIMITED"},"status":{"const":429},"message":{"type":"string","default":"Too many requests"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"INTERNAL_SERVER_ERROR"},"status":{"const":500},"message":{"type":"string","default":"Internal server error"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/backlinks/bulk/delete":{"post":{"operationId":"backlinks.deleteBulk","summary":"Delete backlinks in bulk","description":"Soft deletes up to 100 backlinks and revalidates the backlinks view.","tags":["Backlinks"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"string"}}},"required":["ids"],"description":"Delete up to 100 backlinks at once."}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"deletedIds":{"type":"array","items":{"type":"string"}}},"required":["deletedIds"],"description":"Identifiers of the backlinks that were deleted."}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Not authenticated"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Insufficient permissions"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Resource not found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"408":{"description":"408","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"REQUEST_TIMEOUT"},"status":{"const":408},"message":{"type":"string","default":"Request timeout"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict detected"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"RATE_LIMITED"},"status":{"const":429},"message":{"type":"string","default":"Too many requests"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"INTERNAL_SERVER_ERROR"},"status":{"const":500},"message":{"type":"string","default":"Internal server error"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}}}}