{"openapi":"3.0.3","info":{"title":"8Leads API","version":"1.0.0","description":"The 8Leads public REST API: connect Instagram accounts, build and push leads, run campaigns, work the inbox, and pull analytics.\n\nThe API and webhooks are included in the Growth plan and above. Other plans get 403 with the code `plan_upgrade_required`.\n\nAuthenticate with an API key: `Authorization: Bearer 8l_live_…`. Keys carry scopes: `read`, `write`, or `<resource>:<read|write>`. `write` includes `read`, and a resource `:write` scope includes its `:read`.\n\nEach key is limited to 120 requests per minute, counted on each server instance. Authenticated responses include `X-RateLimit-*` headers and a 429 includes `Retry-After`. Errors are `{ \"error\": { \"code\", \"message\", \"details\" } }`."},"servers":[{"url":"https://8leads.io/api/v1"}],"security":[{"bearerAuth":[]}],"tags":[{"name":"Leads"},{"name":"Lists"},{"name":"Tags"},{"name":"Custom Fields"},{"name":"Imports"},{"name":"Lead Builder"},{"name":"Campaigns"},{"name":"Enrollments"},{"name":"Accounts"},{"name":"Inbox"},{"name":"Analytics"},{"name":"Blocklist"},{"name":"Team"},{"name":"Webhooks"}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Your 8Leads API key (8l_live_…)"}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","example":"not_found"},"message":{"type":"string"},"details":{"type":"object","nullable":true,"description":"Field-by-field problems on a validation error"}}}}},"Pagination":{"type":"object","description":"Paged lists return page, pageSize, total and pageCount. Cursor lists return nextCursor. Short lists return only total.","properties":{"page":{"type":"integer","nullable":true},"pageSize":{"type":"integer","nullable":true},"total":{"type":"integer","nullable":true},"pageCount":{"type":"integer","nullable":true},"nextCursor":{"type":"string","nullable":true}}},"Prospect":{"type":"object","properties":{"id":{"type":"string"},"instagramHandle":{"type":"string","description":"Stored lowercase, without the @"},"status":{"type":"string","enum":["ACTIVE","CONTACTED","REPLIED","BOUNCED","UNSUBSCRIBED","BLOCKED","DO_NOT_CONTACT"]},"fullName":{"type":"string"},"firstName":{"type":"string","description":"Defaults to the first word of fullName on create"},"lastName":{"type":"string"},"company":{"type":"string"},"industry":{"type":"string"},"city":{"type":"string"},"country":{"type":"string"},"website":{"type":"string"},"phone":{"type":"string"},"bio":{"type":"string"},"email":{"type":"string"},"attributes":{"type":"object","additionalProperties":{"type":"string"},"description":"Your own columns. Each key is usable as a merge tag."},"followerCount":{"type":"integer","nullable":true},"followingCount":{"type":"integer","nullable":true},"postCount":{"type":"integer","nullable":true},"isVerified":{"type":"boolean","nullable":true},"isPrivate":{"type":"boolean","nullable":true},"source":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}}},"LeadList":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"color":{"type":"string","nullable":true},"source":{"type":"string"},"prospectCount":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"}}},"Tag":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"color":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}}},"Label":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"color":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}}},"CustomField":{"type":"object","properties":{"id":{"type":"string"},"key":{"type":"string","description":"Generated from the label"},"label":{"type":"string"},"type":{"type":"string","enum":["TEXT","NUMBER","BOOLEAN","DATE","URL","SELECT","MULTISELECT"]},"options":{"type":"array","items":{"type":"string"},"nullable":true}}},"Import":{"type":"object","properties":{"id":{"type":"string"},"listId":{"type":"string","nullable":true},"source":{"type":"string"},"fileName":{"type":"string","nullable":true},"status":{"type":"string"},"totalRows":{"type":"integer"},"processedRows":{"type":"integer"},"importedRows":{"type":"integer"},"duplicateRows":{"type":"integer"},"errorRows":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"completedAt":{"type":"string","format":"date-time","nullable":true}}},"ImportResult":{"type":"object","properties":{"imported":{"type":"integer"},"duplicates":{"type":"integer"},"invalid":{"type":"integer"},"total":{"type":"integer"},"listId":{"type":"string","nullable":true}}},"Campaign":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"status":{"type":"string","enum":["DRAFT","SCHEDULED","ACTIVE","PAUSED","COMPLETED","ARCHIVED"]},"timezone":{"type":"string","description":"IANA time zone"},"sendingDays":{"type":"array","items":{"type":"integer","minimum":0,"maximum":6},"description":"0 is Sunday"},"businessHourStart":{"type":"integer","minimum":0,"maximum":1439,"description":"Minutes from midnight"},"businessHourEnd":{"type":"integer","minimum":0,"maximum":1439,"description":"Minutes from midnight"},"minDelaySeconds":{"type":"integer"},"maxDelaySeconds":{"type":"integer"},"dailyLimitPerAccount":{"type":"integer","nullable":true},"stopOnReply":{"type":"boolean"},"trackReplies":{"type":"boolean"},"prospectCount":{"type":"integer"},"sentCount":{"type":"integer"},"replyCount":{"type":"integer"},"startedAt":{"type":"string","format":"date-time","nullable":true},"completedAt":{"type":"string","format":"date-time","nullable":true},"createdAt":{"type":"string","format":"date-time"}}},"Enrollment":{"type":"object","properties":{"id":{"type":"string"},"prospectId":{"type":"string"},"campaignId":{"type":"string"},"instagramAccountId":{"type":"string","nullable":true},"status":{"type":"string","enum":["ACTIVE","PAUSED","COMPLETED","REPLIED","BOUNCED","STOPPED","FAILED","UNSUBSCRIBED"]},"currentStepPosition":{"type":"integer"},"nextRunAt":{"type":"string","format":"date-time","nullable":true},"failureReason":{"type":"string","nullable":true},"waitReason":{"type":"string","nullable":true}}},"Account":{"type":"object","properties":{"id":{"type":"string"},"username":{"type":"string"},"displayName":{"type":"string","nullable":true},"accountType":{"type":"string","enum":["PERSONAL","BUSINESS","CREATOR"]},"status":{"type":"string","enum":["PENDING","CONNECTED","WARMING","ACTIVE","PAUSED","CHALLENGED","DISCONNECTED","BANNED","ERROR"],"description":"Only ACTIVE and WARMING accounts send"},"healthScore":{"type":"integer"},"dailyMessageLimit":{"type":"integer"},"hourlyMessageLimit":{"type":"integer"},"effectiveDailyLimit":{"type":"integer","description":"The cap in force today, after warm-up"},"effectiveHourlyLimit":{"type":"integer"},"messagesSentToday":{"type":"integer"},"messagesSentThisHour":{"type":"integer"},"totalMessagesSent":{"type":"integer"},"warmupEnabled":{"type":"boolean"},"warmupCurrentDay":{"type":"integer"},"warmupDayTarget":{"type":"integer"},"warmupReady":{"type":"boolean"},"lastError":{"type":"string","nullable":true}}},"BrowserLogin":{"type":"object","properties":{"accountId":{"type":"string"},"liveViewUrl":{"type":"string","description":"Open this so the account owner can sign in to Instagram"},"browserSessionId":{"type":"string"}}},"Thread":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["OPEN","SNOOZED","CLOSED","ARCHIVED"]},"unread":{"type":"boolean"},"prospectId":{"type":"string"},"instagramAccountId":{"type":"string"},"campaignId":{"type":"string","nullable":true},"assignedToId":{"type":"string","nullable":true},"lastMessageAt":{"type":"string","format":"date-time","nullable":true},"lastInboundAt":{"type":"string","format":"date-time","nullable":true},"lastOutboundAt":{"type":"string","format":"date-time","nullable":true}}},"Message":{"type":"object","properties":{"id":{"type":"string"},"threadId":{"type":"string"},"direction":{"type":"string","enum":["INBOUND","OUTBOUND"]},"body":{"type":"string"},"sentiment":{"type":"string","nullable":true,"enum":["POSITIVE","NEUTRAL","NEGATIVE","OUT_OF_OFFICE","UNSUBSCRIBE","AUTOMATED"]},"isReply":{"type":"boolean"},"sentByAccountId":{"type":"string","nullable":true},"deliveredAt":{"type":"string","format":"date-time","nullable":true},"createdAt":{"type":"string","format":"date-time"}}},"Note":{"type":"object","properties":{"id":{"type":"string"},"threadId":{"type":"string"},"authorId":{"type":"string"},"body":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}}},"AnalyticsOverview":{"type":"object","properties":{"messagesSent":{"type":"integer"},"leadsMessaged":{"type":"integer"},"replies":{"type":"integer"},"positiveReplies":{"type":"integer"},"negativeReplies":{"type":"integer"},"unsubscribeReplies":{"type":"integer"},"blocks":{"type":"integer"},"replyRate":{"type":"number"},"positiveRate":{"type":"number"},"connectedAccounts":{"type":"integer","description":"Accounts that can send right now"},"activeCampaigns":{"type":"integer"}}},"BlocklistEntry":{"type":"object","properties":{"id":{"type":"string"},"instagramHandle":{"type":"string"},"reason":{"type":"string","nullable":true},"source":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"}}},"Member":{"type":"object","properties":{"id":{"type":"string"},"userId":{"type":"string","description":"Pass this to POST /inbox/threads/{id}/assign"},"role":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"user":{"type":"object","description":"name and email"}}},"LeadBuildRun":{"type":"object","properties":{"id":{"type":"string"},"listId":{"type":"string"},"source":{"type":"string","enum":["POST_COMMENTS","HASHTAG","USER_SEARCH","FOLLOWERS"]},"status":{"type":"string"},"requestedLimit":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"}}},"Webhook":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string","description":"Endpoint that receives event POSTs"},"events":{"type":"array","items":{"type":"string"},"description":"Subscribed event types"},"enabled":{"type":"boolean"},"failureCount":{"type":"integer","description":"Consecutive delivery failures"},"disabledReason":{"type":"string","nullable":true,"description":"Why the endpoint was auto-disabled, if any"},"lastDeliveryAt":{"type":"string","format":"date-time","nullable":true},"createdAt":{"type":"string","format":"date-time"}}},"WebhookDelivery":{"type":"object","properties":{"id":{"type":"string"},"event":{"type":"string","example":"reply.received"},"status":{"type":"string","enum":["PENDING","SUCCESS","FAILED","RETRYING"]},"statusCode":{"type":"integer","nullable":true,"description":"HTTP status returned by your endpoint"},"attempts":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"deliveredAt":{"type":"string","format":"date-time","nullable":true}}}}},"paths":{"/prospects":{"get":{"tags":["Leads"],"summary":"List leads","description":"Requires the `leads:read` scope.","responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time when the window resets","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Prospect"}},"pagination":{"$ref":"#/components/schemas/Pagination"}}}}}},"400":{"description":"Invalid request. `message` names the first problem; `details` lists every field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope (insufficient_scope), plan without API access (plan_upgrade_required), or plan ended or limit reached (forbidden)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (duplicate resource)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"page","in":"query","schema":{"type":"integer","default":1}},{"name":"pageSize","in":"query","schema":{"type":"integer","default":25,"maximum":100}},{"name":"search","in":"query","schema":{"type":"string"}},{"name":"status","in":"query","schema":{"type":"string","enum":["ACTIVE","CONTACTED","REPLIED","BOUNCED","UNSUBSCRIBED","BLOCKED","DO_NOT_CONTACT"]}},{"name":"listId","in":"query","schema":{"type":"string"}},{"name":"tagId","in":"query","schema":{"type":"string"}}]},"post":{"tags":["Leads"],"summary":"Create (push) a lead","description":"Requires the `leads:write` scope.","responses":{"201":{"description":"Created","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time when the window resets","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Prospect"}}}}}},"400":{"description":"Invalid request. `message` names the first problem; `details` lists every field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope (insufficient_scope), plan without API access (plan_upgrade_required), or plan ended or limit reached (forbidden)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (duplicate resource)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["instagramHandle"],"properties":{"instagramHandle":{"type":"string","description":"With or without the @"},"fullName":{"type":"string"},"firstName":{"type":"string","description":"Defaults to the first word of fullName on create"},"lastName":{"type":"string"},"company":{"type":"string"},"industry":{"type":"string"},"city":{"type":"string"},"country":{"type":"string"},"website":{"type":"string"},"phone":{"type":"string"},"bio":{"type":"string"},"email":{"type":"string"},"attributes":{"type":"object","additionalProperties":{"type":"string"},"description":"Your own columns. Each key is usable as a merge tag."},"listId":{"type":"string","description":"Adds the lead to this list, and to any campaign attached to it"}}}}}}}},"/prospects/counts":{"get":{"tags":["Leads"],"summary":"Count leads by status","description":"Requires the `leads:read` scope.","responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time when the window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request. `message` names the first problem; `details` lists every field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope (insufficient_scope), plan without API access (plan_upgrade_required), or plan ended or limit reached (forbidden)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (duplicate resource)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/prospects/bulk":{"post":{"tags":["Leads"],"summary":"Apply one action to many leads","description":"Requires the `leads:write` scope.","responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time when the window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request. `message` names the first problem; `details` lists every field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope (insufficient_scope), plan without API access (plan_upgrade_required), or plan ended or limit reached (forbidden)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (duplicate resource)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["action","ids"],"properties":{"action":{"type":"string","enum":["set_status","delete","add_tag","add_to_list"]},"ids":{"type":"array","items":{"type":"string"}},"status":{"type":"string","description":"For set_status"},"tagId":{"type":"string","description":"For add_tag"},"listId":{"type":"string","description":"For add_to_list"}}}}}}}},"/prospects/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"tags":["Leads"],"summary":"Get a lead","description":"Requires the `leads:read` scope.","responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time when the window resets","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Prospect"}}}}}},"400":{"description":"Invalid request. `message` names the first problem; `details` lists every field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope (insufficient_scope), plan without API access (plan_upgrade_required), or plan ended or limit reached (forbidden)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (duplicate resource)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"tags":["Leads"],"summary":"Update a lead","description":"Requires the `leads:write` scope.","responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time when the window resets","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Prospect"}}}}}},"400":{"description":"Invalid request. `message` names the first problem; `details` lists every field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope (insufficient_scope), plan without API access (plan_upgrade_required), or plan ended or limit reached (forbidden)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (duplicate resource)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"fullName":{"type":"string"},"firstName":{"type":"string","description":"Defaults to the first word of fullName on create"},"lastName":{"type":"string"},"company":{"type":"string"},"industry":{"type":"string"},"city":{"type":"string"},"country":{"type":"string"},"website":{"type":"string"},"phone":{"type":"string"},"bio":{"type":"string"},"email":{"type":"string"},"attributes":{"type":"object","additionalProperties":{"type":"string"},"description":"Your own columns. Each key is usable as a merge tag."},"status":{"type":"string","description":"Setting a stop status such as DO_NOT_CONTACT also stops the lead's sequences"}}}}}}},"delete":{"tags":["Leads"],"summary":"Delete a lead (soft)","description":"Requires the `leads:write` scope.","responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time when the window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request. `message` names the first problem; `details` lists every field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope (insufficient_scope), plan without API access (plan_upgrade_required), or plan ended or limit reached (forbidden)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (duplicate resource)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/prospects/{id}/enrich":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"tags":["Leads"],"summary":"Enrich a lead (not active yet: returns the lead unchanged)","description":"Requires the `leads:write` scope.","responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time when the window resets","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Prospect"}}}}}},"400":{"description":"Invalid request. `message` names the first problem; `details` lists every field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope (insufficient_scope), plan without API access (plan_upgrade_required), or plan ended or limit reached (forbidden)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (duplicate resource)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/prospects/{id}/tags":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"tags":["Leads"],"summary":"Add a tag to a lead","description":"Requires the `leads:write` scope.","responses":{"201":{"description":"Created","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time when the window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request. `message` names the first problem; `details` lists every field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope (insufficient_scope), plan without API access (plan_upgrade_required), or plan ended or limit reached (forbidden)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (duplicate resource)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["tagId"],"properties":{"tagId":{"type":"string"}}}}}}}},"/prospects/{id}/tags/{tagId}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"tagId","in":"path","required":true,"schema":{"type":"string"}}],"delete":{"tags":["Leads"],"summary":"Remove a tag from a lead","description":"Requires the `leads:write` scope.","responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time when the window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request. `message` names the first problem; `details` lists every field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope (insufficient_scope), plan without API access (plan_upgrade_required), or plan ended or limit reached (forbidden)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (duplicate resource)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/prospects/{id}/lists":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"tags":["Leads"],"summary":"Add a lead to a list","description":"Requires the `leads:write` scope.","responses":{"201":{"description":"Created","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time when the window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request. `message` names the first problem; `details` lists every field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope (insufficient_scope), plan without API access (plan_upgrade_required), or plan ended or limit reached (forbidden)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (duplicate resource)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["listId"],"properties":{"listId":{"type":"string"}}}}}}}},"/prospects/{id}/lists/{listId}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"listId","in":"path","required":true,"schema":{"type":"string"}}],"delete":{"tags":["Leads"],"summary":"Remove a lead from a list","description":"Requires the `leads:write` scope.","responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time when the window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request. `message` names the first problem; `details` lists every field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope (insufficient_scope), plan without API access (plan_upgrade_required), or plan ended or limit reached (forbidden)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (duplicate resource)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/imports":{"get":{"tags":["Imports"],"summary":"List the 10 most recent imports","description":"Requires the `imports:read` scope.","responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time when the window resets","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Import"}},"pagination":{"$ref":"#/components/schemas/Pagination"}}}}}},"400":{"description":"Invalid request. `message` names the first problem; `details` lists every field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope (insufficient_scope), plan without API access (plan_upgrade_required), or plan ended or limit reached (forbidden)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (duplicate resource)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Imports"],"summary":"Bulk import (push) leads","description":"Requires the `imports:write` scope. Runs synchronously and returns the counts. Does not fire `lead.created` for each row.","responses":{"201":{"description":"Created","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time when the window resets","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/ImportResult"}}}}}},"400":{"description":"Invalid request. `message` names the first problem; `details` lists every field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope (insufficient_scope), plan without API access (plan_upgrade_required), or plan ended or limit reached (forbidden)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (duplicate resource)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["mapping","rows"],"properties":{"mapping":{"type":"object","additionalProperties":{"type":"string"},"description":"Your column name to a lead field (instagramHandle, fullName, firstName, lastName, company, industry, city, country, email, website, bio, phone, followerCount, followingCount, postCount, mutualFollowers), `skip`, or any other name to store it as a merge tag"},"rows":{"type":"array","items":{"type":"object"},"description":"Up to 20,000 rows of strings"},"listId":{"type":"string"},"newListName":{"type":"string"},"fileName":{"type":"string"}}}}}}}},"/imports/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"tags":["Imports"],"summary":"Get an import","description":"Requires the `imports:read` scope.","responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time when the window resets","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Import"}}}}}},"400":{"description":"Invalid request. `message` names the first problem; `details` lists every field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope (insufficient_scope), plan without API access (plan_upgrade_required), or plan ended or limit reached (forbidden)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (duplicate resource)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/lead-builder/credits":{"get":{"tags":["Lead Builder"],"summary":"Lead credits: allowance, used, remaining","description":"Requires the `lead-builder:read` scope.","responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time when the window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request. `message` names the first problem; `details` lists every field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope (insufficient_scope), plan without API access (plan_upgrade_required), or plan ended or limit reached (forbidden)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (duplicate resource)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/lead-builder/status":{"get":{"tags":["Lead Builder"],"summary":"Whether lead building is available right now","description":"Requires the `lead-builder:read` scope.","responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time when the window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request. `message` names the first problem; `details` lists every field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope (insufficient_scope), plan without API access (plan_upgrade_required), or plan ended or limit reached (forbidden)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (duplicate resource)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/lead-builder/runs":{"get":{"tags":["Lead Builder"],"summary":"List recent builds","description":"Requires the `lead-builder:read` scope.","responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time when the window resets","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/LeadBuildRun"}},"pagination":{"$ref":"#/components/schemas/Pagination"}}}}}},"400":{"description":"Invalid request. `message` names the first problem; `details` lists every field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope (insufficient_scope), plan without API access (plan_upgrade_required), or plan ended or limit reached (forbidden)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (duplicate resource)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"limit","in":"query","schema":{"type":"integer","default":20,"maximum":50}}]},"post":{"tags":["Lead Builder"],"summary":"Start a build","description":"Requires the `lead-builder:write` scope. Paid plans only. Spends lead credits, and the limit is cut to what your credits can cover. Runs in the background: poll `GET /lead-builder/runs` or subscribe to `leads.imported`.","responses":{"201":{"description":"Created","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time when the window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request. `message` names the first problem; `details` lists every field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope (insufficient_scope), plan without API access (plan_upgrade_required), or plan ended or limit reached (forbidden)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (duplicate resource)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["source"],"properties":{"source":{"type":"string","enum":["POST_COMMENTS","HASHTAG","USER_SEARCH","FOLLOWERS"]},"url":{"type":"string","description":"POST_COMMENTS: an instagram.com post URL"},"hashtag":{"type":"string","description":"HASHTAG: one tag"},"hashtags":{"type":"array","items":{"type":"string"},"description":"HASHTAG: up to 10 tags"},"query":{"type":"string","description":"USER_SEARCH: one keyword"},"queries":{"type":"array","items":{"type":"string"},"description":"USER_SEARCH: up to 10 keywords"},"username":{"type":"string","description":"FOLLOWERS: the account to read"},"limit":{"type":"integer","default":1000,"maximum":100000},"filters":{"type":"object","description":"minFollowers, maxFollowers, excludePrivate, businessOnly, personalOnly, verifiedOnly, keyword"},"listId":{"type":"string"},"newListName":{"type":"string"}}}}}}}},"/lists":{"get":{"tags":["Lists"],"summary":"List lead lists","description":"Requires the `lists:read` scope.","responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time when the window resets","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/LeadList"}},"pagination":{"$ref":"#/components/schemas/Pagination"}}}}}},"400":{"description":"Invalid request. `message` names the first problem; `details` lists every field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope (insufficient_scope), plan without API access (plan_upgrade_required), or plan ended or limit reached (forbidden)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (duplicate resource)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Lists"],"summary":"Create a lead list","description":"Requires the `lists:write` scope.","responses":{"201":{"description":"Created","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time when the window resets","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/LeadList"}}}}}},"400":{"description":"Invalid request. `message` names the first problem; `details` lists every field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope (insufficient_scope), plan without API access (plan_upgrade_required), or plan ended or limit reached (forbidden)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (duplicate resource)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"description":{"type":"string"},"color":{"type":"string"}}}}}}}},"/lists/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"patch":{"tags":["Lists"],"summary":"Update a list","description":"Requires the `lists:write` scope.","responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time when the window resets","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/LeadList"}}}}}},"400":{"description":"Invalid request. `message` names the first problem; `details` lists every field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope (insufficient_scope), plan without API access (plan_upgrade_required), or plan ended or limit reached (forbidden)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (duplicate resource)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"color":{"type":"string"}}}}}}},"delete":{"tags":["Lists"],"summary":"Delete a list","description":"Requires the `lists:write` scope.","responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time when the window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request. `message` names the first problem; `details` lists every field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope (insufficient_scope), plan without API access (plan_upgrade_required), or plan ended or limit reached (forbidden)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (duplicate resource)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/tags":{"get":{"tags":["Tags"],"summary":"List tags","description":"Requires the `tags:read` scope.","responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time when the window resets","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Tag"}},"pagination":{"$ref":"#/components/schemas/Pagination"}}}}}},"400":{"description":"Invalid request. `message` names the first problem; `details` lists every field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope (insufficient_scope), plan without API access (plan_upgrade_required), or plan ended or limit reached (forbidden)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (duplicate resource)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Tags"],"summary":"Create a tag","description":"Requires the `tags:write` scope.","responses":{"201":{"description":"Created","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time when the window resets","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Tag"}}}}}},"400":{"description":"Invalid request. `message` names the first problem; `details` lists every field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope (insufficient_scope), plan without API access (plan_upgrade_required), or plan ended or limit reached (forbidden)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (duplicate resource)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"color":{"type":"string"}}}}}}}},"/tags/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"delete":{"tags":["Tags"],"summary":"Delete a tag","description":"Requires the `tags:write` scope.","responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time when the window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request. `message` names the first problem; `details` lists every field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope (insufficient_scope), plan without API access (plan_upgrade_required), or plan ended or limit reached (forbidden)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (duplicate resource)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/custom-fields":{"get":{"tags":["Custom Fields"],"summary":"List custom fields","description":"Requires the `custom-fields:read` scope.","responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time when the window resets","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/CustomField"}},"pagination":{"$ref":"#/components/schemas/Pagination"}}}}}},"400":{"description":"Invalid request. `message` names the first problem; `details` lists every field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope (insufficient_scope), plan without API access (plan_upgrade_required), or plan ended or limit reached (forbidden)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (duplicate resource)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Custom Fields"],"summary":"Create a custom field","description":"Requires the `custom-fields:write` scope.","responses":{"201":{"description":"Created","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time when the window resets","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/CustomField"}}}}}},"400":{"description":"Invalid request. `message` names the first problem; `details` lists every field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope (insufficient_scope), plan without API access (plan_upgrade_required), or plan ended or limit reached (forbidden)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (duplicate resource)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["label"],"properties":{"label":{"type":"string"},"type":{"type":"string","enum":["TEXT","NUMBER","BOOLEAN","DATE","URL","SELECT","MULTISELECT"],"default":"TEXT"},"options":{"type":"array","items":{"type":"string"}}}}}}}}},"/custom-fields/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"delete":{"tags":["Custom Fields"],"summary":"Delete a custom field","description":"Requires the `custom-fields:write` scope.","responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time when the window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request. `message` names the first problem; `details` lists every field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope (insufficient_scope), plan without API access (plan_upgrade_required), or plan ended or limit reached (forbidden)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (duplicate resource)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/merge-tags":{"get":{"tags":["Campaigns"],"summary":"List merge tags you can use in messages","description":"Requires the `campaigns:read` scope.","responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time when the window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request. `message` names the first problem; `details` lists every field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope (insufficient_scope), plan without API access (plan_upgrade_required), or plan ended or limit reached (forbidden)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (duplicate resource)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"campaignId","in":"query","schema":{"type":"string"},"description":"Include the custom columns of leads in this campaign"}]}},"/campaigns":{"get":{"tags":["Campaigns"],"summary":"List campaigns","description":"Requires the `campaigns:read` scope.","responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time when the window resets","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Campaign"}},"pagination":{"$ref":"#/components/schemas/Pagination"}}}}}},"400":{"description":"Invalid request. `message` names the first problem; `details` lists every field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope (insufficient_scope), plan without API access (plan_upgrade_required), or plan ended or limit reached (forbidden)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (duplicate resource)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Campaigns"],"summary":"Create a draft campaign","description":"Requires the `campaigns:write` scope. Only `name` is accepted here. The draft starts with a default four-step sequence: replace it with `PUT /campaigns/{id}/sequence`, and set everything else with `PATCH /campaigns/{id}`.","responses":{"201":{"description":"Created","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time when the window resets","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Campaign"}}}}}},"400":{"description":"Invalid request. `message` names the first problem; `details` lists every field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope (insufficient_scope), plan without API access (plan_upgrade_required), or plan ended or limit reached (forbidden)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (duplicate resource)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string"}}}}}}}},"/campaigns/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"tags":["Campaigns"],"summary":"Get a campaign with its sequence and accounts","description":"Requires the `campaigns:read` scope.","responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time when the window resets","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Campaign"}}}}}},"400":{"description":"Invalid request. `message` names the first problem; `details` lists every field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope (insufficient_scope), plan without API access (plan_upgrade_required), or plan ended or limit reached (forbidden)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (duplicate resource)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"tags":["Campaigns"],"summary":"Update campaign settings","description":"Requires the `campaigns:write` scope.","responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time when the window resets","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Campaign"}}}}}},"400":{"description":"Invalid request. `message` names the first problem; `details` lists every field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope (insufficient_scope), plan without API access (plan_upgrade_required), or plan ended or limit reached (forbidden)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (duplicate resource)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"timezone":{"type":"string","description":"IANA time zone"},"sendingDays":{"type":"array","items":{"type":"integer","minimum":0,"maximum":6},"description":"0 is Sunday"},"businessHourStart":{"type":"integer","minimum":0,"maximum":1439,"description":"Minutes from midnight"},"businessHourEnd":{"type":"integer","minimum":0,"maximum":1439,"description":"Minutes from midnight"},"minDelaySeconds":{"type":"integer","minimum":10,"maximum":86400},"maxDelaySeconds":{"type":"integer","minimum":10,"maximum":86400},"dailyLimitPerAccount":{"type":"integer","nullable":true,"minimum":1,"maximum":500},"stopOnReply":{"type":"boolean"},"trackReplies":{"type":"boolean"}}}}}}},"delete":{"tags":["Campaigns"],"summary":"Delete a campaign","description":"Requires the `campaigns:write` scope.","responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time when the window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request. `message` names the first problem; `details` lists every field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope (insufficient_scope), plan without API access (plan_upgrade_required), or plan ended or limit reached (forbidden)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (duplicate resource)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/campaigns/{id}/activate":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"tags":["Campaigns"],"summary":"Activate a campaign","description":"Requires the `campaigns:write` scope. Needs at least one step, one sending account and one enrolled lead. Counts against your plan's active campaign limit.","responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time when the window resets","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Campaign"}}}}}},"400":{"description":"Invalid request. `message` names the first problem; `details` lists every field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope (insufficient_scope), plan without API access (plan_upgrade_required), or plan ended or limit reached (forbidden)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (duplicate resource)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/campaigns/{id}/pause":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"tags":["Campaigns"],"summary":"Pause a campaign","description":"Requires the `campaigns:write` scope.","responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time when the window resets","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Campaign"}}}}}},"400":{"description":"Invalid request. `message` names the first problem; `details` lists every field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope (insufficient_scope), plan without API access (plan_upgrade_required), or plan ended or limit reached (forbidden)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (duplicate resource)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/campaigns/{id}/resume":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"tags":["Campaigns"],"summary":"Resume a campaign","description":"Requires the `campaigns:write` scope.","responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time when the window resets","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Campaign"}}}}}},"400":{"description":"Invalid request. `message` names the first problem; `details` lists every field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope (insufficient_scope), plan without API access (plan_upgrade_required), or plan ended or limit reached (forbidden)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (duplicate resource)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/campaigns/{id}/complete":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"tags":["Campaigns"],"summary":"Complete a campaign","description":"Requires the `campaigns:write` scope.","responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time when the window resets","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Campaign"}}}}}},"400":{"description":"Invalid request. `message` names the first problem; `details` lists every field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope (insufficient_scope), plan without API access (plan_upgrade_required), or plan ended or limit reached (forbidden)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (duplicate resource)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/campaigns/{id}/archive":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"tags":["Campaigns"],"summary":"Archive a campaign","description":"Requires the `campaigns:write` scope.","responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time when the window resets","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Campaign"}}}}}},"400":{"description":"Invalid request. `message` names the first problem; `details` lists every field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope (insufficient_scope), plan without API access (plan_upgrade_required), or plan ended or limit reached (forbidden)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (duplicate resource)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/campaigns/{id}/sequence":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"put":{"tags":["Campaigns"],"summary":"Replace the campaign sequence","description":"Requires the `campaigns:write` scope. Refused while the campaign is ACTIVE or SCHEDULED: pause it first.","responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time when the window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request. `message` names the first problem; `details` lists every field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope (insufficient_scope), plan without API access (plan_upgrade_required), or plan ended or limit reached (forbidden)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (duplicate resource)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["steps"],"properties":{"steps":{"type":"array","minItems":1,"maxItems":20,"items":{"type":"object","required":["delayMinutes"],"properties":{"stepType":{"type":"string","enum":["MESSAGE","FOLLOW","LIKE","VIEW_STORY","LIKE_STORY","WAIT"],"default":"MESSAGE"},"delayMinutes":{"type":"integer","minimum":0,"maximum":525600,"description":"Wait before this step"},"name":{"type":"string","description":"Optional label, up to 40 characters"},"variants":{"type":"array","description":"MESSAGE steps need at least one","items":{"type":"object","properties":{"label":{"type":"string","description":"Up to 4 characters; defaults to A, B, C"},"body":{"type":"string","description":"Up to 4,000 characters. Supports merge tags."},"weight":{"type":"integer","minimum":1,"maximum":10,"default":1}}}},"config":{"type":"object","properties":{"count":{"type":"integer","minimum":1,"maximum":5,"description":"LIKE steps: posts to like (default 2)"}}}}}}}}}}}}},"/campaigns/{id}/sequence/copy":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"tags":["Campaigns"],"summary":"Copy the sequence from another campaign","description":"Requires the `campaigns:write` scope.","responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time when the window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request. `message` names the first problem; `details` lists every field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope (insufficient_scope), plan without API access (plan_upgrade_required), or plan ended or limit reached (forbidden)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (duplicate resource)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["sourceId"],"properties":{"sourceId":{"type":"string"}}}}}}}},"/campaigns/{id}/accounts":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"put":{"tags":["Campaigns"],"summary":"Set the sending accounts","description":"Requires the `campaigns:write` scope. Ids that are not yours are ignored: check `count` in the response.","responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time when the window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request. `message` names the first problem; `details` lists every field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope (insufficient_scope), plan without API access (plan_upgrade_required), or plan ended or limit reached (forbidden)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (duplicate resource)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["accountIds"],"properties":{"accountIds":{"type":"array","items":{"type":"string"}}}}}}}}},"/campaigns/{id}/duplicate":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"tags":["Campaigns"],"summary":"Duplicate a campaign as a new draft","description":"Requires the `campaigns:write` scope.","responses":{"201":{"description":"Created","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time when the window resets","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Campaign"}}}}}},"400":{"description":"Invalid request. `message` names the first problem; `details` lists every field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope (insufficient_scope), plan without API access (plan_upgrade_required), or plan ended or limit reached (forbidden)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (duplicate resource)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/campaigns/{id}/preview":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"tags":["Campaigns"],"summary":"Render messages for real leads","description":"Requires the `campaigns:read` scope.","responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time when the window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request. `message` names the first problem; `details` lists every field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope (insufficient_scope), plan without API access (plan_upgrade_required), or plan ended or limit reached (forbidden)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (duplicate resource)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"leads","in":"query","schema":{"type":"integer","default":3,"maximum":10}}]}},"/campaigns/{id}/stats":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"tags":["Analytics"],"summary":"Stats and step breakdown for one campaign","description":"Requires the `analytics:read` scope.","responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time when the window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request. `message` names the first problem; `details` lists every field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope (insufficient_scope), plan without API access (plan_upgrade_required), or plan ended or limit reached (forbidden)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (duplicate resource)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/campaigns/{id}/timeseries":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"tags":["Analytics"],"summary":"Daily sends and replies for one campaign","description":"Requires the `analytics:read` scope.","responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time when the window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request. `message` names the first problem; `details` lists every field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope (insufficient_scope), plan without API access (plan_upgrade_required), or plan ended or limit reached (forbidden)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (duplicate resource)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"days","in":"query","schema":{"type":"integer","default":30,"maximum":365}}]}},"/campaigns/{id}/enrollments":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"tags":["Enrollments"],"summary":"List enrollments","description":"Requires the `enrollments:read` scope.","responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time when the window resets","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Enrollment"}},"pagination":{"$ref":"#/components/schemas/Pagination"}}}}}},"400":{"description":"Invalid request. `message` names the first problem; `details` lists every field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope (insufficient_scope), plan without API access (plan_upgrade_required), or plan ended or limit reached (forbidden)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (duplicate resource)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"page","in":"query","schema":{"type":"integer","default":1}},{"name":"pageSize","in":"query","schema":{"type":"integer","default":25,"maximum":100}}]},"post":{"tags":["Enrollments"],"summary":"Enroll leads by id","description":"Requires the `enrollments:write` scope.","responses":{"201":{"description":"Created","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time when the window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request. `message` names the first problem; `details` lists every field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope (insufficient_scope), plan without API access (plan_upgrade_required), or plan ended or limit reached (forbidden)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (duplicate resource)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["prospectIds"],"properties":{"prospectIds":{"type":"array","items":{"type":"string"},"maxItems":5000}}}}}}},"delete":{"tags":["Enrollments"],"summary":"Unenroll leads","description":"Requires the `enrollments:write` scope.","responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time when the window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request. `message` names the first problem; `details` lists every field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope (insufficient_scope), plan without API access (plan_upgrade_required), or plan ended or limit reached (forbidden)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (duplicate resource)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["enrollmentIds"],"properties":{"enrollmentIds":{"type":"array","items":{"type":"string"},"maxItems":5000}}}}}}}},"/campaigns/{id}/enrollments/counts":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"tags":["Enrollments"],"summary":"Count enrollments by status","description":"Requires the `enrollments:read` scope.","responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time when the window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request. `message` names the first problem; `details` lists every field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope (insufficient_scope), plan without API access (plan_upgrade_required), or plan ended or limit reached (forbidden)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (duplicate resource)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/campaigns/{id}/enrollments/from-list":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"tags":["Enrollments"],"summary":"Enroll everyone in a list once","description":"Requires the `enrollments:write` scope.","responses":{"201":{"description":"Created","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time when the window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request. `message` names the first problem; `details` lists every field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope (insufficient_scope), plan without API access (plan_upgrade_required), or plan ended or limit reached (forbidden)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (duplicate resource)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["listId"],"properties":{"listId":{"type":"string"}}}}}}}},"/campaigns/{id}/enrollments/move":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"tags":["Enrollments"],"summary":"Move leads to another campaign","description":"Requires the `enrollments:write` scope.","responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time when the window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request. `message` names the first problem; `details` lists every field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope (insufficient_scope), plan without API access (plan_upgrade_required), or plan ended or limit reached (forbidden)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (duplicate resource)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["toCampaignId","prospectIds"],"properties":{"toCampaignId":{"type":"string"},"prospectIds":{"type":"array","items":{"type":"string"},"maxItems":5000}}}}}}}},"/campaigns/{id}/lists":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"tags":["Enrollments"],"summary":"List attached lists","description":"Requires the `enrollments:read` scope.","responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time when the window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request. `message` names the first problem; `details` lists every field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope (insufficient_scope), plan without API access (plan_upgrade_required), or plan ended or limit reached (forbidden)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (duplicate resource)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Enrollments"],"summary":"Attach a list","description":"Requires the `enrollments:write` scope. Enrolls the list now and keeps syncing: leads added to it later are enrolled automatically.","responses":{"201":{"description":"Created","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time when the window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request. `message` names the first problem; `details` lists every field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope (insufficient_scope), plan without API access (plan_upgrade_required), or plan ended or limit reached (forbidden)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (duplicate resource)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["listId"],"properties":{"listId":{"type":"string"}}}}}}}},"/campaigns/{id}/lists/{listId}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"listId","in":"path","required":true,"schema":{"type":"string"}}],"delete":{"tags":["Enrollments"],"summary":"Detach a list","description":"Requires the `enrollments:write` scope.","responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time when the window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request. `message` names the first problem; `details` lists every field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope (insufficient_scope), plan without API access (plan_upgrade_required), or plan ended or limit reached (forbidden)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (duplicate resource)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/accounts":{"get":{"tags":["Accounts"],"summary":"List Instagram accounts","description":"Requires the `accounts:read` scope.","responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time when the window resets","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Account"}},"pagination":{"$ref":"#/components/schemas/Pagination"}}}}}},"400":{"description":"Invalid request. `message` names the first problem; `details` lists every field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope (insufficient_scope), plan without API access (plan_upgrade_required), or plan ended or limit reached (forbidden)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (duplicate resource)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/accounts/connect":{"get":{"tags":["Accounts"],"summary":"Countries available for a new account","description":"Requires the `accounts:read` scope.","responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time when the window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request. `message` names the first problem; `details` lists every field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope (insufficient_scope), plan without API access (plan_upgrade_required), or plan ended or limit reached (forbidden)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (duplicate resource)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Accounts"],"summary":"Start connecting an account","description":"Requires the `accounts:write` scope. Opens a hosted browser on the account's own residential proxy. Send the account owner to `liveViewUrl` to sign in, then call `POST /accounts/connect/finalize`. Your code never handles the password.","responses":{"201":{"description":"Created","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time when the window resets","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/BrowserLogin"}}}}}},"400":{"description":"Invalid request. `message` names the first problem; `details` lists every field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope (insufficient_scope), plan without API access (plan_upgrade_required), or plan ended or limit reached (forbidden)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (duplicate resource)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["username","country"],"properties":{"username":{"type":"string"},"country":{"type":"string","description":"Two-letter code from GET /accounts/connect"},"displayName":{"type":"string"},"accountType":{"type":"string","enum":["PERSONAL","BUSINESS","CREATOR"],"default":"PERSONAL"},"warmupEnabled":{"type":"boolean","default":true},"accountAge":{"type":"string","enum":["new","months","established"],"description":"Sets the warm-up length"}}}}}}}},"/accounts/connect/finalize":{"post":{"tags":["Accounts"],"summary":"Finish connecting after the owner signs in","description":"Requires the `accounts:write` scope.","responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time when the window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request. `message` names the first problem; `details` lists every field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope (insufficient_scope), plan without API access (plan_upgrade_required), or plan ended or limit reached (forbidden)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (duplicate resource)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["accountId","browserSessionId"],"properties":{"accountId":{"type":"string"},"browserSessionId":{"type":"string"}}}}}}}},"/accounts/connect/cancel":{"post":{"tags":["Accounts"],"summary":"Abandon a connection","description":"Requires the `accounts:write` scope.","responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time when the window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request. `message` names the first problem; `details` lists every field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope (insufficient_scope), plan without API access (plan_upgrade_required), or plan ended or limit reached (forbidden)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (duplicate resource)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["accountId"],"properties":{"accountId":{"type":"string"},"browserSessionId":{"type":"string"}}}}}}}},"/accounts/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"tags":["Accounts"],"summary":"Get an account","description":"Requires the `accounts:read` scope.","responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time when the window resets","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Account"}}}}}},"400":{"description":"Invalid request. `message` names the first problem; `details` lists every field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope (insufficient_scope), plan without API access (plan_upgrade_required), or plan ended or limit reached (forbidden)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (duplicate resource)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"tags":["Accounts"],"summary":"Update account settings","description":"Requires the `accounts:write` scope.","responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time when the window resets","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Account"}}}}}},"400":{"description":"Invalid request. `message` names the first problem; `details` lists every field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope (insufficient_scope), plan without API access (plan_upgrade_required), or plan ended or limit reached (forbidden)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (duplicate resource)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"displayName":{"type":"string"},"dailyMessageLimit":{"type":"integer","minimum":1,"maximum":200},"hourlyMessageLimit":{"type":"integer","minimum":1,"maximum":50},"timezone":{"type":"string","description":"IANA time zone"},"sendingDays":{"type":"array","items":{"type":"integer","minimum":0,"maximum":6},"description":"0 is Sunday"},"businessHourStart":{"type":"integer","minimum":0,"maximum":1439,"description":"Minutes from midnight"},"businessHourEnd":{"type":"integer","minimum":0,"maximum":1439,"description":"Minutes from midnight"},"warmupEnabled":{"type":"boolean"},"warmupDayTarget":{"type":"integer","minimum":1,"maximum":60}}}}}}},"delete":{"tags":["Accounts"],"summary":"Remove an account","description":"Requires the `accounts:write` scope.","responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time when the window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request. `message` names the first problem; `details` lists every field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope (insufficient_scope), plan without API access (plan_upgrade_required), or plan ended or limit reached (forbidden)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (duplicate resource)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/accounts/{id}/reconnect":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"tags":["Accounts"],"summary":"Sign a disconnected account back in","description":"Requires the `accounts:write` scope. Same hosted login as a new connection: send the owner to `liveViewUrl`, then call `POST /accounts/connect/finalize`.","responses":{"201":{"description":"Created","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time when the window resets","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/BrowserLogin"}}}}}},"400":{"description":"Invalid request. `message` names the first problem; `details` lists every field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope (insufficient_scope), plan without API access (plan_upgrade_required), or plan ended or limit reached (forbidden)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (duplicate resource)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/accounts/{id}/status":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"tags":["Accounts"],"summary":"Pause, resume or disconnect an account","description":"Requires the `accounts:write` scope.","responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time when the window resets","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Account"}}}}}},"400":{"description":"Invalid request. `message` names the first problem; `details` lists every field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope (insufficient_scope), plan without API access (plan_upgrade_required), or plan ended or limit reached (forbidden)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (duplicate resource)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["action"],"properties":{"action":{"type":"string","enum":["pause","resume","disconnect"]}}}}}}}},"/accounts/{id}/health":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"tags":["Accounts"],"summary":"Run a health check","description":"Requires the `accounts:write` scope.","responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time when the window resets","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Account"}}}}}},"400":{"description":"Invalid request. `message` names the first problem; `details` lists every field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope (insufficient_scope), plan without API access (plan_upgrade_required), or plan ended or limit reached (forbidden)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (duplicate resource)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/accounts/{id}/messages":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"tags":["Accounts"],"summary":"List messages sent from or received by this account","description":"Requires the `inbox:read` scope.","responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time when the window resets","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Message"}},"pagination":{"$ref":"#/components/schemas/Pagination"}}}}}},"400":{"description":"Invalid request. `message` names the first problem; `details` lists every field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope (insufficient_scope), plan without API access (plan_upgrade_required), or plan ended or limit reached (forbidden)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (duplicate resource)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"cursor","in":"query","schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","default":25,"maximum":100}},{"name":"direction","in":"query","schema":{"type":"string","enum":["INBOUND","OUTBOUND"]}}]},"post":{"tags":["Accounts"],"summary":"Send a DM from this account to any handle","description":"Requires the `inbox:write` scope.","responses":{"201":{"description":"Created","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time when the window resets","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Message"}}}}}},"400":{"description":"Invalid request. `message` names the first problem; `details` lists every field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope (insufficient_scope), plan without API access (plan_upgrade_required), or plan ended or limit reached (forbidden)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (duplicate resource)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["recipientHandle","message"],"properties":{"recipientHandle":{"type":"string","description":"The handle to message, with or without the @"},"message":{"type":"string","minLength":1,"maxLength":2000},"recipientIgUserId":{"type":"string","description":"Optional numeric Instagram user id"}}}}}}}},"/inbox/threads":{"get":{"tags":["Inbox"],"summary":"List conversations","description":"Requires the `inbox:read` scope.","responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time when the window resets","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Thread"}},"pagination":{"$ref":"#/components/schemas/Pagination"}}}}}},"400":{"description":"Invalid request. `message` names the first problem; `details` lists every field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope (insufficient_scope), plan without API access (plan_upgrade_required), or plan ended or limit reached (forbidden)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (duplicate resource)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"cursor","in":"query","schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","default":40,"maximum":100}},{"name":"filter","in":"query","schema":{"type":"string","enum":["all","unread","assigned","closed"]}},{"name":"accountId","in":"query","schema":{"type":"string"}},{"name":"search","in":"query","schema":{"type":"string"}}]}},"/inbox/counts":{"get":{"tags":["Inbox"],"summary":"Unread and open counts","description":"Requires the `inbox:read` scope.","responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time when the window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request. `message` names the first problem; `details` lists every field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope (insufficient_scope), plan without API access (plan_upgrade_required), or plan ended or limit reached (forbidden)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (duplicate resource)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/inbox/threads/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"tags":["Inbox"],"summary":"Get a conversation with its messages","description":"Requires the `inbox:read` scope.","responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time when the window resets","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Thread"}}}}}},"400":{"description":"Invalid request. `message` names the first problem; `details` lists every field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope (insufficient_scope), plan without API access (plan_upgrade_required), or plan ended or limit reached (forbidden)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (duplicate resource)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/inbox/threads/{id}/reply":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"tags":["Inbox"],"summary":"Send a reply","description":"Requires the `inbox:write` scope.","responses":{"201":{"description":"Created","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time when the window resets","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Message"}}}}}},"400":{"description":"Invalid request. `message` names the first problem; `details` lists every field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope (insufficient_scope), plan without API access (plan_upgrade_required), or plan ended or limit reached (forbidden)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (duplicate resource)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["body"],"properties":{"body":{"type":"string","minLength":1,"maxLength":2000}}}}}}}},"/inbox/threads/{id}/read":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"tags":["Inbox"],"summary":"Mark read or unread","description":"Requires the `inbox:write` scope.","responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time when the window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request. `message` names the first problem; `details` lists every field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope (insufficient_scope), plan without API access (plan_upgrade_required), or plan ended or limit reached (forbidden)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (duplicate resource)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"read":{"type":"boolean","default":true}}}}}}}},"/inbox/threads/{id}/status":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"tags":["Inbox"],"summary":"Set thread status","description":"Requires the `inbox:write` scope.","responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time when the window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request. `message` names the first problem; `details` lists every field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope (insufficient_scope), plan without API access (plan_upgrade_required), or plan ended or limit reached (forbidden)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (duplicate resource)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["status"],"properties":{"status":{"type":"string","enum":["OPEN","SNOOZED","CLOSED","ARCHIVED"]}}}}}}}},"/inbox/threads/{id}/assign":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"tags":["Inbox"],"summary":"Assign or unassign a thread","description":"Requires the `inbox:write` scope.","responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time when the window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request. `message` names the first problem; `details` lists every field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope (insufficient_scope), plan without API access (plan_upgrade_required), or plan ended or limit reached (forbidden)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (duplicate resource)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","nullable":true,"description":"From GET /members. Omit or null to unassign."}}}}}}}},"/inbox/threads/{id}/labels":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"tags":["Inbox"],"summary":"Toggle a label on a thread","description":"Requires the `inbox:write` scope.","responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time when the window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request. `message` names the first problem; `details` lists every field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope (insufficient_scope), plan without API access (plan_upgrade_required), or plan ended or limit reached (forbidden)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (duplicate resource)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["labelId"],"properties":{"labelId":{"type":"string"}}}}}}}},"/inbox/threads/{id}/notes":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"tags":["Inbox"],"summary":"List internal notes","description":"Requires the `inbox:read` scope.","responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time when the window resets","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Note"}},"pagination":{"$ref":"#/components/schemas/Pagination"}}}}}},"400":{"description":"Invalid request. `message` names the first problem; `details` lists every field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope (insufficient_scope), plan without API access (plan_upgrade_required), or plan ended or limit reached (forbidden)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (duplicate resource)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Inbox"],"summary":"Add an internal note","description":"Requires the `inbox:write` scope.","responses":{"201":{"description":"Created","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time when the window resets","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Note"}}}}}},"400":{"description":"Invalid request. `message` names the first problem; `details` lists every field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope (insufficient_scope), plan without API access (plan_upgrade_required), or plan ended or limit reached (forbidden)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (duplicate resource)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["body"],"properties":{"body":{"type":"string","minLength":1,"maxLength":2000}}}}}}}},"/labels":{"get":{"tags":["Inbox"],"summary":"List labels","description":"Requires the `inbox:read` scope.","responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time when the window resets","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Label"}},"pagination":{"$ref":"#/components/schemas/Pagination"}}}}}},"400":{"description":"Invalid request. `message` names the first problem; `details` lists every field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope (insufficient_scope), plan without API access (plan_upgrade_required), or plan ended or limit reached (forbidden)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (duplicate resource)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Inbox"],"summary":"Create a label","description":"Requires the `inbox:write` scope.","responses":{"201":{"description":"Created","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time when the window resets","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Label"}}}}}},"400":{"description":"Invalid request. `message` names the first problem; `details` lists every field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope (insufficient_scope), plan without API access (plan_upgrade_required), or plan ended or limit reached (forbidden)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (duplicate resource)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"color":{"type":"string"}}}}}}}},"/labels/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"delete":{"tags":["Inbox"],"summary":"Delete a label","description":"Requires the `inbox:write` scope.","responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time when the window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request. `message` names the first problem; `details` lists every field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope (insufficient_scope), plan without API access (plan_upgrade_required), or plan ended or limit reached (forbidden)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (duplicate resource)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/analytics":{"get":{"tags":["Analytics"],"summary":"Headline metrics (same as /analytics/overview)","description":"Requires the `analytics:read` scope.","responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time when the window resets","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/AnalyticsOverview"}}}}}},"400":{"description":"Invalid request. `message` names the first problem; `details` lists every field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope (insufficient_scope), plan without API access (plan_upgrade_required), or plan ended or limit reached (forbidden)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (duplicate resource)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"days","in":"query","schema":{"type":"integer","enum":[7,30,90],"default":30}}]}},"/analytics/overview":{"get":{"tags":["Analytics"],"summary":"Headline metrics","description":"Requires the `analytics:read` scope.","responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time when the window resets","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/AnalyticsOverview"}}}}}},"400":{"description":"Invalid request. `message` names the first problem; `details` lists every field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope (insufficient_scope), plan without API access (plan_upgrade_required), or plan ended or limit reached (forbidden)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (duplicate resource)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"days","in":"query","schema":{"type":"integer","enum":[7,30,90],"default":30}}]}},"/analytics/timeseries":{"get":{"tags":["Analytics"],"summary":"Sends and replies per day","description":"Requires the `analytics:read` scope.","responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time when the window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request. `message` names the first problem; `details` lists every field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope (insufficient_scope), plan without API access (plan_upgrade_required), or plan ended or limit reached (forbidden)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (duplicate resource)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"days","in":"query","schema":{"type":"integer","enum":[7,30,90],"default":30}}]}},"/analytics/funnel":{"get":{"tags":["Analytics"],"summary":"Sent, replied, positive","description":"Requires the `analytics:read` scope.","responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time when the window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request. `message` names the first problem; `details` lists every field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope (insufficient_scope), plan without API access (plan_upgrade_required), or plan ended or limit reached (forbidden)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (duplicate resource)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"days","in":"query","schema":{"type":"integer","enum":[7,30,90],"default":30}}]}},"/analytics/campaigns":{"get":{"tags":["Analytics"],"summary":"Per-campaign performance","description":"Requires the `analytics:read` scope.","responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time when the window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request. `message` names the first problem; `details` lists every field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope (insufficient_scope), plan without API access (plan_upgrade_required), or plan ended or limit reached (forbidden)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (duplicate resource)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"days","in":"query","schema":{"type":"integer","enum":[7,30,90],"default":30}}]}},"/analytics/accounts":{"get":{"tags":["Analytics"],"summary":"Per-account performance","description":"Requires the `analytics:read` scope.","responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time when the window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request. `message` names the first problem; `details` lists every field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope (insufficient_scope), plan without API access (plan_upgrade_required), or plan ended or limit reached (forbidden)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (duplicate resource)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"days","in":"query","schema":{"type":"integer","enum":[7,30,90],"default":30}}]}},"/analytics/activity":{"get":{"tags":["Analytics"],"summary":"Recent activity feed","description":"Requires the `analytics:read` scope.","responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time when the window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request. `message` names the first problem; `details` lists every field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope (insufficient_scope), plan without API access (plan_upgrade_required), or plan ended or limit reached (forbidden)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (duplicate resource)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/blocklist":{"get":{"tags":["Blocklist"],"summary":"List suppressed handles","description":"Requires the `blocklist:read` scope.","responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time when the window resets","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/BlocklistEntry"}},"pagination":{"$ref":"#/components/schemas/Pagination"}}}}}},"400":{"description":"Invalid request. `message` names the first problem; `details` lists every field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope (insufficient_scope), plan without API access (plan_upgrade_required), or plan ended or limit reached (forbidden)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (duplicate resource)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"page","in":"query","schema":{"type":"integer","default":1}},{"name":"pageSize","in":"query","schema":{"type":"integer","default":25,"maximum":100}},{"name":"search","in":"query","schema":{"type":"string"}}]},"post":{"tags":["Blocklist"],"summary":"Suppress a handle","description":"Requires the `blocklist:write` scope.","responses":{"201":{"description":"Created","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time when the window resets","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/BlocklistEntry"}}}}}},"400":{"description":"Invalid request. `message` names the first problem; `details` lists every field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope (insufficient_scope), plan without API access (plan_upgrade_required), or plan ended or limit reached (forbidden)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (duplicate resource)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["instagramHandle"],"properties":{"instagramHandle":{"type":"string"},"reason":{"type":"string"}}}}}}}},"/blocklist/bulk":{"post":{"tags":["Blocklist"],"summary":"Suppress many handles","description":"Requires the `blocklist:write` scope.","responses":{"201":{"description":"Created","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time when the window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request. `message` names the first problem; `details` lists every field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope (insufficient_scope), plan without API access (plan_upgrade_required), or plan ended or limit reached (forbidden)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (duplicate resource)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["handles"],"properties":{"handles":{"type":"array","items":{"type":"string"},"maxItems":5000},"reason":{"type":"string"}}}}}}}},"/blocklist/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"delete":{"tags":["Blocklist"],"summary":"Remove a suppressed handle","description":"Requires the `blocklist:write` scope.","responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time when the window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request. `message` names the first problem; `details` lists every field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope (insufficient_scope), plan without API access (plan_upgrade_required), or plan ended or limit reached (forbidden)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (duplicate resource)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/me":{"get":{"tags":["Team"],"summary":"Check your API key","description":"Works with any valid key and needs no scope. Returns the workspace, plan, plan status and the key's scopes.","responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time when the window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request. `message` names the first problem; `details` lists every field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope (insufficient_scope), plan without API access (plan_upgrade_required), or plan ended or limit reached (forbidden)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (duplicate resource)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/members":{"get":{"tags":["Team"],"summary":"List workspace members","description":"Requires the `team:read` scope.","responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time when the window resets","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Member"}},"pagination":{"$ref":"#/components/schemas/Pagination"}}}}}},"400":{"description":"Invalid request. `message` names the first problem; `details` lists every field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope (insufficient_scope), plan without API access (plan_upgrade_required), or plan ended or limit reached (forbidden)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (duplicate resource)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/webhooks":{"get":{"tags":["Webhooks"],"summary":"List webhook endpoints","description":"Requires the `webhooks:read` scope.","responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time when the window resets","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Webhook"}},"pagination":{"$ref":"#/components/schemas/Pagination"}}}}}},"400":{"description":"Invalid request. `message` names the first problem; `details` lists every field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope (insufficient_scope), plan without API access (plan_upgrade_required), or plan ended or limit reached (forbidden)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (duplicate resource)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Webhooks"],"summary":"Create a webhook endpoint","description":"Requires the `webhooks:write` scope. The response includes the plaintext signing secret (`whsec_…`) exactly once. Store it now: it is never returned again.","responses":{"201":{"description":"Created","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time when the window resets","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Webhook"}}}}}},"400":{"description":"Invalid request. `message` names the first problem; `details` lists every field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope (insufficient_scope), plan without API access (plan_upgrade_required), or plan ended or limit reached (forbidden)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (duplicate resource)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["url","events"],"properties":{"url":{"type":"string","description":"A public https:// URL"},"events":{"type":"array","items":{"type":"string"},"description":"Event types to subscribe to (see GET /webhooks/events)"}}}}}}}},"/webhooks/events":{"get":{"tags":["Webhooks"],"summary":"List subscribable event types","description":"Requires the `webhooks:read` scope.","responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time when the window resets","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"string","example":"reply.received"}}}}}}},"400":{"description":"Invalid request. `message` names the first problem; `details` lists every field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope (insufficient_scope), plan without API access (plan_upgrade_required), or plan ended or limit reached (forbidden)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (duplicate resource)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/webhooks/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"tags":["Webhooks"],"summary":"Get a webhook endpoint","description":"Requires the `webhooks:read` scope.","responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time when the window resets","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Webhook"}}}}}},"400":{"description":"Invalid request. `message` names the first problem; `details` lists every field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope (insufficient_scope), plan without API access (plan_upgrade_required), or plan ended or limit reached (forbidden)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (duplicate resource)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"tags":["Webhooks"],"summary":"Update a webhook endpoint","description":"Requires the `webhooks:write` scope.","responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time when the window resets","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Webhook"}}}}}},"400":{"description":"Invalid request. `message` names the first problem; `details` lists every field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope (insufficient_scope), plan without API access (plan_upgrade_required), or plan ended or limit reached (forbidden)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (duplicate resource)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"},"events":{"type":"array","items":{"type":"string"}},"enabled":{"type":"boolean"}}}}}}},"delete":{"tags":["Webhooks"],"summary":"Delete a webhook endpoint","description":"Requires the `webhooks:write` scope.","responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time when the window resets","schema":{"type":"integer"}}}},"400":{"description":"Invalid request. `message` names the first problem; `details` lists every field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope (insufficient_scope), plan without API access (plan_upgrade_required), or plan ended or limit reached (forbidden)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (duplicate resource)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/webhooks/{id}/test":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"tags":["Webhooks"],"summary":"Send a test delivery to the endpoint now","description":"Requires the `webhooks:write` scope.","responses":{"200":{"description":"The test delivery was attempted; the body reports the outcome.","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time when the window resets","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean"},"statusCode":{"type":"integer","nullable":true},"error":{"type":"string","nullable":true}}}}}}}},"400":{"description":"Invalid request. `message` names the first problem; `details` lists every field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope (insufficient_scope), plan without API access (plan_upgrade_required), or plan ended or limit reached (forbidden)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (duplicate resource)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/webhooks/{id}/deliveries":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"tags":["Webhooks"],"summary":"List recent deliveries for a webhook","description":"Requires the `webhooks:read` scope.","responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time when the window resets","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/WebhookDelivery"}},"pagination":{"$ref":"#/components/schemas/Pagination"}}}}}},"400":{"description":"Invalid request. `message` names the first problem; `details` lists every field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope (insufficient_scope), plan without API access (plan_upgrade_required), or plan ended or limit reached (forbidden)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (duplicate resource)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"page","in":"query","schema":{"type":"integer","default":1}},{"name":"pageSize","in":"query","schema":{"type":"integer","default":25,"maximum":100}}]}}}}