{"openapi":"3.0.3","info":{"title":"8Leads API","version":"1.0.0","description":"The 8Leads public REST API — push and pull leads, run campaigns, read your inbox, and pull analytics.\n\nAuthenticate with an API key: `Authorization: Bearer 8l_live_…`. Keys carry scopes (`read`/`write` or `<resource>:<read|write>`). Rate limited to 120 requests/minute per key; every response includes `X-RateLimit-*` headers and 429s include `Retry-After`. Errors are `{ \"error\": { \"code\", \"message\" } }`."},"servers":[{"url":"https://8leads.io/api/v1"}],"security":[{"bearerAuth":[]}],"tags":[{"name":"Leads"},{"name":"Lists"},{"name":"Tags"},{"name":"Custom Fields"},{"name":"Imports"},{"name":"Campaigns"},{"name":"Enrollments"},{"name":"Accounts"},{"name":"Inbox"},{"name":"Analytics"},{"name":"Blocklist"},{"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}}}}},"Pagination":{"type":"object","description":"Page-native lists return page/pageSize/total/pageCount; cursor lists return nextCursor.","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"},"fullName":{"type":"string","nullable":true},"firstName":{"type":"string","nullable":true},"company":{"type":"string","nullable":true},"email":{"type":"string","nullable":true},"status":{"type":"string","example":"NEW"},"attributes":{"type":"object","nullable":true,"description":"Arbitrary merge-tag columns"},"createdAt":{"type":"string","format":"date-time"}}},"LeadList":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"prospectCount":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"}}},"Tag":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"color":{"type":"string","nullable":true}}},"CustomField":{"type":"object","properties":{"id":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"type":{"type":"string"}}},"Import":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"},"totalRows":{"type":"integer"},"importedRows":{"type":"integer"},"duplicateRows":{"type":"integer"},"errorRows":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"}}},"Campaign":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"status":{"type":"string","example":"ACTIVE"},"prospectCount":{"type":"integer"},"sentCount":{"type":"integer"},"replyCount":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"}}},"Enrollment":{"type":"object","properties":{"id":{"type":"string"},"prospectId":{"type":"string"},"campaignId":{"type":"string"},"status":{"type":"string","example":"ACTIVE"},"currentStepPosition":{"type":"integer"},"nextRunAt":{"type":"string","format":"date-time","nullable":true}}},"Account":{"type":"object","properties":{"id":{"type":"string"},"username":{"type":"string"},"status":{"type":"string"},"healthScore":{"type":"integer","nullable":true},"totalMessagesSent":{"type":"integer"}}},"Thread":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","example":"OPEN"},"unread":{"type":"boolean"},"prospectId":{"type":"string"},"instagramAccountId":{"type":"string"},"lastMessageAt":{"type":"string","format":"date-time","nullable":true}}},"Message":{"type":"object","properties":{"id":{"type":"string"},"direction":{"type":"string","example":"OUTBOUND"},"body":{"type":"string"},"sentiment":{"type":"string","nullable":true},"isReply":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"}}},"AnalyticsOverview":{"type":"object","properties":{"messagesSent":{"type":"integer"},"replies":{"type":"integer"},"positiveReplies":{"type":"integer"},"replyRate":{"type":"number"},"positiveRate":{"type":"number"},"connectedAccounts":{"type":"integer"},"activeCampaigns":{"type":"integer"}}},"BlocklistEntry":{"type":"object","properties":{"id":{"type":"string"},"instagramHandle":{"type":"string"},"reason":{"type":"string","nullable":true},"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","example":"SUCCESS"},"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","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":"The API key is missing the required scope","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"}}}},"422":{"description":"Validation failed","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"}},{"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","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":"The API key is missing the required scope","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"}}}},"422":{"description":"Validation failed","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"},"fullName":{"type":"string"},"firstName":{"type":"string"},"company":{"type":"string"},"email":{"type":"string"},"listId":{"type":"string"},"attributes":{"type":"object"}}}}}}}},"/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","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":"The API key is missing the required scope","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"}}}},"422":{"description":"Validation failed","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","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":"The API key is missing the required scope","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"}}}},"422":{"description":"Validation failed","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"}}}}},"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","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":"The API key is missing the required scope","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"}}}},"422":{"description":"Validation failed","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 from its live Instagram profile","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","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":"The API key is missing the required scope","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"}}}},"422":{"description":"Validation failed","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":{"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","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":"The API key is missing the required scope","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"}}}},"422":{"description":"Validation failed","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","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":"The API key is missing the required scope","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"}}}},"422":{"description":"Validation failed","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":{"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","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":"The API key is missing the required scope","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"}}}},"422":{"description":"Validation failed","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","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":"The API key is missing the required scope","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"}}}},"422":{"description":"Validation failed","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 recent imports","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/Import"}},"pagination":{"$ref":"#/components/schemas/Pagination"}}}}}},"400":{"description":"Invalid request","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":"The API key is missing the required scope","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"}}}},"422":{"description":"Validation failed","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.","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/Import"}}}}}},"400":{"description":"Invalid request","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":"The API key is missing the required scope","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"}}}},"422":{"description":"Validation failed","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","description":"Column → field mapping"},"rows":{"type":"array","items":{"type":"object"},"description":"Up to 20,000 rows"},"listId":{"type":"string"},"newListName":{"type":"string"}}}}}}}},"/imports/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"tags":["Imports"],"summary":"Get an import","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/Import"}}}}}},"400":{"description":"Invalid request","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":"The API key is missing the required scope","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"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/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","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":"The API key is missing the required scope","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"}}}},"422":{"description":"Validation failed","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","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":"The API key is missing the required scope","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"}}}},"422":{"description":"Validation failed","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"}}}}}}}},"/lists/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"patch":{"tags":["Lists"],"summary":"Rename 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","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":"The API key is missing the required scope","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"}}}},"422":{"description":"Validation failed","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"}}}}},"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","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":"The API key is missing the required scope","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"}}}},"422":{"description":"Validation failed","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","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":"The API key is missing the required scope","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"}}}},"422":{"description":"Validation failed","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","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":"The API key is missing the required scope","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"}}}},"422":{"description":"Validation failed","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","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":"The API key is missing the required scope","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"}}}},"422":{"description":"Validation failed","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","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":"The API key is missing the required scope","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"}}}},"422":{"description":"Validation failed","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","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":"The API key is missing the required scope","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"}}}},"422":{"description":"Validation failed","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"}}}}}},"/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","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":"The API key is missing the required scope","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"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/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","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":"The API key is missing the required scope","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"}}}},"422":{"description":"Validation failed","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 campaign","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","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":"The API key is missing the required scope","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"}}}},"422":{"description":"Validation failed","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 sequence + 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","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":"The API key is missing the required scope","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"}}}},"422":{"description":"Validation failed","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","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":"The API key is missing the required scope","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"}}}},"422":{"description":"Validation failed","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"}}}}},"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","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":"The API key is missing the required scope","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"}}}},"422":{"description":"Validation failed","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.","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","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":"The API key is missing the required scope","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"}}}},"422":{"description":"Validation failed","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","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":"The API key is missing the required scope","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"}}}},"422":{"description":"Validation failed","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","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":"The API key is missing the required scope","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"}}}},"422":{"description":"Validation failed","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","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":"The API key is missing the required scope","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"}}}},"422":{"description":"Validation failed","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.","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","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":"The API key is missing the required scope","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"}}}},"422":{"description":"Validation failed","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"}}}}}},"/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.","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","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":"The API key is missing the required scope","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"}}}},"422":{"description":"Validation failed","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","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","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":"The API key is missing the required scope","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"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/campaigns/{id}/enrollments":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"tags":["Enrollments"],"summary":"List enrollments","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/Enrollment"}},"pagination":{"$ref":"#/components/schemas/Pagination"}}}}}},"400":{"description":"Invalid request","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":"The API key is missing the required scope","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"}}}},"422":{"description":"Validation failed","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":"Enroll leads by id","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/Enrollment"}}}}}},"400":{"description":"Invalid request","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":"The API key is missing the required scope","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"}}}},"422":{"description":"Validation failed","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"}}}}}}}},"delete":{"tags":["Enrollments"],"summary":"Unenroll leads","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","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":"The API key is missing the required scope","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"}}}},"422":{"description":"Validation failed","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"}}}}}},"/campaigns/{id}/enrollments/from-list":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"tags":["Enrollments"],"summary":"Enroll all leads in a list","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","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":"The API key is missing the required scope","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"}}}},"422":{"description":"Validation failed","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 `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","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":"The API key is missing the required scope","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"}}}},"422":{"description":"Validation failed","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"}}}}}}}}},"/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","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":"The API key is missing the required scope","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"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/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","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":"The API key is missing the required scope","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"}}}},"422":{"description":"Validation failed","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","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":"The API key is missing the required scope","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"}}}},"422":{"description":"Validation failed","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"}}}}}},"/accounts/{id}/status":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"tags":["Accounts"],"summary":"Pause / resume / 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","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":"The API key is missing the required scope","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"}}}},"422":{"description":"Validation failed","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","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":"The API key is missing the required scope","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"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/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","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":"The API key is missing the required scope","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"}}}},"422":{"description":"Validation failed","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":"filter","in":"query","schema":{"type":"string","enum":["all","unread","assigned","closed"]}},{"name":"accountId","in":"query","schema":{"type":"string"}}]}},"/inbox/counts":{"get":{"tags":["Inbox"],"summary":"Unread / 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","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":"The API key is missing the required scope","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"}}}},"422":{"description":"Validation failed","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 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","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":"The API key is missing the required scope","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"}}}},"422":{"description":"Validation failed","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","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":"The API key is missing the required scope","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"}}}},"422":{"description":"Validation failed","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"}}}}}}}},"/inbox/threads/{id}/read":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"tags":["Inbox"],"summary":"Mark read/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","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":"The API key is missing the required scope","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"}}}},"422":{"description":"Validation failed","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"}}}}}},"/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","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":"The API key is missing the required scope","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"}}}},"422":{"description":"Validation failed","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 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","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":"The API key is missing the required scope","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"}}}},"422":{"description":"Validation failed","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"}}}}}},"/inbox/threads/{id}/labels":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"tags":["Inbox"],"summary":"Toggle 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","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":"The API key is missing the required scope","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"}}}},"422":{"description":"Validation failed","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"}}}}}},"/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"}}}},"400":{"description":"Invalid request","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":"The API key is missing the required scope","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"}}}},"422":{"description":"Validation failed","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":{"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","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":"The API key is missing the required scope","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"}}}},"422":{"description":"Validation failed","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"}}}}}}}},"/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","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":"The API key is missing the required scope","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"}}}},"422":{"description":"Validation failed","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/replies over time","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","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":"The API key is missing the required scope","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"}}}},"422":{"description":"Validation failed","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":"Outreach funnel","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","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":"The API key is missing the required scope","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"}}}},"422":{"description":"Validation failed","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","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":"The API key is missing the required scope","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"}}}},"422":{"description":"Validation failed","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","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":"The API key is missing the required scope","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"}}}},"422":{"description":"Validation failed","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","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":"The API key is missing the required scope","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"}}}},"422":{"description":"Validation failed","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}}]}},"/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","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":"The API key is missing the required scope","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"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"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","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":"The API key is missing the required scope","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"}}}},"422":{"description":"Validation failed","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/{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","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":"The API key is missing the required scope","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"}}}},"422":{"description":"Validation failed","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","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":"The API key is missing the required scope","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"}}}},"422":{"description":"Validation failed","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","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":"The API key is missing the required scope","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"}}}},"422":{"description":"Validation failed","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":"HTTPS endpoint that will receive event POSTs"},"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","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":"The API key is missing the required scope","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"}}}},"422":{"description":"Validation failed","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","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":"The API key is missing the required scope","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"}}}},"422":{"description":"Validation failed","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","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":"The API key is missing the required scope","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"}}}},"422":{"description":"Validation failed","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","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":"The API key is missing the required scope","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"}}}},"422":{"description":"Validation failed","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","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":"The API key is missing the required scope","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"}}}},"422":{"description":"Validation failed","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","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":"The API key is missing the required scope","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"}}}},"422":{"description":"Validation failed","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}}]}}}}