{"openapi":"3.1.0","info":{"title":"Needle API","version":"1.0.0","description":"Public REST API for Needle Agents. Authenticate every request with `Authorization: Bearer sk-ndl-…`. Each API key is bound to one user and one workspace."},"servers":[{"url":"/","description":"This server"}],"tags":[{"name":"Me"},{"name":"Connected accounts"},{"name":"Leads"},{"name":"Campaigns"},{"name":"Drafts"},{"name":"Events"},{"name":"LinkedIn"},{"name":"Instagram"},{"name":"Places"},{"name":"Compose"},{"name":"Files"},{"name":"Suppressions"},{"name":"Webhooks"}],"security":[{"bearerAuth":[]}],"paths":{"/api/v1/me":{"get":{"tags":["Me"],"operationId":"getMe","summary":"Get the authenticated user","description":"Returns the user and the workspace (`organization`) this API key is bound to.","responses":{"200":{"description":"The authenticated user.","content":{"application/json":{"schema":{"type":"object","properties":{"user":{"$ref":"#/components/schemas/MeUser"},"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Id of this request, for support and troubleshooting"}},"required":["user","requestId"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized: missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Invalid request payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/connected-accounts":{"get":{"tags":["Connected accounts"],"operationId":"listConnectedAccounts","summary":"List connected accounts","parameters":[{"in":"query","name":"cursor","schema":{"type":"string","minLength":1}},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"A page of connected accounts, newest first. Pass nextCursor as cursor for the next page.","content":{"application/json":{"schema":{"type":"object","properties":{"connectedAccounts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"ownerUserId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"ownerOrgId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"channel":{"type":"string","enum":["linkedin","instagram"]},"status":{"type":"string","enum":["active","paused","auth_required","disconnected","connecting","suspended"]},"properties":{"oneOf":[{"type":"object","properties":{"channel":{"type":"string","const":"linkedin"},"tier":{"anyOf":[{"type":"string","enum":["classic","premium","recruiter","sales_navigator"],"description":"Deprecated: use `products`. One product at most, kept on accounts not read since products were introduced."},{"type":"null"}]},"products":{"anyOf":[{"type":"object","properties":{"premium":{"type":"boolean","description":"LinkedIn Premium is on the account."},"salesNavigator":{"type":"boolean","description":"A Sales Navigator seat of any edition (Core, Advanced or Advanced Plus) is on the account. Needed for InMail and Sales Navigator search."},"recruiter":{"type":"boolean","description":"A LinkedIn Recruiter seat is on the account. Needed for Recruiter job postings."}},"required":["premium","salesNavigator","recruiter"],"additionalProperties":false,"description":"LinkedIn products on the account. LinkedIn sells them separately, so any mix is possible. Read again when the account is connected, reconnected or tested. Missing on accounts not read since products were introduced."},{"type":"null"}]}},"required":["channel"],"additionalProperties":false},{"type":"object","properties":{"channel":{"type":"string","const":"instagram"}},"required":["channel"],"additionalProperties":false}],"type":"object"},"displayName":{"anyOf":[{"type":"string"},{"type":"null"}]},"channelIdentity":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"proxy":{"description":"Proxy this account uses.","anyOf":[{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"automatic"},"country":{"anyOf":[{"type":"string","enum":["ae","ao","ar","at","au","bd","be","bg","br","ca","ch","cl","cn","co","cy","cz","de","dk","ee","eg","es","fi","fr","gb","gt","hk","id","ie","il","in","it","jp","kr","kz","ma","mx","my","nl","no","pa","pk","pl","pr","pt","ro","sa","se","sg","th","tn","tr","ua","us","vn","za"]},{"type":"null"}]}},"required":["kind","country"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"custom"},"host":{"type":"string"},"port":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"username":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["kind","host","port","username"],"additionalProperties":false}],"type":"object"},{"type":"null"}]},"limitOverrides":{"anyOf":[{"type":"object","propertyNames":{"type":"string","enum":["linkedin_invitation","linkedin_cancel_invitation","linkedin_message","linkedin_inmail","linkedin_profile_view","linkedin_search","linkedin_comment","linkedin_reaction","instagram_message","instagram_profile_view","instagram_follow","instagram_unfollow","instagram_comment","instagram_reaction","instagram_post"]},"additionalProperties":{"type":"object","properties":{"hour":{"anyOf":[{"type":"integer","minimum":1,"maximum":1000},{"type":"null"}],"description":"Hourly cap. Null when this action has no hourly cap."},"day":{"type":"integer","minimum":1,"maximum":10000,"description":"Daily cap."},"week":{"anyOf":[{"type":"integer","minimum":1,"maximum":50000},{"type":"null"}],"description":"Weekly cap. Null when this action has no weekly cap."}},"required":["hour","day","week"],"additionalProperties":false,"description":"Effective caps for one action on the connected account."}},{"type":"null"}]},"nextActionAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"pausedUntil":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"consecutiveFailures":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"lastErrorKind":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"updatedBy":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"deletedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"deletedBy":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"canUse":{"type":"boolean","description":"Whether you can run campaigns and send messages as this account. Its owner, or anyone it is shared with, can. Use only accounts where this is true."}},"required":["id","ownerUserId","ownerOrgId","channel","status","properties","displayName","channelIdentity","imageUrl","limitOverrides","nextActionAt","pausedUntil","consecutiveFailures","lastErrorKind","createdAt","updatedAt","updatedBy","deletedAt","deletedBy","canUse"],"additionalProperties":false}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]},"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Id of this request, for support and troubleshooting"}},"required":["connectedAccounts","nextCursor","requestId"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized: missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Invalid request payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/connected-accounts/{connectedAccountId}":{"get":{"tags":["Connected accounts"],"operationId":"getConnectedAccount","summary":"Get a connected account","parameters":[{"in":"path","name":"connectedAccountId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Connected account id"},"required":true,"description":"Connected account id"}],"responses":{"200":{"description":"Account and usage.","content":{"application/json":{"schema":{"type":"object","properties":{"connectedAccount":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"ownerUserId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"ownerOrgId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"channel":{"type":"string","enum":["linkedin","instagram"]},"status":{"type":"string","enum":["active","paused","auth_required","disconnected","connecting","suspended"]},"properties":{"oneOf":[{"type":"object","properties":{"channel":{"type":"string","const":"linkedin"},"tier":{"anyOf":[{"type":"string","enum":["classic","premium","recruiter","sales_navigator"],"description":"Deprecated: use `products`. One product at most, kept on accounts not read since products were introduced."},{"type":"null"}]},"products":{"anyOf":[{"type":"object","properties":{"premium":{"type":"boolean","description":"LinkedIn Premium is on the account."},"salesNavigator":{"type":"boolean","description":"A Sales Navigator seat of any edition (Core, Advanced or Advanced Plus) is on the account. Needed for InMail and Sales Navigator search."},"recruiter":{"type":"boolean","description":"A LinkedIn Recruiter seat is on the account. Needed for Recruiter job postings."}},"required":["premium","salesNavigator","recruiter"],"additionalProperties":false,"description":"LinkedIn products on the account. LinkedIn sells them separately, so any mix is possible. Read again when the account is connected, reconnected or tested. Missing on accounts not read since products were introduced."},{"type":"null"}]}},"required":["channel"],"additionalProperties":false},{"type":"object","properties":{"channel":{"type":"string","const":"instagram"}},"required":["channel"],"additionalProperties":false}],"type":"object"},"displayName":{"anyOf":[{"type":"string"},{"type":"null"}]},"channelIdentity":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"proxy":{"anyOf":[{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"automatic"},"country":{"anyOf":[{"type":"string","enum":["ae","ao","ar","at","au","bd","be","bg","br","ca","ch","cl","cn","co","cy","cz","de","dk","ee","eg","es","fi","fr","gb","gt","hk","id","ie","il","in","it","jp","kr","kz","ma","mx","my","nl","no","pa","pk","pl","pr","pt","ro","sa","se","sg","th","tn","tr","ua","us","vn","za"]},{"type":"null"}]}},"required":["kind","country"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"custom"},"host":{"type":"string"},"port":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"username":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["kind","host","port","username"],"additionalProperties":false}],"type":"object"},{"type":"null"}]},"limitOverrides":{"anyOf":[{"type":"object","propertyNames":{"type":"string","enum":["linkedin_invitation","linkedin_cancel_invitation","linkedin_message","linkedin_inmail","linkedin_profile_view","linkedin_search","linkedin_comment","linkedin_reaction","instagram_message","instagram_profile_view","instagram_follow","instagram_unfollow","instagram_comment","instagram_reaction","instagram_post"]},"additionalProperties":{"type":"object","properties":{"hour":{"anyOf":[{"type":"integer","minimum":1,"maximum":1000},{"type":"null"}],"description":"Hourly cap. Null when this action has no hourly cap."},"day":{"type":"integer","minimum":1,"maximum":10000,"description":"Daily cap."},"week":{"anyOf":[{"type":"integer","minimum":1,"maximum":50000},{"type":"null"}],"description":"Weekly cap. Null when this action has no weekly cap."}},"required":["hour","day","week"],"additionalProperties":false,"description":"Effective caps for one action on the connected account."}},{"type":"null"}]},"nextActionAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"pausedUntil":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"consecutiveFailures":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"lastErrorKind":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"updatedBy":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"deletedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"deletedBy":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"canUse":{"type":"boolean","description":"Whether you can run campaigns and send messages as this account. Its owner, or anyone it is shared with, can. Use only accounts where this is true."}},"required":["id","ownerUserId","ownerOrgId","channel","status","properties","displayName","channelIdentity","imageUrl","proxy","limitOverrides","nextActionAt","pausedUntil","consecutiveFailures","lastErrorKind","createdAt","updatedAt","updatedBy","deletedAt","deletedBy","canUse"],"additionalProperties":false},"usage":{"type":"array","items":{"type":"object","properties":{"action":{"type":"string","enum":["linkedin_invitation","linkedin_cancel_invitation","linkedin_message","linkedin_inmail","linkedin_profile_view","linkedin_search","linkedin_comment","linkedin_reaction","instagram_message","instagram_profile_view","instagram_follow","instagram_unfollow","instagram_comment","instagram_reaction","instagram_post"]},"hourUsed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"hourLimit":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"dayUsed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"dayLimit":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"weekUsed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"weekLimit":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["action","hourUsed","hourLimit","dayUsed","dayLimit","weekUsed","weekLimit"],"additionalProperties":false}},"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Id of this request, for support and troubleshooting"}},"required":["connectedAccount","usage","requestId"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized: missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Invalid request payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"patch":{"tags":["Connected accounts"],"operationId":"updateConnectedAccount","summary":"Update a connected account","parameters":[{"in":"path","name":"connectedAccountId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Connected account id"},"required":true,"description":"Connected account id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"paused":{"type":"boolean"},"limitOverrides":{"anyOf":[{"type":"object","propertyNames":{"type":"string","enum":["linkedin_invitation","linkedin_cancel_invitation","linkedin_message","linkedin_inmail","linkedin_profile_view","linkedin_search","linkedin_comment","linkedin_reaction","instagram_message","instagram_profile_view","instagram_follow","instagram_unfollow","instagram_comment","instagram_reaction","instagram_post"]},"additionalProperties":{"anyOf":[{"type":"object","properties":{"hour":{"type":"integer","minimum":1,"maximum":1000,"description":"Hourly cap."},"day":{"type":"integer","minimum":1,"maximum":10000,"description":"Daily cap."},"week":{"type":"integer","minimum":1,"maximum":50000,"description":"Weekly cap."}},"description":"Caps to override for one action. Fields you leave out keep the channel default. Caps cannot be removed, only changed."},{"type":"null"}]}},{"type":"null"}],"description":"Per-action caps for this account. Keys merge with existing overrides: set a key to null to restore the channel default for that action, or set the whole field to null to clear every override."}}}}}},"responses":{"200":{"description":"Updated account.","content":{"application/json":{"schema":{"type":"object","properties":{"connectedAccount":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"ownerUserId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"ownerOrgId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"channel":{"type":"string","enum":["linkedin","instagram"]},"status":{"type":"string","enum":["active","paused","auth_required","disconnected","connecting","suspended"]},"properties":{"oneOf":[{"type":"object","properties":{"channel":{"type":"string","const":"linkedin"},"tier":{"anyOf":[{"type":"string","enum":["classic","premium","recruiter","sales_navigator"],"description":"Deprecated: use `products`. One product at most, kept on accounts not read since products were introduced."},{"type":"null"}]},"products":{"anyOf":[{"type":"object","properties":{"premium":{"type":"boolean","description":"LinkedIn Premium is on the account."},"salesNavigator":{"type":"boolean","description":"A Sales Navigator seat of any edition (Core, Advanced or Advanced Plus) is on the account. Needed for InMail and Sales Navigator search."},"recruiter":{"type":"boolean","description":"A LinkedIn Recruiter seat is on the account. Needed for Recruiter job postings."}},"required":["premium","salesNavigator","recruiter"],"additionalProperties":false,"description":"LinkedIn products on the account. LinkedIn sells them separately, so any mix is possible. Read again when the account is connected, reconnected or tested. Missing on accounts not read since products were introduced."},{"type":"null"}]}},"required":["channel"],"additionalProperties":false},{"type":"object","properties":{"channel":{"type":"string","const":"instagram"}},"required":["channel"],"additionalProperties":false}],"type":"object"},"displayName":{"anyOf":[{"type":"string"},{"type":"null"}]},"channelIdentity":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"proxy":{"description":"Proxy this account uses.","anyOf":[{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"automatic"},"country":{"anyOf":[{"type":"string","enum":["ae","ao","ar","at","au","bd","be","bg","br","ca","ch","cl","cn","co","cy","cz","de","dk","ee","eg","es","fi","fr","gb","gt","hk","id","ie","il","in","it","jp","kr","kz","ma","mx","my","nl","no","pa","pk","pl","pr","pt","ro","sa","se","sg","th","tn","tr","ua","us","vn","za"]},{"type":"null"}]}},"required":["kind","country"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"custom"},"host":{"type":"string"},"port":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"username":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["kind","host","port","username"],"additionalProperties":false}],"type":"object"},{"type":"null"}]},"limitOverrides":{"anyOf":[{"type":"object","propertyNames":{"type":"string","enum":["linkedin_invitation","linkedin_cancel_invitation","linkedin_message","linkedin_inmail","linkedin_profile_view","linkedin_search","linkedin_comment","linkedin_reaction","instagram_message","instagram_profile_view","instagram_follow","instagram_unfollow","instagram_comment","instagram_reaction","instagram_post"]},"additionalProperties":{"type":"object","properties":{"hour":{"anyOf":[{"type":"integer","minimum":1,"maximum":1000},{"type":"null"}],"description":"Hourly cap. Null when this action has no hourly cap."},"day":{"type":"integer","minimum":1,"maximum":10000,"description":"Daily cap."},"week":{"anyOf":[{"type":"integer","minimum":1,"maximum":50000},{"type":"null"}],"description":"Weekly cap. Null when this action has no weekly cap."}},"required":["hour","day","week"],"additionalProperties":false,"description":"Effective caps for one action on the connected account."}},{"type":"null"}]},"nextActionAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"pausedUntil":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"consecutiveFailures":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"lastErrorKind":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"updatedBy":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"deletedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"deletedBy":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]}},"required":["id","ownerUserId","ownerOrgId","channel","status","properties","displayName","channelIdentity","imageUrl","limitOverrides","nextActionAt","pausedUntil","consecutiveFailures","lastErrorKind","createdAt","updatedAt","updatedBy","deletedAt","deletedBy"],"additionalProperties":false},"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Id of this request, for support and troubleshooting"}},"required":["connectedAccount","requestId"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized: missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Invalid request payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"delete":{"tags":["Connected accounts"],"operationId":"deleteConnectedAccount","summary":"Delete a connected account","description":"Disconnects the account and removes it from the workspace. Its owner or a workspace admin can delete it.","parameters":[{"in":"path","name":"connectedAccountId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Connected account id"},"required":true,"description":"Connected account id"}],"responses":{"200":{"description":"Account deleted.","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"boolean","const":true},"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Id of this request, for support and troubleshooting"}},"required":["deleted","requestId"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized: missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Invalid request payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/connected-accounts/{connectedAccountId}/events":{"get":{"tags":["Connected accounts"],"operationId":"listConnectedAccountEvents","summary":"List connected account events","parameters":[{"in":"path","name":"connectedAccountId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Connected account id"},"required":true,"description":"Connected account id"},{"in":"query","name":"cursor","schema":{"type":"string","minLength":1}},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"A page of events for this connected account, newest first. Pass nextCursor as cursor for the next page.","content":{"application/json":{"schema":{"type":"object","properties":{"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"type":{"anyOf":[{"type":"string","const":"lead_created","description":"A lead was created, from the app, the API, MCP, an import, or a direct message to someone who was not a lead yet."},{"type":"string","const":"lead_updated","description":"A lead's details or handles changed; `data.changes` lists each changed field."},{"type":"string","const":"lead_deleted","description":"A lead was deleted. Its live campaigns stop with `exitReason` `lead_deleted`."},{"type":"string","const":"lead_enrolled","description":"A lead was added to a campaign."},{"type":"string","const":"lead_skipped","description":"A lead was not added to a campaign; `data.skipReason` says why."},{"type":"string","const":"message_generated","description":"AI wrote a message for a step."},{"type":"string","const":"condition_evaluated","description":"A check in the sequence was evaluated."},{"type":"string","const":"task_held","description":"A step is waiting for approval."},{"type":"string","const":"task_approved","description":"A held step was approved."},{"type":"string","const":"task_skipped","description":"A step was skipped; `data.skipReason` says why."},{"type":"string","const":"task_cancelled","description":"A step was cancelled before it ran."},{"type":"string","const":"task_failed","description":"A step failed; `data.errorKind` says why."},{"type":"string","const":"enrollment_waiting","description":"The sequence is waiting, for example for a reply."},{"type":"string","const":"enrollment_completed","description":"The lead reached the end of the sequence."},{"type":"string","const":"enrollment_stopped","description":"The sequence stopped early; `data.exitReason` says why."},{"type":"string","const":"lead_suppressed","description":"A lead matched a [suppression](https://needle.app/docs/suppressions)."},{"type":"string","const":"campaign_status_changed","description":"A campaign's status changed, for example it was started or paused."},{"type":"string","const":"campaign_updated","description":"A campaign's name, sequence, schedule, limits or suppression policy was edited; `data.changedFields` lists which."},{"type":"string","const":"account_connected","description":"A LinkedIn or Instagram account was connected to the workspace for the first time, or again after it was deleted."},{"type":"string","const":"account_reconnected","description":"A disconnected account works again, because a member signed in to it again or LinkedIn or Instagram reports it healthy."},{"type":"string","const":"account_deleted","description":"A connected account was deleted."},{"type":"string","const":"account_paused","description":"A connected account was paused, by its owner or after hitting a limit (`data.errorKind`)."},{"type":"string","const":"account_resumed","description":"A paused connected account was resumed, by its owner or when billing was restored."},{"type":"string","const":"account_disconnected","description":"A connected account stopped working: it needs signing in again (`data.errorKind` is `auth_required`) or LinkedIn or Instagram disconnected it (`disconnected`). Its campaigns wait until it is reconnected."},{"type":"string","const":"account_suspended","description":"A connected account was signed out and stopped, because the workspace's billing lapsed or its owner was removed from the workspace (`data.message`). It has to be connected again to be used."},{"type":"string","const":"account_limits_updated","description":"A connected account's usage limits were changed; `data.changes` lists each limit."},{"type":"string","const":"account_access_granted","description":"A member (`data.member`) was allowed to use a connected account."},{"type":"string","const":"account_access_revoked","description":"A member (`data.member`) can no longer use a connected account. Campaigns they started with it pause."},{"type":"string","const":"account_sharing_changed","description":"A connected account was shared with the whole workspace, or stopped being shared."},{"type":"string","const":"member_invited","description":"Someone was invited to the workspace."},{"type":"string","const":"member_invitation_revoked","description":"An invitation to the workspace was withdrawn."},{"type":"string","const":"member_joined","description":"Someone accepted an invitation and joined."},{"type":"string","const":"member_role_changed","description":"A member's role changed."},{"type":"string","const":"member_removed","description":"An admin removed a member. Their accounts are suspended and their campaigns pause."},{"type":"string","const":"member_left","description":"A member deleted their Needle account."},{"type":"string","const":"api_key_created","description":"An API key was created."},{"type":"string","const":"api_key_revoked","description":"An API key was disabled."},{"type":"string","const":"api_key_enabled","description":"A disabled API key was enabled again."},{"type":"string","const":"api_key_deleted","description":"An API key was deleted."},{"type":"string","const":"webhook_created","description":"A webhook was added."},{"type":"string","const":"webhook_updated","description":"A webhook's URL or headers changed; `data.changedFields` lists which."},{"type":"string","const":"webhook_deleted","description":"A webhook was removed."},{"type":"string","const":"suppression_added","description":"A lead or company was added to the [do-not-contact list](https://needle.app/docs/suppressions) by a member or through the API."},{"type":"string","const":"suppression_removed","description":"An entry was removed from the [do-not-contact list](https://needle.app/docs/suppressions)."},{"type":"string","const":"linkedin_profile_visited","description":"A LinkedIn profile was visited."},{"type":"string","const":"linkedin_invite_sent","description":"A LinkedIn connection request was sent."},{"type":"string","const":"linkedin_invite_withdrawn","description":"A LinkedIn connection request was withdrawn."},{"type":"string","const":"linkedin_message_sent","description":"A LinkedIn message was sent, through Needle or by the account owner in LinkedIn (`data.sentOutsideNeedle`)."},{"type":"string","const":"linkedin_follow_sent","description":"A LinkedIn profile was followed."},{"type":"string","const":"linkedin_unfollowed","description":"A LinkedIn profile was unfollowed."},{"type":"string","const":"linkedin_invite_accepted","description":"A LinkedIn connection request was accepted."},{"type":"string","const":"linkedin_message_received","description":"A LinkedIn reply was received."},{"type":"string","const":"linkedin_post_commented","description":"A comment was posted on LinkedIn."},{"type":"string","const":"linkedin_post_reacted","description":"A reaction was added to a LinkedIn post."},{"type":"string","const":"instagram_message_sent","description":"An Instagram message was sent, through Needle or by the account owner in Instagram (`data.sentOutsideNeedle`)."},{"type":"string","const":"instagram_profile_visited","description":"An Instagram profile was visited."},{"type":"string","const":"instagram_follow_sent","description":"An Instagram profile was followed."},{"type":"string","const":"instagram_unfollowed","description":"An Instagram profile was unfollowed."},{"type":"string","const":"instagram_message_received","description":"An Instagram reply was received."},{"type":"string","const":"instagram_post_commented","description":"A comment was posted on Instagram."},{"type":"string","const":"instagram_post_reacted","description":"An Instagram post was liked."},{"type":"string","const":"instagram_message_reacted","description":"A reaction was added to an Instagram message."},{"type":"string","const":"instagram_post_created","description":"An Instagram post was published."},{"type":"string","description":"A type Needle no longer records, which older events can still have."}]},"label":{"type":"string"},"occurredAt":{"type":"string","format":"date-time"},"channel":{"anyOf":[{"type":"string","enum":["linkedin","instagram"]},{"type":"null"}]},"nodeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"leadId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"leadName":{"anyOf":[{"type":"string"},{"type":"null"}]},"leadImageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"campaignId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"campaignName":{"anyOf":[{"type":"string"},{"type":"null"}]},"enrollmentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"connectedAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"accountName":{"anyOf":[{"type":"string"},{"type":"null"}]},"actorUserId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}],"description":"The member who caused the event. Null for what leads and the system do."},"actorName":{"anyOf":[{"type":"string"},{"type":"null"}]},"data":{"anyOf":[{"type":"object","properties":{"nodeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"action":{"anyOf":[{"type":"string","enum":["linkedin_invitation","linkedin_cancel_invitation","linkedin_message","linkedin_inmail","linkedin_profile_view","linkedin_search","linkedin_comment","linkedin_reaction","instagram_message","instagram_profile_view","instagram_follow","instagram_unfollow","instagram_comment","instagram_reaction","instagram_post"]},{"type":"null"}]},"skipReason":{"anyOf":[{"type":"string","enum":["duplicate_in_batch","enrolled_elsewhere","suppressed","recently_contacted","unresponsive","daily_limit_reached","lead_not_found","missing_identity","missing_personalization","already_connected","already_invited","already_following","follow_request_pending","not_first_degree","invalid_recipient","generation_failed"]},{"type":"null"}]},"exitReason":{"anyOf":[{"type":"string","enum":["finished","replied","messaged_directly","timeout","manual","suppressed","dead_end","error","account_disconnected","campaign_archived","lead_deleted"]},{"type":"null"}]},"text":{"anyOf":[{"type":"string"},{"type":"null"}]},"subject":{"anyOf":[{"type":"string"},{"type":"null"}]},"errorKind":{"anyOf":[{"type":"string"},{"type":"null"}]},"message":{"anyOf":[{"type":"string"},{"type":"null"}]},"suppressionReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"keyword":{"anyOf":[{"type":"string"},{"type":"null"}]},"profile":{"description":"Who a direct (lead-less) action targeted, e.g. the profile that was visited, or the lead a lead_created or lead_deleted event is about.","anyOf":[{"type":"object","properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"identity":{"type":"string"},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["identity"],"additionalProperties":false},{"type":"null"}]},"approvedBy":{"description":"The workspace member who approved a held step.","anyOf":[{"type":"object","properties":{"userId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["userId","name"],"additionalProperties":false},{"type":"null"}]},"sentBy":{"description":"The workspace member who sent the message by hand rather than a campaign.","anyOf":[{"type":"object","properties":{"userId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["userId","name"],"additionalProperties":false},{"type":"null"}]},"sentOutsideNeedle":{"description":"The account owner sent the message straight from the channel, not through Needle.","anyOf":[{"type":"boolean"},{"type":"null"}]},"messageId":{"description":"The id of the message on the channel.","anyOf":[{"type":"string"},{"type":"null"}]},"conversationId":{"description":"The id of the chat the message is in.","anyOf":[{"type":"string"},{"type":"null"}]},"stoppedBy":{"description":"The workspace member who stopped the lead.","anyOf":[{"type":"object","properties":{"userId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["userId","name"],"additionalProperties":false},{"type":"null"}]},"properties":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},{"type":"null"}]},"changes":{"description":"What changed, keyed by field. Lead custom properties are keyed `properties.<key>`.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"from":{"anyOf":[{"type":"string"},{"type":"null"}]},"to":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["from","to"],"additionalProperties":false}},{"type":"null"}]},"changedFields":{"description":"Which fields changed, when their values are too large or too secret to include.","anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"member":{"description":"The workspace member the event is about.","anyOf":[{"type":"object","properties":{"userId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["userId","name"],"additionalProperties":false},{"type":"null"}]},"email":{"description":"Who the invitation was sent to.","anyOf":[{"type":"string"},{"type":"null"}]},"role":{"description":"The workspace role: `member`, `admin` or `owner`.","anyOf":[{"type":"string"},{"type":"null"}]},"apiKey":{"description":"The API key the event is about. Never the key itself.","anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},{"type":"null"}]},"webhook":{"description":"The webhook the event is about, with only its URL's host.","anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"host":{"type":"string"}},"required":["id","host"],"additionalProperties":false},{"type":"null"}]},"suppressionId":{"description":"The do-not-contact entry the event is about.","anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"companyDomain":{"description":"The company domain a do-not-contact entry covers.","anyOf":[{"type":"string"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]}},"required":["id","type","label","occurredAt","channel","nodeId","leadId","leadName","leadImageUrl","campaignId","campaignName","enrollmentId","connectedAccountId","accountName","actorUserId","actorName","data"],"additionalProperties":false}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]},"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Id of this request, for support and troubleshooting"}},"required":["events","nextCursor","requestId"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized: missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Invalid request payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/connected-accounts/{connectedAccountId}/limits":{"get":{"tags":["Connected accounts"],"operationId":"listConnectedAccountLimits","summary":"List connected account limits","description":"Every metered action on this account with its channel defaults, the caps currently enforced, the override behind them (if any), and usage so far. Limit errors (429) point at one of these actions.","parameters":[{"in":"path","name":"connectedAccountId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Connected account id"},"required":true,"description":"Connected account id"}],"responses":{"200":{"description":"Limits for every metered action.","content":{"application/json":{"schema":{"type":"object","properties":{"limits":{"type":"array","items":{"type":"object","properties":{"action":{"type":"string","enum":["linkedin_invitation","linkedin_cancel_invitation","linkedin_message","linkedin_inmail","linkedin_profile_view","linkedin_search","linkedin_comment","linkedin_reaction","instagram_message","instagram_profile_view","instagram_follow","instagram_unfollow","instagram_comment","instagram_reaction","instagram_post"]},"defaultLimits":{"type":"object","properties":{"hour":{"anyOf":[{"type":"integer","minimum":1,"maximum":1000},{"type":"null"}],"description":"Hourly cap. Null when this action has no hourly cap."},"day":{"type":"integer","minimum":1,"maximum":10000,"description":"Daily cap."},"week":{"anyOf":[{"type":"integer","minimum":1,"maximum":50000},{"type":"null"}],"description":"Weekly cap. Null when this action has no weekly cap."}},"required":["hour","day","week"],"additionalProperties":false,"description":"Channel defaults for this action."},"override":{"anyOf":[{"type":"object","properties":{"hour":{"anyOf":[{"type":"integer","minimum":1,"maximum":1000},{"type":"null"}],"description":"Hourly cap. Null when this action has no hourly cap."},"day":{"type":"integer","minimum":1,"maximum":10000,"description":"Daily cap."},"week":{"anyOf":[{"type":"integer","minimum":1,"maximum":50000},{"type":"null"}],"description":"Weekly cap. Null when this action has no weekly cap."}},"required":["hour","day","week"],"additionalProperties":false,"description":"Effective caps for one action on the connected account."},{"type":"null"}],"description":"Caps set for this account, or null when it runs on the defaults."},"limits":{"type":"object","properties":{"hour":{"anyOf":[{"type":"integer","minimum":1,"maximum":1000},{"type":"null"}],"description":"Hourly cap. Null when this action has no hourly cap."},"day":{"type":"integer","minimum":1,"maximum":10000,"description":"Daily cap."},"week":{"anyOf":[{"type":"integer","minimum":1,"maximum":50000},{"type":"null"}],"description":"Weekly cap. Null when this action has no weekly cap."}},"required":["hour","day","week"],"additionalProperties":false,"description":"Caps currently enforced: the defaults with this account’s override applied."},"usage":{"type":"object","properties":{"hour":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Calls made in the current UTC hour."},"day":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Calls made in the current UTC day."},"week":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Calls made in the last seven days."}},"required":["hour","day","week"],"additionalProperties":false,"description":"How much of this action the connected account has already used."}},"required":["action","defaultLimits","override","limits","usage"],"additionalProperties":false,"description":"One metered action on the connected account."}},"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Id of this request, for support and troubleshooting"}},"required":["limits","requestId"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized: missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Invalid request payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/connected-accounts/{connectedAccountId}/limits/{action}":{"patch":{"tags":["Connected accounts"],"operationId":"updateConnectedAccountLimit","summary":"Override a limit","description":"Set caps for one action on this account. Fields you leave out keep the channel default. A cap can be tightened or loosened, never removed. Raising a cap above the default is allowed but answered with a warning: it increases the risk of the channel restricting the account.","parameters":[{"in":"path","name":"connectedAccountId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Connected account id"},"required":true,"description":"Connected account id"},{"in":"path","name":"action","schema":{"type":"string","enum":["linkedin_invitation","linkedin_cancel_invitation","linkedin_message","linkedin_inmail","linkedin_profile_view","linkedin_search","linkedin_comment","linkedin_reaction","instagram_message","instagram_profile_view","instagram_follow","instagram_unfollow","instagram_comment","instagram_reaction","instagram_post"],"description":"Metered action, e.g. linkedin_profile_view."},"required":true,"description":"Metered action, e.g. linkedin_profile_view."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"hour":{"type":"integer","minimum":1,"maximum":1000,"description":"Hourly cap."},"day":{"type":"integer","minimum":1,"maximum":10000,"description":"Daily cap."},"week":{"type":"integer","minimum":1,"maximum":50000,"description":"Weekly cap."}},"description":"Caps to override for one action. Fields you leave out keep the channel default. Caps cannot be removed, only changed."}}}},"responses":{"200":{"description":"The limit after the change.","content":{"application/json":{"schema":{"type":"object","properties":{"limit":{"type":"object","properties":{"action":{"type":"string","enum":["linkedin_invitation","linkedin_cancel_invitation","linkedin_message","linkedin_inmail","linkedin_profile_view","linkedin_search","linkedin_comment","linkedin_reaction","instagram_message","instagram_profile_view","instagram_follow","instagram_unfollow","instagram_comment","instagram_reaction","instagram_post"]},"defaultLimits":{"type":"object","properties":{"hour":{"anyOf":[{"type":"integer","minimum":1,"maximum":1000},{"type":"null"}],"description":"Hourly cap. Null when this action has no hourly cap."},"day":{"type":"integer","minimum":1,"maximum":10000,"description":"Daily cap."},"week":{"anyOf":[{"type":"integer","minimum":1,"maximum":50000},{"type":"null"}],"description":"Weekly cap. Null when this action has no weekly cap."}},"required":["hour","day","week"],"additionalProperties":false,"description":"Channel defaults for this action."},"override":{"anyOf":[{"type":"object","properties":{"hour":{"anyOf":[{"type":"integer","minimum":1,"maximum":1000},{"type":"null"}],"description":"Hourly cap. Null when this action has no hourly cap."},"day":{"type":"integer","minimum":1,"maximum":10000,"description":"Daily cap."},"week":{"anyOf":[{"type":"integer","minimum":1,"maximum":50000},{"type":"null"}],"description":"Weekly cap. Null when this action has no weekly cap."}},"required":["hour","day","week"],"additionalProperties":false,"description":"Effective caps for one action on the connected account."},{"type":"null"}],"description":"Caps set for this account, or null when it runs on the defaults."},"limits":{"type":"object","properties":{"hour":{"anyOf":[{"type":"integer","minimum":1,"maximum":1000},{"type":"null"}],"description":"Hourly cap. Null when this action has no hourly cap."},"day":{"type":"integer","minimum":1,"maximum":10000,"description":"Daily cap."},"week":{"anyOf":[{"type":"integer","minimum":1,"maximum":50000},{"type":"null"}],"description":"Weekly cap. Null when this action has no weekly cap."}},"required":["hour","day","week"],"additionalProperties":false,"description":"Caps currently enforced: the defaults with this account’s override applied."},"usage":{"type":"object","properties":{"hour":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Calls made in the current UTC hour."},"day":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Calls made in the current UTC day."},"week":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Calls made in the last seven days."}},"required":["hour","day","week"],"additionalProperties":false,"description":"How much of this action the connected account has already used."}},"required":["action","defaultLimits","override","limits","usage"],"additionalProperties":false,"description":"One metered action on the connected account."},"warning":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Set when a cap now sits above the channel default; the change is applied regardless."},"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Id of this request, for support and troubleshooting"}},"required":["limit","warning","requestId"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized: missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Invalid request payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"delete":{"tags":["Connected accounts"],"operationId":"resetConnectedAccountLimit","summary":"Reset a limit to defaults","description":"Remove this account’s override for one action so it runs on the channel defaults again.","parameters":[{"in":"path","name":"connectedAccountId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Connected account id"},"required":true,"description":"Connected account id"},{"in":"path","name":"action","schema":{"type":"string","enum":["linkedin_invitation","linkedin_cancel_invitation","linkedin_message","linkedin_inmail","linkedin_profile_view","linkedin_search","linkedin_comment","linkedin_reaction","instagram_message","instagram_profile_view","instagram_follow","instagram_unfollow","instagram_comment","instagram_reaction","instagram_post"],"description":"Metered action, e.g. linkedin_profile_view."},"required":true,"description":"Metered action, e.g. linkedin_profile_view."}],"responses":{"200":{"description":"The limit after the reset.","content":{"application/json":{"schema":{"type":"object","properties":{"limit":{"type":"object","properties":{"action":{"type":"string","enum":["linkedin_invitation","linkedin_cancel_invitation","linkedin_message","linkedin_inmail","linkedin_profile_view","linkedin_search","linkedin_comment","linkedin_reaction","instagram_message","instagram_profile_view","instagram_follow","instagram_unfollow","instagram_comment","instagram_reaction","instagram_post"]},"defaultLimits":{"type":"object","properties":{"hour":{"anyOf":[{"type":"integer","minimum":1,"maximum":1000},{"type":"null"}],"description":"Hourly cap. Null when this action has no hourly cap."},"day":{"type":"integer","minimum":1,"maximum":10000,"description":"Daily cap."},"week":{"anyOf":[{"type":"integer","minimum":1,"maximum":50000},{"type":"null"}],"description":"Weekly cap. Null when this action has no weekly cap."}},"required":["hour","day","week"],"additionalProperties":false,"description":"Channel defaults for this action."},"override":{"anyOf":[{"type":"object","properties":{"hour":{"anyOf":[{"type":"integer","minimum":1,"maximum":1000},{"type":"null"}],"description":"Hourly cap. Null when this action has no hourly cap."},"day":{"type":"integer","minimum":1,"maximum":10000,"description":"Daily cap."},"week":{"anyOf":[{"type":"integer","minimum":1,"maximum":50000},{"type":"null"}],"description":"Weekly cap. Null when this action has no weekly cap."}},"required":["hour","day","week"],"additionalProperties":false,"description":"Effective caps for one action on the connected account."},{"type":"null"}],"description":"Caps set for this account, or null when it runs on the defaults."},"limits":{"type":"object","properties":{"hour":{"anyOf":[{"type":"integer","minimum":1,"maximum":1000},{"type":"null"}],"description":"Hourly cap. Null when this action has no hourly cap."},"day":{"type":"integer","minimum":1,"maximum":10000,"description":"Daily cap."},"week":{"anyOf":[{"type":"integer","minimum":1,"maximum":50000},{"type":"null"}],"description":"Weekly cap. Null when this action has no weekly cap."}},"required":["hour","day","week"],"additionalProperties":false,"description":"Caps currently enforced: the defaults with this account’s override applied."},"usage":{"type":"object","properties":{"hour":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Calls made in the current UTC hour."},"day":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Calls made in the current UTC day."},"week":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Calls made in the last seven days."}},"required":["hour","day","week"],"additionalProperties":false,"description":"How much of this action the connected account has already used."}},"required":["action","defaultLimits","override","limits","usage"],"additionalProperties":false,"description":"One metered action on the connected account."},"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Id of this request, for support and troubleshooting"}},"required":["limit","requestId"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized: missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Invalid request payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/connected-accounts/{connectedAccountId}/tasks":{"get":{"tags":["Connected accounts"],"operationId":"listConnectedAccountTasks","summary":"List connected account tasks","description":"The queue for one account. Because limits and pacing are per account, this is the order and rate its work will actually go out at.","parameters":[{"in":"path","name":"connectedAccountId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Connected account id"},"required":true,"description":"Connected account id"},{"in":"query","name":"cursor","schema":{"type":"string","minLength":1}},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100}},{"in":"query","name":"status","schema":{"type":"string","enum":["pending","pending_approval"]}}],"responses":{"200":{"description":"A page of tasks in queue order — the earliest scheduled first, which is the order the worker will run them in. Pass nextCursor as cursor for the next page.","content":{"application/json":{"schema":{"type":"object","properties":{"tasks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"status":{"type":"string","enum":["pending","pending_approval"]},"statusLabel":{"type":"string"},"channel":{"type":"string","enum":["linkedin","instagram"]},"action":{"type":"string","enum":["linkedin_invitation","linkedin_cancel_invitation","linkedin_message","linkedin_inmail","linkedin_profile_view","linkedin_search","linkedin_comment","linkedin_reaction","instagram_message","instagram_profile_view","instagram_follow","instagram_unfollow","instagram_comment","instagram_reaction","instagram_post"]},"actionLabel":{"type":"string"},"nodeId":{"type":"string"},"scheduledAt":{"type":"string","format":"date-time"},"attempts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Non-zero when a transient failure requeued the task"},"lastError":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastErrorKind":{"anyOf":[{"type":"string"},{"type":"null"}]},"text":{"anyOf":[{"type":"string"},{"type":"null"}]},"subject":{"anyOf":[{"type":"string"},{"type":"null"}]},"campaignId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"campaignName":{"anyOf":[{"type":"string"},{"type":"null"}]},"enrollmentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"enrollmentStatus":{"type":"string","enum":["active","waiting","completed","stopped","failed"]},"leadId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"leadName":{"anyOf":[{"type":"string"},{"type":"null"}]},"leadImageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"connectedAccountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"accountName":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"}},"required":["id","status","statusLabel","channel","action","actionLabel","nodeId","scheduledAt","attempts","lastError","lastErrorKind","text","subject","campaignId","campaignName","enrollmentId","enrollmentStatus","leadId","leadName","leadImageUrl","connectedAccountId","accountName","createdAt"],"additionalProperties":false}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]},"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Id of this request, for support and troubleshooting"}},"required":["tasks","nextCursor","requestId"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized: missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Invalid request payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/leads":{"get":{"tags":["Leads"],"operationId":"listLeads","summary":"List leads","parameters":[{"in":"query","name":"cursor","schema":{"type":"string","minLength":1}},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"A page of leads in this workspace, newest first. Pass nextCursor as cursor for the next page.","content":{"application/json":{"schema":{"type":"object","properties":{"leads":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"companyName":{"anyOf":[{"type":"string"},{"type":"null"}]},"companyDomain":{"anyOf":[{"type":"string"},{"type":"null"}]},"jobTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"timezone":{"type":"string"},"identities":{"type":"array","items":{"type":"object","properties":{"channel":{"type":"string","enum":["linkedin","instagram"]},"channelIdentity":{"type":"string","description":"Stored identifier: LinkedIn user id or public identifier, or Instagram username without @. Not a profile URL."}},"required":["channel","channelIdentity"],"additionalProperties":false}},"liveEnrollment":{"anyOf":[{"type":"object","properties":{"campaignId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"campaignName":{"type":"string"},"status":{"type":"string","enum":["active","waiting","completed","stopped","failed"]}},"required":["campaignId","campaignName","status"],"additionalProperties":false},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","firstName","lastName","companyName","companyDomain","jobTitle","email","imageUrl","timezone","identities","liveEnrollment","createdAt","updatedAt"],"additionalProperties":false}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]},"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Id of this request, for support and troubleshooting"}},"required":["leads","nextCursor","requestId"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized: missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Invalid request payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"post":{"tags":["Leads"],"operationId":"createLead","summary":"Create a lead","description":"Fails with 409 when an identity already belongs to a lead; the error data carries that leadId. Use POST /leads/upsert to create-or-update instead. identities.linkedin accepts a public identifier (john-doe), /in/john-doe, in/john-doe, a profile URL (https://www.linkedin.com/in/john-doe), or a user id (ACoAAA…). identities.instagram accepts a username (john-doe), @john-doe, or a profile URL (https://www.instagram.com/john-doe).","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"identities":{"type":"object","properties":{"linkedin":{"type":"string","minLength":1,"description":"Public identifier (john-doe), /in/ path (/in/john-doe or in/john-doe), profile URL (https://www.linkedin.com/in/john-doe), or user id (ACoAAA…). Stored as the identifier, not the URL."},"instagram":{"type":"string","minLength":1,"description":"Username (john-doe), handle (@john-doe), or profile URL (https://www.instagram.com/john-doe). Stored as the username without @."}}},"timezone":{"type":"string"},"firstName":{"type":"string","maxLength":256},"lastName":{"type":"string","maxLength":256},"companyName":{"type":"string","maxLength":256},"companyDomain":{"type":"string","maxLength":256},"jobTitle":{"type":"string","maxLength":256},"email":{"type":"string","maxLength":256},"imageUrl":{"type":"string","maxLength":2048},"properties":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["identities","timezone"]}}}},"responses":{"201":{"description":"Created lead.","content":{"application/json":{"schema":{"type":"object","properties":{"lead":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"companyName":{"anyOf":[{"type":"string"},{"type":"null"}]},"companyDomain":{"anyOf":[{"type":"string"},{"type":"null"}]},"jobTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"timezone":{"type":"string"},"identities":{"type":"array","items":{"type":"object","properties":{"channel":{"type":"string","enum":["linkedin","instagram"]},"channelIdentity":{"type":"string","description":"Stored identifier: LinkedIn user id or public identifier, or Instagram username without @. Not a profile URL."}},"required":["channel","channelIdentity"],"additionalProperties":false}},"liveEnrollment":{"anyOf":[{"type":"object","properties":{"campaignId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"campaignName":{"type":"string"},"status":{"type":"string","enum":["active","waiting","completed","stopped","failed"]}},"required":["campaignId","campaignName","status"],"additionalProperties":false},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"properties":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"enrollments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"campaignId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"campaignName":{"type":"string"},"campaignStatus":{"type":"string","enum":["draft","active","paused","archived"]},"status":{"type":"string","enum":["active","waiting","completed","stopped","failed"]},"exitReason":{"anyOf":[{"type":"string","enum":["finished","replied","messaged_directly","timeout","manual","suppressed","dead_end","error","account_disconnected","campaign_archived","lead_deleted"]},{"type":"null"}]},"currentNodeId":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"completedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["id","campaignId","campaignName","campaignStatus","status","exitReason","currentNodeId","createdAt","completedAt"],"additionalProperties":false}}},"required":["id","firstName","lastName","companyName","companyDomain","jobTitle","email","imageUrl","timezone","identities","liveEnrollment","createdAt","updatedAt","properties","enrollments"],"additionalProperties":false},"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Id of this request, for support and troubleshooting"}},"required":["lead","requestId"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized: missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"This person is already a lead. data.leadId is the existing lead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Invalid request payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/leads/upsert":{"post":{"tags":["Leads"],"operationId":"upsertLead","summary":"Create or update a lead","description":"Matches on identity: when a LinkedIn or Instagram identity already belongs to a lead, the fields sent are patched onto that lead and it is returned as \"matched\"; otherwise a lead is created. Needs a LinkedIn or Instagram identity to match on. Same identity formats as POST /leads.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"identities":{"type":"object","properties":{"linkedin":{"type":"string","minLength":1,"description":"Public identifier (john-doe), /in/ path (/in/john-doe or in/john-doe), profile URL (https://www.linkedin.com/in/john-doe), or user id (ACoAAA…). Stored as the identifier, not the URL."},"instagram":{"type":"string","minLength":1,"description":"Username (john-doe), handle (@john-doe), or profile URL (https://www.instagram.com/john-doe). Stored as the username without @."}}},"timezone":{"type":"string"},"firstName":{"type":"string","maxLength":256},"lastName":{"type":"string","maxLength":256},"companyName":{"type":"string","maxLength":256},"companyDomain":{"type":"string","maxLength":256},"jobTitle":{"type":"string","maxLength":256},"email":{"type":"string","maxLength":256},"imageUrl":{"type":"string","maxLength":2048},"properties":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["identities","timezone"]}}}},"responses":{"200":{"description":"The created or matched lead.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["created","matched"],"description":"created: a new lead. matched: an identity already belonged to this lead, so the fields sent were patched onto it."},"lead":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"companyName":{"anyOf":[{"type":"string"},{"type":"null"}]},"companyDomain":{"anyOf":[{"type":"string"},{"type":"null"}]},"jobTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"timezone":{"type":"string"},"identities":{"type":"array","items":{"type":"object","properties":{"channel":{"type":"string","enum":["linkedin","instagram"]},"channelIdentity":{"type":"string","description":"Stored identifier: LinkedIn user id or public identifier, or Instagram username without @. Not a profile URL."}},"required":["channel","channelIdentity"],"additionalProperties":false}},"liveEnrollment":{"anyOf":[{"type":"object","properties":{"campaignId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"campaignName":{"type":"string"},"status":{"type":"string","enum":["active","waiting","completed","stopped","failed"]}},"required":["campaignId","campaignName","status"],"additionalProperties":false},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"properties":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"enrollments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"campaignId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"campaignName":{"type":"string"},"campaignStatus":{"type":"string","enum":["draft","active","paused","archived"]},"status":{"type":"string","enum":["active","waiting","completed","stopped","failed"]},"exitReason":{"anyOf":[{"type":"string","enum":["finished","replied","messaged_directly","timeout","manual","suppressed","dead_end","error","account_disconnected","campaign_archived","lead_deleted"]},{"type":"null"}]},"currentNodeId":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"completedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["id","campaignId","campaignName","campaignStatus","status","exitReason","currentNodeId","createdAt","completedAt"],"additionalProperties":false}}},"required":["id","firstName","lastName","companyName","companyDomain","jobTitle","email","imageUrl","timezone","identities","liveEnrollment","createdAt","updatedAt","properties","enrollments"],"additionalProperties":false},"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Id of this request, for support and troubleshooting"}},"required":["status","lead","requestId"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized: missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Invalid request payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/leads/bulk":{"post":{"tags":["Leads"],"operationId":"createLeads","summary":"Create leads in bulk","description":"Upserts up to 500 leads by identity, so re-sending a list settles onto the leads it created the first time rather than duplicating them. A row whose identity already belongs to a lead returns that lead as \"matched\", with the fields the row carried patched onto it. A row with no readable handle is skipped rather than failing the batch, since it could never be messaged. Same identity formats as POST /leads. Results come back in request order.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"leads":{"minItems":1,"maxItems":500,"type":"array","items":{"type":"object","properties":{"identities":{"default":{},"type":"object","properties":{"linkedin":{"type":"string","minLength":1,"description":"Public identifier (john-doe), /in/ path (/in/john-doe or in/john-doe), profile URL (https://www.linkedin.com/in/john-doe), or user id (ACoAAA…). Stored as the identifier, not the URL."},"instagram":{"type":"string","minLength":1,"description":"Username (john-doe), handle (@john-doe), or profile URL (https://www.instagram.com/john-doe). Stored as the username without @."}}},"timezone":{"type":"string"},"firstName":{"type":"string","maxLength":256},"lastName":{"type":"string","maxLength":256},"companyName":{"type":"string","maxLength":256},"companyDomain":{"type":"string","maxLength":256},"jobTitle":{"type":"string","maxLength":256},"email":{"type":"string","maxLength":256},"imageUrl":{"type":"string","maxLength":2048},"properties":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["timezone"]}}},"required":["leads"]}}}},"responses":{"200":{"description":"One result per submitted row, in request order.","content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"index":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"status":{"type":"string","const":"created"},"leadId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["index","status","leadId"],"additionalProperties":false},{"type":"object","properties":{"index":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"status":{"type":"string","const":"matched"},"leadId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["index","status","leadId"],"additionalProperties":false},{"type":"object","properties":{"index":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"status":{"type":"string","const":"skipped"},"reason":{"type":"string","enum":["missing_identity","invalid_identity"]}},"required":["index","status","reason"],"additionalProperties":false}],"type":"object"}},"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Id of this request, for support and troubleshooting"}},"required":["results","requestId"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized: missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Invalid request payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"patch":{"tags":["Leads"],"operationId":"updateLeads","summary":"Update leads in bulk","description":"Updates up to 500 existing leads by id; never creates one. Each row takes the same fields as PATCH /leads/{leadId}, and only the fields sent change. A row is skipped rather than failing the batch when the id does not name a lead in this workspace (lead_not_found), a handle cannot be read (invalid_identity), or a handle already belongs to another lead (identity_taken, with conflictingLeadId). Results come back in request order.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"leads":{"minItems":1,"maxItems":500,"type":"array","items":{"type":"object","properties":{"identities":{"type":"object","properties":{"linkedin":{"type":"string","minLength":1,"description":"Public identifier (john-doe), /in/ path (/in/john-doe or in/john-doe), profile URL (https://www.linkedin.com/in/john-doe), or user id (ACoAAA…). Stored as the identifier, not the URL."},"instagram":{"type":"string","minLength":1,"description":"Username (john-doe), handle (@john-doe), or profile URL (https://www.instagram.com/john-doe). Stored as the username without @."}}},"timezone":{"type":"string"},"firstName":{"type":"string","maxLength":256},"lastName":{"type":"string","maxLength":256},"companyName":{"type":"string","maxLength":256},"companyDomain":{"type":"string","maxLength":256},"jobTitle":{"type":"string","maxLength":256},"email":{"type":"string","maxLength":256},"imageUrl":{"type":"string","maxLength":2048},"properties":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"leadId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The lead to update."}},"required":["leadId"]}}},"required":["leads"]}}}},"responses":{"200":{"description":"One result per submitted row, in request order.","content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"index":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"status":{"type":"string","const":"updated"},"leadId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["index","status","leadId"],"additionalProperties":false},{"type":"object","properties":{"index":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"status":{"type":"string","const":"skipped"},"leadId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"reason":{"type":"string","enum":["lead_not_found","invalid_identity","identity_taken"]},"conflictingLeadId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}],"description":"For identity_taken: the lead that already has the identity."}},"required":["index","status","leadId","reason","conflictingLeadId"],"additionalProperties":false}],"type":"object"}},"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Id of this request, for support and troubleshooting"}},"required":["results","requestId"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized: missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Invalid request payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/leads/bulk-delete":{"post":{"tags":["Leads"],"operationId":"deleteLeads","summary":"Delete leads in bulk","description":"Deletes up to 500 leads by id, stopping their live campaign enrollments the same way DELETE /leads/{leadId} does. An id that does not name a lead in this workspace, or names one already deleted, is skipped as lead_not_found rather than failing the batch, so retrying is safe. Results come back in request order.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"leadIds":{"minItems":1,"maxItems":500,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"description":"The leads to delete."}},"required":["leadIds"]}}}},"responses":{"200":{"description":"One result per submitted id, in request order.","content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"index":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"status":{"type":"string","const":"deleted"},"leadId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["index","status","leadId"],"additionalProperties":false},{"type":"object","properties":{"index":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"status":{"type":"string","const":"skipped"},"leadId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"reason":{"type":"string","const":"lead_not_found"}},"required":["index","status","leadId","reason"],"additionalProperties":false}],"type":"object"}},"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Id of this request, for support and troubleshooting"}},"required":["results","requestId"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized: missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Invalid request payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/leads/{leadId}":{"get":{"tags":["Leads"],"operationId":"getLead","summary":"Get a lead","parameters":[{"in":"path","name":"leadId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Lead id"},"required":true,"description":"Lead id"}],"responses":{"200":{"description":"Lead, identities, and enrollments.","content":{"application/json":{"schema":{"type":"object","properties":{"lead":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"companyName":{"anyOf":[{"type":"string"},{"type":"null"}]},"companyDomain":{"anyOf":[{"type":"string"},{"type":"null"}]},"jobTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"timezone":{"type":"string"},"identities":{"type":"array","items":{"type":"object","properties":{"channel":{"type":"string","enum":["linkedin","instagram"]},"channelIdentity":{"type":"string","description":"Stored identifier: LinkedIn user id or public identifier, or Instagram username without @. Not a profile URL."}},"required":["channel","channelIdentity"],"additionalProperties":false}},"liveEnrollment":{"anyOf":[{"type":"object","properties":{"campaignId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"campaignName":{"type":"string"},"status":{"type":"string","enum":["active","waiting","completed","stopped","failed"]}},"required":["campaignId","campaignName","status"],"additionalProperties":false},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"properties":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"enrollments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"campaignId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"campaignName":{"type":"string"},"campaignStatus":{"type":"string","enum":["draft","active","paused","archived"]},"status":{"type":"string","enum":["active","waiting","completed","stopped","failed"]},"exitReason":{"anyOf":[{"type":"string","enum":["finished","replied","messaged_directly","timeout","manual","suppressed","dead_end","error","account_disconnected","campaign_archived","lead_deleted"]},{"type":"null"}]},"currentNodeId":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"completedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["id","campaignId","campaignName","campaignStatus","status","exitReason","currentNodeId","createdAt","completedAt"],"additionalProperties":false}}},"required":["id","firstName","lastName","companyName","companyDomain","jobTitle","email","imageUrl","timezone","identities","liveEnrollment","createdAt","updatedAt","properties","enrollments"],"additionalProperties":false},"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Id of this request, for support and troubleshooting"}},"required":["lead","requestId"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized: missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Invalid request payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"patch":{"tags":["Leads"],"operationId":"updateLead","summary":"Update a lead","description":"Same identity input as create: LinkedIn public identifier, /in/ path, profile URL, or user id; Instagram username, @handle, or profile URL.","parameters":[{"in":"path","name":"leadId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Lead id"},"required":true,"description":"Lead id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"identities":{"type":"object","properties":{"linkedin":{"type":"string","minLength":1,"description":"Public identifier (john-doe), /in/ path (/in/john-doe or in/john-doe), profile URL (https://www.linkedin.com/in/john-doe), or user id (ACoAAA…). Stored as the identifier, not the URL."},"instagram":{"type":"string","minLength":1,"description":"Username (john-doe), handle (@john-doe), or profile URL (https://www.instagram.com/john-doe). Stored as the username without @."}}},"timezone":{"type":"string"},"firstName":{"type":"string","maxLength":256},"lastName":{"type":"string","maxLength":256},"companyName":{"type":"string","maxLength":256},"companyDomain":{"type":"string","maxLength":256},"jobTitle":{"type":"string","maxLength":256},"email":{"type":"string","maxLength":256},"imageUrl":{"type":"string","maxLength":2048},"properties":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}}}}}},"responses":{"200":{"description":"Updated lead.","content":{"application/json":{"schema":{"type":"object","properties":{"lead":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"companyName":{"anyOf":[{"type":"string"},{"type":"null"}]},"companyDomain":{"anyOf":[{"type":"string"},{"type":"null"}]},"jobTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"timezone":{"type":"string"},"identities":{"type":"array","items":{"type":"object","properties":{"channel":{"type":"string","enum":["linkedin","instagram"]},"channelIdentity":{"type":"string","description":"Stored identifier: LinkedIn user id or public identifier, or Instagram username without @. Not a profile URL."}},"required":["channel","channelIdentity"],"additionalProperties":false}},"liveEnrollment":{"anyOf":[{"type":"object","properties":{"campaignId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"campaignName":{"type":"string"},"status":{"type":"string","enum":["active","waiting","completed","stopped","failed"]}},"required":["campaignId","campaignName","status"],"additionalProperties":false},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"properties":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"enrollments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"campaignId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"campaignName":{"type":"string"},"campaignStatus":{"type":"string","enum":["draft","active","paused","archived"]},"status":{"type":"string","enum":["active","waiting","completed","stopped","failed"]},"exitReason":{"anyOf":[{"type":"string","enum":["finished","replied","messaged_directly","timeout","manual","suppressed","dead_end","error","account_disconnected","campaign_archived","lead_deleted"]},{"type":"null"}]},"currentNodeId":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"completedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["id","campaignId","campaignName","campaignStatus","status","exitReason","currentNodeId","createdAt","completedAt"],"additionalProperties":false}}},"required":["id","firstName","lastName","companyName","companyDomain","jobTitle","email","imageUrl","timezone","identities","liveEnrollment","createdAt","updatedAt","properties","enrollments"],"additionalProperties":false},"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Id of this request, for support and troubleshooting"}},"required":["lead","requestId"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized: missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Invalid request payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"delete":{"tags":["Leads"],"operationId":"deleteLead","summary":"Delete a lead","parameters":[{"in":"path","name":"leadId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Lead id"},"required":true,"description":"Lead id"}],"responses":{"200":{"description":"Lead deleted.","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"boolean","const":true},"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Id of this request, for support and troubleshooting"}},"required":["deleted","requestId"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized: missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Invalid request payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/leads/{leadId}/events":{"get":{"tags":["Leads"],"operationId":"listLeadEvents","summary":"List lead events","parameters":[{"in":"path","name":"leadId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Lead id"},"required":true,"description":"Lead id"},{"in":"query","name":"cursor","schema":{"type":"string","minLength":1}},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"A page of events for this lead, newest first. Pass nextCursor as cursor for the next page.","content":{"application/json":{"schema":{"type":"object","properties":{"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"type":{"anyOf":[{"type":"string","const":"lead_created","description":"A lead was created, from the app, the API, MCP, an import, or a direct message to someone who was not a lead yet."},{"type":"string","const":"lead_updated","description":"A lead's details or handles changed; `data.changes` lists each changed field."},{"type":"string","const":"lead_deleted","description":"A lead was deleted. Its live campaigns stop with `exitReason` `lead_deleted`."},{"type":"string","const":"lead_enrolled","description":"A lead was added to a campaign."},{"type":"string","const":"lead_skipped","description":"A lead was not added to a campaign; `data.skipReason` says why."},{"type":"string","const":"message_generated","description":"AI wrote a message for a step."},{"type":"string","const":"condition_evaluated","description":"A check in the sequence was evaluated."},{"type":"string","const":"task_held","description":"A step is waiting for approval."},{"type":"string","const":"task_approved","description":"A held step was approved."},{"type":"string","const":"task_skipped","description":"A step was skipped; `data.skipReason` says why."},{"type":"string","const":"task_cancelled","description":"A step was cancelled before it ran."},{"type":"string","const":"task_failed","description":"A step failed; `data.errorKind` says why."},{"type":"string","const":"enrollment_waiting","description":"The sequence is waiting, for example for a reply."},{"type":"string","const":"enrollment_completed","description":"The lead reached the end of the sequence."},{"type":"string","const":"enrollment_stopped","description":"The sequence stopped early; `data.exitReason` says why."},{"type":"string","const":"lead_suppressed","description":"A lead matched a [suppression](https://needle.app/docs/suppressions)."},{"type":"string","const":"campaign_status_changed","description":"A campaign's status changed, for example it was started or paused."},{"type":"string","const":"campaign_updated","description":"A campaign's name, sequence, schedule, limits or suppression policy was edited; `data.changedFields` lists which."},{"type":"string","const":"account_connected","description":"A LinkedIn or Instagram account was connected to the workspace for the first time, or again after it was deleted."},{"type":"string","const":"account_reconnected","description":"A disconnected account works again, because a member signed in to it again or LinkedIn or Instagram reports it healthy."},{"type":"string","const":"account_deleted","description":"A connected account was deleted."},{"type":"string","const":"account_paused","description":"A connected account was paused, by its owner or after hitting a limit (`data.errorKind`)."},{"type":"string","const":"account_resumed","description":"A paused connected account was resumed, by its owner or when billing was restored."},{"type":"string","const":"account_disconnected","description":"A connected account stopped working: it needs signing in again (`data.errorKind` is `auth_required`) or LinkedIn or Instagram disconnected it (`disconnected`). Its campaigns wait until it is reconnected."},{"type":"string","const":"account_suspended","description":"A connected account was signed out and stopped, because the workspace's billing lapsed or its owner was removed from the workspace (`data.message`). It has to be connected again to be used."},{"type":"string","const":"account_limits_updated","description":"A connected account's usage limits were changed; `data.changes` lists each limit."},{"type":"string","const":"account_access_granted","description":"A member (`data.member`) was allowed to use a connected account."},{"type":"string","const":"account_access_revoked","description":"A member (`data.member`) can no longer use a connected account. Campaigns they started with it pause."},{"type":"string","const":"account_sharing_changed","description":"A connected account was shared with the whole workspace, or stopped being shared."},{"type":"string","const":"member_invited","description":"Someone was invited to the workspace."},{"type":"string","const":"member_invitation_revoked","description":"An invitation to the workspace was withdrawn."},{"type":"string","const":"member_joined","description":"Someone accepted an invitation and joined."},{"type":"string","const":"member_role_changed","description":"A member's role changed."},{"type":"string","const":"member_removed","description":"An admin removed a member. Their accounts are suspended and their campaigns pause."},{"type":"string","const":"member_left","description":"A member deleted their Needle account."},{"type":"string","const":"api_key_created","description":"An API key was created."},{"type":"string","const":"api_key_revoked","description":"An API key was disabled."},{"type":"string","const":"api_key_enabled","description":"A disabled API key was enabled again."},{"type":"string","const":"api_key_deleted","description":"An API key was deleted."},{"type":"string","const":"webhook_created","description":"A webhook was added."},{"type":"string","const":"webhook_updated","description":"A webhook's URL or headers changed; `data.changedFields` lists which."},{"type":"string","const":"webhook_deleted","description":"A webhook was removed."},{"type":"string","const":"suppression_added","description":"A lead or company was added to the [do-not-contact list](https://needle.app/docs/suppressions) by a member or through the API."},{"type":"string","const":"suppression_removed","description":"An entry was removed from the [do-not-contact list](https://needle.app/docs/suppressions)."},{"type":"string","const":"linkedin_profile_visited","description":"A LinkedIn profile was visited."},{"type":"string","const":"linkedin_invite_sent","description":"A LinkedIn connection request was sent."},{"type":"string","const":"linkedin_invite_withdrawn","description":"A LinkedIn connection request was withdrawn."},{"type":"string","const":"linkedin_message_sent","description":"A LinkedIn message was sent, through Needle or by the account owner in LinkedIn (`data.sentOutsideNeedle`)."},{"type":"string","const":"linkedin_follow_sent","description":"A LinkedIn profile was followed."},{"type":"string","const":"linkedin_unfollowed","description":"A LinkedIn profile was unfollowed."},{"type":"string","const":"linkedin_invite_accepted","description":"A LinkedIn connection request was accepted."},{"type":"string","const":"linkedin_message_received","description":"A LinkedIn reply was received."},{"type":"string","const":"linkedin_post_commented","description":"A comment was posted on LinkedIn."},{"type":"string","const":"linkedin_post_reacted","description":"A reaction was added to a LinkedIn post."},{"type":"string","const":"instagram_message_sent","description":"An Instagram message was sent, through Needle or by the account owner in Instagram (`data.sentOutsideNeedle`)."},{"type":"string","const":"instagram_profile_visited","description":"An Instagram profile was visited."},{"type":"string","const":"instagram_follow_sent","description":"An Instagram profile was followed."},{"type":"string","const":"instagram_unfollowed","description":"An Instagram profile was unfollowed."},{"type":"string","const":"instagram_message_received","description":"An Instagram reply was received."},{"type":"string","const":"instagram_post_commented","description":"A comment was posted on Instagram."},{"type":"string","const":"instagram_post_reacted","description":"An Instagram post was liked."},{"type":"string","const":"instagram_message_reacted","description":"A reaction was added to an Instagram message."},{"type":"string","const":"instagram_post_created","description":"An Instagram post was published."},{"type":"string","description":"A type Needle no longer records, which older events can still have."}]},"label":{"type":"string"},"occurredAt":{"type":"string","format":"date-time"},"channel":{"anyOf":[{"type":"string","enum":["linkedin","instagram"]},{"type":"null"}]},"nodeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"leadId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"leadName":{"anyOf":[{"type":"string"},{"type":"null"}]},"leadImageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"campaignId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"campaignName":{"anyOf":[{"type":"string"},{"type":"null"}]},"enrollmentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"connectedAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"accountName":{"anyOf":[{"type":"string"},{"type":"null"}]},"actorUserId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}],"description":"The member who caused the event. Null for what leads and the system do."},"actorName":{"anyOf":[{"type":"string"},{"type":"null"}]},"data":{"anyOf":[{"type":"object","properties":{"nodeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"action":{"anyOf":[{"type":"string","enum":["linkedin_invitation","linkedin_cancel_invitation","linkedin_message","linkedin_inmail","linkedin_profile_view","linkedin_search","linkedin_comment","linkedin_reaction","instagram_message","instagram_profile_view","instagram_follow","instagram_unfollow","instagram_comment","instagram_reaction","instagram_post"]},{"type":"null"}]},"skipReason":{"anyOf":[{"type":"string","enum":["duplicate_in_batch","enrolled_elsewhere","suppressed","recently_contacted","unresponsive","daily_limit_reached","lead_not_found","missing_identity","missing_personalization","already_connected","already_invited","already_following","follow_request_pending","not_first_degree","invalid_recipient","generation_failed"]},{"type":"null"}]},"exitReason":{"anyOf":[{"type":"string","enum":["finished","replied","messaged_directly","timeout","manual","suppressed","dead_end","error","account_disconnected","campaign_archived","lead_deleted"]},{"type":"null"}]},"text":{"anyOf":[{"type":"string"},{"type":"null"}]},"subject":{"anyOf":[{"type":"string"},{"type":"null"}]},"errorKind":{"anyOf":[{"type":"string"},{"type":"null"}]},"message":{"anyOf":[{"type":"string"},{"type":"null"}]},"suppressionReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"keyword":{"anyOf":[{"type":"string"},{"type":"null"}]},"profile":{"description":"Who a direct (lead-less) action targeted, e.g. the profile that was visited, or the lead a lead_created or lead_deleted event is about.","anyOf":[{"type":"object","properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"identity":{"type":"string"},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["identity"],"additionalProperties":false},{"type":"null"}]},"approvedBy":{"description":"The workspace member who approved a held step.","anyOf":[{"type":"object","properties":{"userId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["userId","name"],"additionalProperties":false},{"type":"null"}]},"sentBy":{"description":"The workspace member who sent the message by hand rather than a campaign.","anyOf":[{"type":"object","properties":{"userId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["userId","name"],"additionalProperties":false},{"type":"null"}]},"sentOutsideNeedle":{"description":"The account owner sent the message straight from the channel, not through Needle.","anyOf":[{"type":"boolean"},{"type":"null"}]},"messageId":{"description":"The id of the message on the channel.","anyOf":[{"type":"string"},{"type":"null"}]},"conversationId":{"description":"The id of the chat the message is in.","anyOf":[{"type":"string"},{"type":"null"}]},"stoppedBy":{"description":"The workspace member who stopped the lead.","anyOf":[{"type":"object","properties":{"userId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["userId","name"],"additionalProperties":false},{"type":"null"}]},"properties":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},{"type":"null"}]},"changes":{"description":"What changed, keyed by field. Lead custom properties are keyed `properties.<key>`.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"from":{"anyOf":[{"type":"string"},{"type":"null"}]},"to":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["from","to"],"additionalProperties":false}},{"type":"null"}]},"changedFields":{"description":"Which fields changed, when their values are too large or too secret to include.","anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"member":{"description":"The workspace member the event is about.","anyOf":[{"type":"object","properties":{"userId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["userId","name"],"additionalProperties":false},{"type":"null"}]},"email":{"description":"Who the invitation was sent to.","anyOf":[{"type":"string"},{"type":"null"}]},"role":{"description":"The workspace role: `member`, `admin` or `owner`.","anyOf":[{"type":"string"},{"type":"null"}]},"apiKey":{"description":"The API key the event is about. Never the key itself.","anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},{"type":"null"}]},"webhook":{"description":"The webhook the event is about, with only its URL's host.","anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"host":{"type":"string"}},"required":["id","host"],"additionalProperties":false},{"type":"null"}]},"suppressionId":{"description":"The do-not-contact entry the event is about.","anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"companyDomain":{"description":"The company domain a do-not-contact entry covers.","anyOf":[{"type":"string"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]}},"required":["id","type","label","occurredAt","channel","nodeId","leadId","leadName","leadImageUrl","campaignId","campaignName","enrollmentId","connectedAccountId","accountName","actorUserId","actorName","data"],"additionalProperties":false}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]},"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Id of this request, for support and troubleshooting"}},"required":["events","nextCursor","requestId"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized: missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Invalid request payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/leads/{leadId}/tasks":{"get":{"tags":["Leads"],"operationId":"listLeadTasks","summary":"List lead tasks","description":"Every action campaigns have queued for this lead, across its enrollments.","parameters":[{"in":"path","name":"leadId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Lead id"},"required":true,"description":"Lead id"},{"in":"query","name":"cursor","schema":{"type":"string","minLength":1}},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100}},{"in":"query","name":"status","schema":{"type":"string","enum":["pending","pending_approval"]}}],"responses":{"200":{"description":"A page of tasks in queue order — the earliest scheduled first, which is the order the worker will run them in. Pass nextCursor as cursor for the next page.","content":{"application/json":{"schema":{"type":"object","properties":{"tasks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"status":{"type":"string","enum":["pending","pending_approval"]},"statusLabel":{"type":"string"},"channel":{"type":"string","enum":["linkedin","instagram"]},"action":{"type":"string","enum":["linkedin_invitation","linkedin_cancel_invitation","linkedin_message","linkedin_inmail","linkedin_profile_view","linkedin_search","linkedin_comment","linkedin_reaction","instagram_message","instagram_profile_view","instagram_follow","instagram_unfollow","instagram_comment","instagram_reaction","instagram_post"]},"actionLabel":{"type":"string"},"nodeId":{"type":"string"},"scheduledAt":{"type":"string","format":"date-time"},"attempts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Non-zero when a transient failure requeued the task"},"lastError":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastErrorKind":{"anyOf":[{"type":"string"},{"type":"null"}]},"text":{"anyOf":[{"type":"string"},{"type":"null"}]},"subject":{"anyOf":[{"type":"string"},{"type":"null"}]},"campaignId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"campaignName":{"anyOf":[{"type":"string"},{"type":"null"}]},"enrollmentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"enrollmentStatus":{"type":"string","enum":["active","waiting","completed","stopped","failed"]},"leadId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"leadName":{"anyOf":[{"type":"string"},{"type":"null"}]},"leadImageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"connectedAccountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"accountName":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"}},"required":["id","status","statusLabel","channel","action","actionLabel","nodeId","scheduledAt","attempts","lastError","lastErrorKind","text","subject","campaignId","campaignName","enrollmentId","enrollmentStatus","leadId","leadName","leadImageUrl","connectedAccountId","accountName","createdAt"],"additionalProperties":false}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]},"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Id of this request, for support and troubleshooting"}},"required":["tasks","nextCursor","requestId"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized: missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Invalid request payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/campaigns":{"get":{"tags":["Campaigns"],"operationId":"listCampaigns","summary":"List campaigns","parameters":[{"in":"query","name":"cursor","schema":{"type":"string","minLength":1}},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100}},{"in":"query","name":"status","schema":{"type":"string","enum":["draft","active","paused","archived"]}}],"responses":{"200":{"description":"A page of campaigns, newest first. Pass nextCursor as cursor for the next page.","content":{"application/json":{"schema":{"type":"object","properties":{"campaigns":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"ownerOrgId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"status":{"type":"string","enum":["draft","active","paused","archived"]},"graph":{"type":"object","properties":{"nodes":{"minItems":2,"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-zA-Z0-9_-]+$"},"kind":{"type":"string","const":"start"},"label":{"type":"string","maxLength":120}},"required":["id","kind"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-zA-Z0-9_-]+$"},"kind":{"type":"string","const":"end"},"label":{"type":"string","maxLength":120}},"required":["id","kind"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-zA-Z0-9_-]+$"},"kind":{"type":"string","const":"delay"},"label":{"type":"string","maxLength":120},"duration":{"type":"object","properties":{"days":{"default":0,"type":"integer","minimum":0,"maximum":90},"hours":{"default":0,"type":"integer","minimum":0,"maximum":23},"minutes":{"default":0,"type":"integer","minimum":0,"maximum":59}},"required":["days","hours","minutes"],"additionalProperties":false}},"required":["id","kind","duration"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-zA-Z0-9_-]+$"},"kind":{"type":"string","const":"action"},"label":{"type":"string","maxLength":120},"channel":{"type":"string","enum":["linkedin","instagram"]},"connectedAccountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"action":{"type":"string","enum":["linkedin_invitation","linkedin_cancel_invitation","linkedin_message","linkedin_inmail","linkedin_profile_view","linkedin_search","linkedin_comment","linkedin_reaction","instagram_message","instagram_profile_view","instagram_follow","instagram_unfollow","instagram_comment","instagram_reaction","instagram_post"]},"content":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"template"},"text":{"type":"string","minLength":1},"subject":{"description":"InMail subject line. Required on linkedin_inmail template steps; omit on other steps.","type":"string","minLength":1}},"required":["kind","text"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"ai"},"prompt":{"type":"string","minLength":1},"context":{"default":["conversation"],"type":"array","items":{"type":"string","enum":["profile","posts","conversation","lead_properties"]}},"maxChars":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"fallbackText":{"type":"string"},"requiresApproval":{"default":false,"type":"boolean"}},"required":["kind","prompt","context","requiresApproval"],"additionalProperties":false}],"type":"object"},"attachments":{"description":"LinkedIn message and InMail only. Files from POST /api/v1/files; store the returned url, not a signed URL.","maxItems":5,"type":"array","items":{"type":"object","properties":{"url":{"type":"string","maxLength":4096,"format":"uri","description":"Object URL returned by POST /api/v1/files. Not a signed URL and not passed to LinkedIn."},"filename":{"type":"string","minLength":1,"maxLength":255},"contentType":{"type":"string","minLength":1,"maxLength":127},"size":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["url"],"additionalProperties":false}}},"required":["id","kind","channel","connectedAccountId","action"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-zA-Z0-9_-]+$"},"kind":{"type":"string","const":"condition"},"label":{"type":"string","maxLength":120},"channel":{"type":"string","enum":["linkedin","instagram"]},"connectedAccountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"test":{"oneOf":[{"type":"object","properties":{"predicate":{"type":"string","const":"is_connection"}},"required":["predicate"],"additionalProperties":false},{"type":"object","properties":{"predicate":{"type":"string","const":"has_attribute"},"attribute":{"type":"string","minLength":1,"maxLength":64},"equals":{"type":"string","maxLength":256}},"required":["predicate","attribute"],"additionalProperties":false}],"type":"object"}},"required":["id","kind","channel","connectedAccountId","test"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-zA-Z0-9_-]+$"},"kind":{"type":"string","const":"wait_until"},"label":{"type":"string","maxLength":120},"channel":{"type":"string","enum":["linkedin","instagram"]},"connectedAccountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"event":{"type":"string","enum":["linkedin_invite_accepted","linkedin_message_received","instagram_message_received"]},"timeout":{"type":"object","properties":{"days":{"default":0,"type":"integer","minimum":0,"maximum":90},"hours":{"default":0,"type":"integer","minimum":0,"maximum":23},"minutes":{"default":0,"type":"integer","minimum":0,"maximum":59}},"required":["days","hours","minutes"],"additionalProperties":false}},"required":["id","kind","channel","connectedAccountId","event","timeout"],"additionalProperties":false}],"type":"object"}},"edges":{"type":"array","items":{"type":"object","properties":{"from":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-zA-Z0-9_-]+$"},"to":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-zA-Z0-9_-]+$"},"label":{"default":"next","type":"string","enum":["next","yes","no","on_event","on_timeout"]}},"required":["from","to","label"],"additionalProperties":false}}},"required":["nodes","edges"],"additionalProperties":false},"schedule":{"type":"object","properties":{"workingDays":{"default":[1,2,3,4,5],"minItems":1,"type":"array","items":{"type":"integer","minimum":0,"maximum":6}},"startTime":{"default":"09:00","type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"endTime":{"default":"17:00","type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["workingDays","startTime","endTime"],"additionalProperties":false},"limits":{"type":"object","properties":{"minGapSeconds":{"default":30,"type":"integer","minimum":10,"maximum":300},"maxGapSeconds":{"default":60,"type":"integer","minimum":10,"maximum":300}},"required":["minGapSeconds","maxGapSeconds"],"additionalProperties":false},"suppressionPolicy":{"type":"object","properties":{"bypassSuppressionReasons":{"default":[],"type":"array","items":{"type":"string","enum":["manual","unsubscribed","not_interested","existing_customer","open_opportunity","competitor","employee","invalid_recipient","complained","recently_contacted","unresponsive"]}},"cooldownDays":{"default":30,"type":"integer","minimum":0,"maximum":365},"unresponsiveAfterTouches":{"default":3,"type":"integer","minimum":0,"maximum":50},"autoSuppressKeywords":{"default":["unsubscribe","stop contacting","do not contact","remove me","take me off","not interested"],"type":"array","items":{"type":"string"}}},"required":["bypassSuppressionReasons","cooldownDays","unresponsiveAfterTouches","autoSuppressKeywords"],"additionalProperties":false},"startedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"startedBy":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"pausedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"pausedBy":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"archivedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"archivedBy":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"createdBy":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"updatedAt":{"type":"string","format":"date-time"},"updatedBy":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"connectedAccounts":{"type":"array","items":{"type":"object","properties":{"connectedAccountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"channel":{"type":"string","enum":["linkedin","instagram"]},"displayName":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"channelIdentity":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["connectedAccountId","channel","displayName","imageUrl","channelIdentity"],"additionalProperties":false}}},"required":["id","ownerOrgId","name","status","graph","schedule","limits","suppressionPolicy","startedAt","startedBy","pausedAt","pausedBy","archivedAt","archivedBy","createdAt","createdBy","updatedAt","updatedBy","connectedAccounts"],"additionalProperties":false}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]},"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Id of this request, for support and troubleshooting"}},"required":["campaigns","nextCursor","requestId"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized: missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Invalid request payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"post":{"tags":["Campaigns"],"operationId":"createCampaign","summary":"Create a campaign","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":256},"graph":{"type":"object","properties":{"nodes":{"minItems":2,"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-zA-Z0-9_-]+$"},"kind":{"type":"string","const":"start"},"label":{"type":"string","maxLength":120}},"required":["id","kind"]},{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-zA-Z0-9_-]+$"},"kind":{"type":"string","const":"end"},"label":{"type":"string","maxLength":120}},"required":["id","kind"]},{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-zA-Z0-9_-]+$"},"kind":{"type":"string","const":"delay"},"label":{"type":"string","maxLength":120},"duration":{"type":"object","properties":{"days":{"default":0,"type":"integer","minimum":0,"maximum":90},"hours":{"default":0,"type":"integer","minimum":0,"maximum":23},"minutes":{"default":0,"type":"integer","minimum":0,"maximum":59}}}},"required":["id","kind","duration"]},{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-zA-Z0-9_-]+$"},"kind":{"type":"string","const":"action"},"label":{"type":"string","maxLength":120},"channel":{"type":"string","enum":["linkedin","instagram"]},"connectedAccountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"action":{"type":"string","enum":["linkedin_invitation","linkedin_cancel_invitation","linkedin_message","linkedin_inmail","linkedin_profile_view","linkedin_search","linkedin_comment","linkedin_reaction","instagram_message","instagram_profile_view","instagram_follow","instagram_unfollow","instagram_comment","instagram_reaction","instagram_post"]},"content":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"template"},"text":{"type":"string","minLength":1},"subject":{"description":"InMail subject line. Required on linkedin_inmail template steps; omit on other steps.","type":"string","minLength":1}},"required":["kind","text"]},{"type":"object","properties":{"kind":{"type":"string","const":"ai"},"prompt":{"type":"string","minLength":1},"context":{"default":["conversation"],"type":"array","items":{"type":"string","enum":["profile","posts","conversation","lead_properties"]}},"maxChars":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"fallbackText":{"type":"string"},"requiresApproval":{"default":false,"type":"boolean"}},"required":["kind","prompt"]}],"type":"object"},"attachments":{"description":"LinkedIn message and InMail only. Files from POST /api/v1/files; store the returned url, not a signed URL.","maxItems":5,"type":"array","items":{"type":"object","properties":{"url":{"type":"string","maxLength":4096,"format":"uri","description":"Object URL returned by POST /api/v1/files. Not a signed URL and not passed to LinkedIn."},"filename":{"type":"string","minLength":1,"maxLength":255},"contentType":{"type":"string","minLength":1,"maxLength":127},"size":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["url"]}}},"required":["id","kind","channel","connectedAccountId","action"]},{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-zA-Z0-9_-]+$"},"kind":{"type":"string","const":"condition"},"label":{"type":"string","maxLength":120},"channel":{"type":"string","enum":["linkedin","instagram"]},"connectedAccountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"test":{"oneOf":[{"type":"object","properties":{"predicate":{"type":"string","const":"is_connection"}},"required":["predicate"]},{"type":"object","properties":{"predicate":{"type":"string","const":"has_attribute"},"attribute":{"type":"string","minLength":1,"maxLength":64},"equals":{"type":"string","maxLength":256}},"required":["predicate","attribute"]}],"type":"object"}},"required":["id","kind","channel","connectedAccountId","test"]},{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-zA-Z0-9_-]+$"},"kind":{"type":"string","const":"wait_until"},"label":{"type":"string","maxLength":120},"channel":{"type":"string","enum":["linkedin","instagram"]},"connectedAccountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"event":{"type":"string","enum":["linkedin_invite_accepted","linkedin_message_received","instagram_message_received"]},"timeout":{"type":"object","properties":{"days":{"default":0,"type":"integer","minimum":0,"maximum":90},"hours":{"default":0,"type":"integer","minimum":0,"maximum":23},"minutes":{"default":0,"type":"integer","minimum":0,"maximum":59}}}},"required":["id","kind","channel","connectedAccountId","event","timeout"]}],"type":"object"}},"edges":{"type":"array","items":{"type":"object","properties":{"from":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-zA-Z0-9_-]+$"},"to":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-zA-Z0-9_-]+$"},"label":{"default":"next","type":"string","enum":["next","yes","no","on_event","on_timeout"]}},"required":["from","to"]}}},"required":["nodes","edges"]},"schedule":{"type":"object","properties":{"workingDays":{"default":[1,2,3,4,5],"minItems":1,"type":"array","items":{"type":"integer","minimum":0,"maximum":6}},"startTime":{"default":"09:00","type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"endTime":{"default":"17:00","type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}}},"limits":{"type":"object","properties":{"minGapSeconds":{"default":30,"type":"integer","minimum":10,"maximum":300},"maxGapSeconds":{"default":60,"type":"integer","minimum":10,"maximum":300}}},"suppressionPolicy":{"type":"object","properties":{"bypassSuppressionReasons":{"default":[],"type":"array","items":{"type":"string","enum":["manual","unsubscribed","not_interested","existing_customer","open_opportunity","competitor","employee","invalid_recipient","complained","recently_contacted","unresponsive"]}},"cooldownDays":{"default":30,"type":"integer","minimum":0,"maximum":365},"unresponsiveAfterTouches":{"default":3,"type":"integer","minimum":0,"maximum":50},"autoSuppressKeywords":{"default":["unsubscribe","stop contacting","do not contact","remove me","take me off","not interested"],"type":"array","items":{"type":"string"}}}}},"required":["name","graph"]}}}},"responses":{"201":{"description":"Created campaign.","content":{"application/json":{"schema":{"type":"object","properties":{"campaign":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"ownerOrgId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"status":{"type":"string","enum":["draft","active","paused","archived"]},"graph":{"type":"object","properties":{"nodes":{"minItems":2,"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-zA-Z0-9_-]+$"},"kind":{"type":"string","const":"start"},"label":{"type":"string","maxLength":120}},"required":["id","kind"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-zA-Z0-9_-]+$"},"kind":{"type":"string","const":"end"},"label":{"type":"string","maxLength":120}},"required":["id","kind"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-zA-Z0-9_-]+$"},"kind":{"type":"string","const":"delay"},"label":{"type":"string","maxLength":120},"duration":{"type":"object","properties":{"days":{"default":0,"type":"integer","minimum":0,"maximum":90},"hours":{"default":0,"type":"integer","minimum":0,"maximum":23},"minutes":{"default":0,"type":"integer","minimum":0,"maximum":59}},"required":["days","hours","minutes"],"additionalProperties":false}},"required":["id","kind","duration"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-zA-Z0-9_-]+$"},"kind":{"type":"string","const":"action"},"label":{"type":"string","maxLength":120},"channel":{"type":"string","enum":["linkedin","instagram"]},"connectedAccountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"action":{"type":"string","enum":["linkedin_invitation","linkedin_cancel_invitation","linkedin_message","linkedin_inmail","linkedin_profile_view","linkedin_search","linkedin_comment","linkedin_reaction","instagram_message","instagram_profile_view","instagram_follow","instagram_unfollow","instagram_comment","instagram_reaction","instagram_post"]},"content":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"template"},"text":{"type":"string","minLength":1},"subject":{"description":"InMail subject line. Required on linkedin_inmail template steps; omit on other steps.","type":"string","minLength":1}},"required":["kind","text"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"ai"},"prompt":{"type":"string","minLength":1},"context":{"default":["conversation"],"type":"array","items":{"type":"string","enum":["profile","posts","conversation","lead_properties"]}},"maxChars":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"fallbackText":{"type":"string"},"requiresApproval":{"default":false,"type":"boolean"}},"required":["kind","prompt","context","requiresApproval"],"additionalProperties":false}],"type":"object"},"attachments":{"description":"LinkedIn message and InMail only. Files from POST /api/v1/files; store the returned url, not a signed URL.","maxItems":5,"type":"array","items":{"type":"object","properties":{"url":{"type":"string","maxLength":4096,"format":"uri","description":"Object URL returned by POST /api/v1/files. Not a signed URL and not passed to LinkedIn."},"filename":{"type":"string","minLength":1,"maxLength":255},"contentType":{"type":"string","minLength":1,"maxLength":127},"size":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["url"],"additionalProperties":false}}},"required":["id","kind","channel","connectedAccountId","action"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-zA-Z0-9_-]+$"},"kind":{"type":"string","const":"condition"},"label":{"type":"string","maxLength":120},"channel":{"type":"string","enum":["linkedin","instagram"]},"connectedAccountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"test":{"oneOf":[{"type":"object","properties":{"predicate":{"type":"string","const":"is_connection"}},"required":["predicate"],"additionalProperties":false},{"type":"object","properties":{"predicate":{"type":"string","const":"has_attribute"},"attribute":{"type":"string","minLength":1,"maxLength":64},"equals":{"type":"string","maxLength":256}},"required":["predicate","attribute"],"additionalProperties":false}],"type":"object"}},"required":["id","kind","channel","connectedAccountId","test"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-zA-Z0-9_-]+$"},"kind":{"type":"string","const":"wait_until"},"label":{"type":"string","maxLength":120},"channel":{"type":"string","enum":["linkedin","instagram"]},"connectedAccountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"event":{"type":"string","enum":["linkedin_invite_accepted","linkedin_message_received","instagram_message_received"]},"timeout":{"type":"object","properties":{"days":{"default":0,"type":"integer","minimum":0,"maximum":90},"hours":{"default":0,"type":"integer","minimum":0,"maximum":23},"minutes":{"default":0,"type":"integer","minimum":0,"maximum":59}},"required":["days","hours","minutes"],"additionalProperties":false}},"required":["id","kind","channel","connectedAccountId","event","timeout"],"additionalProperties":false}],"type":"object"}},"edges":{"type":"array","items":{"type":"object","properties":{"from":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-zA-Z0-9_-]+$"},"to":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-zA-Z0-9_-]+$"},"label":{"default":"next","type":"string","enum":["next","yes","no","on_event","on_timeout"]}},"required":["from","to","label"],"additionalProperties":false}}},"required":["nodes","edges"],"additionalProperties":false},"schedule":{"type":"object","properties":{"workingDays":{"default":[1,2,3,4,5],"minItems":1,"type":"array","items":{"type":"integer","minimum":0,"maximum":6}},"startTime":{"default":"09:00","type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"endTime":{"default":"17:00","type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["workingDays","startTime","endTime"],"additionalProperties":false},"limits":{"type":"object","properties":{"minGapSeconds":{"default":30,"type":"integer","minimum":10,"maximum":300},"maxGapSeconds":{"default":60,"type":"integer","minimum":10,"maximum":300}},"required":["minGapSeconds","maxGapSeconds"],"additionalProperties":false},"suppressionPolicy":{"type":"object","properties":{"bypassSuppressionReasons":{"default":[],"type":"array","items":{"type":"string","enum":["manual","unsubscribed","not_interested","existing_customer","open_opportunity","competitor","employee","invalid_recipient","complained","recently_contacted","unresponsive"]}},"cooldownDays":{"default":30,"type":"integer","minimum":0,"maximum":365},"unresponsiveAfterTouches":{"default":3,"type":"integer","minimum":0,"maximum":50},"autoSuppressKeywords":{"default":["unsubscribe","stop contacting","do not contact","remove me","take me off","not interested"],"type":"array","items":{"type":"string"}}},"required":["bypassSuppressionReasons","cooldownDays","unresponsiveAfterTouches","autoSuppressKeywords"],"additionalProperties":false},"startedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"startedBy":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"pausedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"pausedBy":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"archivedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"archivedBy":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"createdBy":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"updatedAt":{"type":"string","format":"date-time"},"updatedBy":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"connectedAccounts":{"type":"array","items":{"type":"object","properties":{"connectedAccountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"channel":{"type":"string","enum":["linkedin","instagram"]},"displayName":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"channelIdentity":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["connectedAccountId","channel","displayName","imageUrl","channelIdentity"],"additionalProperties":false}}},"required":["id","ownerOrgId","name","status","graph","schedule","limits","suppressionPolicy","startedAt","startedBy","pausedAt","pausedBy","archivedAt","archivedBy","createdAt","createdBy","updatedAt","updatedBy","connectedAccounts"],"additionalProperties":false},"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Id of this request, for support and troubleshooting"}},"required":["campaign","requestId"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized: missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Invalid request payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/campaigns/{campaignId}":{"get":{"tags":["Campaigns"],"operationId":"getCampaign","summary":"Get a campaign","parameters":[{"in":"path","name":"campaignId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Campaign id"},"required":true,"description":"Campaign id"}],"responses":{"200":{"description":"The campaign.","content":{"application/json":{"schema":{"type":"object","properties":{"campaign":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"ownerOrgId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"status":{"type":"string","enum":["draft","active","paused","archived"]},"graph":{"type":"object","properties":{"nodes":{"minItems":2,"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-zA-Z0-9_-]+$"},"kind":{"type":"string","const":"start"},"label":{"type":"string","maxLength":120}},"required":["id","kind"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-zA-Z0-9_-]+$"},"kind":{"type":"string","const":"end"},"label":{"type":"string","maxLength":120}},"required":["id","kind"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-zA-Z0-9_-]+$"},"kind":{"type":"string","const":"delay"},"label":{"type":"string","maxLength":120},"duration":{"type":"object","properties":{"days":{"default":0,"type":"integer","minimum":0,"maximum":90},"hours":{"default":0,"type":"integer","minimum":0,"maximum":23},"minutes":{"default":0,"type":"integer","minimum":0,"maximum":59}},"required":["days","hours","minutes"],"additionalProperties":false}},"required":["id","kind","duration"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-zA-Z0-9_-]+$"},"kind":{"type":"string","const":"action"},"label":{"type":"string","maxLength":120},"channel":{"type":"string","enum":["linkedin","instagram"]},"connectedAccountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"action":{"type":"string","enum":["linkedin_invitation","linkedin_cancel_invitation","linkedin_message","linkedin_inmail","linkedin_profile_view","linkedin_search","linkedin_comment","linkedin_reaction","instagram_message","instagram_profile_view","instagram_follow","instagram_unfollow","instagram_comment","instagram_reaction","instagram_post"]},"content":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"template"},"text":{"type":"string","minLength":1},"subject":{"description":"InMail subject line. Required on linkedin_inmail template steps; omit on other steps.","type":"string","minLength":1}},"required":["kind","text"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"ai"},"prompt":{"type":"string","minLength":1},"context":{"default":["conversation"],"type":"array","items":{"type":"string","enum":["profile","posts","conversation","lead_properties"]}},"maxChars":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"fallbackText":{"type":"string"},"requiresApproval":{"default":false,"type":"boolean"}},"required":["kind","prompt","context","requiresApproval"],"additionalProperties":false}],"type":"object"},"attachments":{"description":"LinkedIn message and InMail only. Files from POST /api/v1/files; store the returned url, not a signed URL.","maxItems":5,"type":"array","items":{"type":"object","properties":{"url":{"type":"string","maxLength":4096,"format":"uri","description":"Object URL returned by POST /api/v1/files. Not a signed URL and not passed to LinkedIn."},"filename":{"type":"string","minLength":1,"maxLength":255},"contentType":{"type":"string","minLength":1,"maxLength":127},"size":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["url"],"additionalProperties":false}}},"required":["id","kind","channel","connectedAccountId","action"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-zA-Z0-9_-]+$"},"kind":{"type":"string","const":"condition"},"label":{"type":"string","maxLength":120},"channel":{"type":"string","enum":["linkedin","instagram"]},"connectedAccountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"test":{"oneOf":[{"type":"object","properties":{"predicate":{"type":"string","const":"is_connection"}},"required":["predicate"],"additionalProperties":false},{"type":"object","properties":{"predicate":{"type":"string","const":"has_attribute"},"attribute":{"type":"string","minLength":1,"maxLength":64},"equals":{"type":"string","maxLength":256}},"required":["predicate","attribute"],"additionalProperties":false}],"type":"object"}},"required":["id","kind","channel","connectedAccountId","test"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-zA-Z0-9_-]+$"},"kind":{"type":"string","const":"wait_until"},"label":{"type":"string","maxLength":120},"channel":{"type":"string","enum":["linkedin","instagram"]},"connectedAccountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"event":{"type":"string","enum":["linkedin_invite_accepted","linkedin_message_received","instagram_message_received"]},"timeout":{"type":"object","properties":{"days":{"default":0,"type":"integer","minimum":0,"maximum":90},"hours":{"default":0,"type":"integer","minimum":0,"maximum":23},"minutes":{"default":0,"type":"integer","minimum":0,"maximum":59}},"required":["days","hours","minutes"],"additionalProperties":false}},"required":["id","kind","channel","connectedAccountId","event","timeout"],"additionalProperties":false}],"type":"object"}},"edges":{"type":"array","items":{"type":"object","properties":{"from":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-zA-Z0-9_-]+$"},"to":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-zA-Z0-9_-]+$"},"label":{"default":"next","type":"string","enum":["next","yes","no","on_event","on_timeout"]}},"required":["from","to","label"],"additionalProperties":false}}},"required":["nodes","edges"],"additionalProperties":false},"schedule":{"type":"object","properties":{"workingDays":{"default":[1,2,3,4,5],"minItems":1,"type":"array","items":{"type":"integer","minimum":0,"maximum":6}},"startTime":{"default":"09:00","type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"endTime":{"default":"17:00","type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["workingDays","startTime","endTime"],"additionalProperties":false},"limits":{"type":"object","properties":{"minGapSeconds":{"default":30,"type":"integer","minimum":10,"maximum":300},"maxGapSeconds":{"default":60,"type":"integer","minimum":10,"maximum":300}},"required":["minGapSeconds","maxGapSeconds"],"additionalProperties":false},"suppressionPolicy":{"type":"object","properties":{"bypassSuppressionReasons":{"default":[],"type":"array","items":{"type":"string","enum":["manual","unsubscribed","not_interested","existing_customer","open_opportunity","competitor","employee","invalid_recipient","complained","recently_contacted","unresponsive"]}},"cooldownDays":{"default":30,"type":"integer","minimum":0,"maximum":365},"unresponsiveAfterTouches":{"default":3,"type":"integer","minimum":0,"maximum":50},"autoSuppressKeywords":{"default":["unsubscribe","stop contacting","do not contact","remove me","take me off","not interested"],"type":"array","items":{"type":"string"}}},"required":["bypassSuppressionReasons","cooldownDays","unresponsiveAfterTouches","autoSuppressKeywords"],"additionalProperties":false},"startedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"startedBy":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"pausedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"pausedBy":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"archivedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"archivedBy":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"createdBy":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"updatedAt":{"type":"string","format":"date-time"},"updatedBy":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"connectedAccounts":{"type":"array","items":{"type":"object","properties":{"connectedAccountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"channel":{"type":"string","enum":["linkedin","instagram"]},"displayName":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"channelIdentity":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["connectedAccountId","channel","displayName","imageUrl","channelIdentity"],"additionalProperties":false}}},"required":["id","ownerOrgId","name","status","graph","schedule","limits","suppressionPolicy","startedAt","startedBy","pausedAt","pausedBy","archivedAt","archivedBy","createdAt","createdBy","updatedAt","updatedBy","connectedAccounts"],"additionalProperties":false},"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Id of this request, for support and troubleshooting"}},"required":["campaign","requestId"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized: missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Invalid request payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"patch":{"tags":["Campaigns"],"operationId":"updateCampaign","summary":"Update a campaign","parameters":[{"in":"path","name":"campaignId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Campaign id"},"required":true,"description":"Campaign id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":256},"status":{"type":"string","enum":["active","paused"]},"graph":{"type":"object","properties":{"nodes":{"minItems":2,"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-zA-Z0-9_-]+$"},"kind":{"type":"string","const":"start"},"label":{"type":"string","maxLength":120}},"required":["id","kind"]},{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-zA-Z0-9_-]+$"},"kind":{"type":"string","const":"end"},"label":{"type":"string","maxLength":120}},"required":["id","kind"]},{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-zA-Z0-9_-]+$"},"kind":{"type":"string","const":"delay"},"label":{"type":"string","maxLength":120},"duration":{"type":"object","properties":{"days":{"default":0,"type":"integer","minimum":0,"maximum":90},"hours":{"default":0,"type":"integer","minimum":0,"maximum":23},"minutes":{"default":0,"type":"integer","minimum":0,"maximum":59}}}},"required":["id","kind","duration"]},{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-zA-Z0-9_-]+$"},"kind":{"type":"string","const":"action"},"label":{"type":"string","maxLength":120},"channel":{"type":"string","enum":["linkedin","instagram"]},"connectedAccountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"action":{"type":"string","enum":["linkedin_invitation","linkedin_cancel_invitation","linkedin_message","linkedin_inmail","linkedin_profile_view","linkedin_search","linkedin_comment","linkedin_reaction","instagram_message","instagram_profile_view","instagram_follow","instagram_unfollow","instagram_comment","instagram_reaction","instagram_post"]},"content":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"template"},"text":{"type":"string","minLength":1},"subject":{"description":"InMail subject line. Required on linkedin_inmail template steps; omit on other steps.","type":"string","minLength":1}},"required":["kind","text"]},{"type":"object","properties":{"kind":{"type":"string","const":"ai"},"prompt":{"type":"string","minLength":1},"context":{"default":["conversation"],"type":"array","items":{"type":"string","enum":["profile","posts","conversation","lead_properties"]}},"maxChars":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"fallbackText":{"type":"string"},"requiresApproval":{"default":false,"type":"boolean"}},"required":["kind","prompt"]}],"type":"object"},"attachments":{"description":"LinkedIn message and InMail only. Files from POST /api/v1/files; store the returned url, not a signed URL.","maxItems":5,"type":"array","items":{"type":"object","properties":{"url":{"type":"string","maxLength":4096,"format":"uri","description":"Object URL returned by POST /api/v1/files. Not a signed URL and not passed to LinkedIn."},"filename":{"type":"string","minLength":1,"maxLength":255},"contentType":{"type":"string","minLength":1,"maxLength":127},"size":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["url"]}}},"required":["id","kind","channel","connectedAccountId","action"]},{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-zA-Z0-9_-]+$"},"kind":{"type":"string","const":"condition"},"label":{"type":"string","maxLength":120},"channel":{"type":"string","enum":["linkedin","instagram"]},"connectedAccountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"test":{"oneOf":[{"type":"object","properties":{"predicate":{"type":"string","const":"is_connection"}},"required":["predicate"]},{"type":"object","properties":{"predicate":{"type":"string","const":"has_attribute"},"attribute":{"type":"string","minLength":1,"maxLength":64},"equals":{"type":"string","maxLength":256}},"required":["predicate","attribute"]}],"type":"object"}},"required":["id","kind","channel","connectedAccountId","test"]},{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-zA-Z0-9_-]+$"},"kind":{"type":"string","const":"wait_until"},"label":{"type":"string","maxLength":120},"channel":{"type":"string","enum":["linkedin","instagram"]},"connectedAccountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"event":{"type":"string","enum":["linkedin_invite_accepted","linkedin_message_received","instagram_message_received"]},"timeout":{"type":"object","properties":{"days":{"default":0,"type":"integer","minimum":0,"maximum":90},"hours":{"default":0,"type":"integer","minimum":0,"maximum":23},"minutes":{"default":0,"type":"integer","minimum":0,"maximum":59}}}},"required":["id","kind","channel","connectedAccountId","event","timeout"]}],"type":"object"}},"edges":{"type":"array","items":{"type":"object","properties":{"from":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-zA-Z0-9_-]+$"},"to":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-zA-Z0-9_-]+$"},"label":{"default":"next","type":"string","enum":["next","yes","no","on_event","on_timeout"]}},"required":["from","to"]}}},"required":["nodes","edges"]},"schedule":{"type":"object","properties":{"workingDays":{"default":[1,2,3,4,5],"minItems":1,"type":"array","items":{"type":"integer","minimum":0,"maximum":6}},"startTime":{"default":"09:00","type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"endTime":{"default":"17:00","type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}}},"limits":{"type":"object","properties":{"minGapSeconds":{"default":30,"type":"integer","minimum":10,"maximum":300},"maxGapSeconds":{"default":60,"type":"integer","minimum":10,"maximum":300}}},"suppressionPolicy":{"type":"object","properties":{"bypassSuppressionReasons":{"default":[],"type":"array","items":{"type":"string","enum":["manual","unsubscribed","not_interested","existing_customer","open_opportunity","competitor","employee","invalid_recipient","complained","recently_contacted","unresponsive"]}},"cooldownDays":{"default":30,"type":"integer","minimum":0,"maximum":365},"unresponsiveAfterTouches":{"default":3,"type":"integer","minimum":0,"maximum":50},"autoSuppressKeywords":{"default":["unsubscribe","stop contacting","do not contact","remove me","take me off","not interested"],"type":"array","items":{"type":"string"}}}}}}}}},"responses":{"200":{"description":"Updated campaign.","content":{"application/json":{"schema":{"type":"object","properties":{"campaign":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"ownerOrgId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"status":{"type":"string","enum":["draft","active","paused","archived"]},"graph":{"type":"object","properties":{"nodes":{"minItems":2,"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-zA-Z0-9_-]+$"},"kind":{"type":"string","const":"start"},"label":{"type":"string","maxLength":120}},"required":["id","kind"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-zA-Z0-9_-]+$"},"kind":{"type":"string","const":"end"},"label":{"type":"string","maxLength":120}},"required":["id","kind"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-zA-Z0-9_-]+$"},"kind":{"type":"string","const":"delay"},"label":{"type":"string","maxLength":120},"duration":{"type":"object","properties":{"days":{"default":0,"type":"integer","minimum":0,"maximum":90},"hours":{"default":0,"type":"integer","minimum":0,"maximum":23},"minutes":{"default":0,"type":"integer","minimum":0,"maximum":59}},"required":["days","hours","minutes"],"additionalProperties":false}},"required":["id","kind","duration"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-zA-Z0-9_-]+$"},"kind":{"type":"string","const":"action"},"label":{"type":"string","maxLength":120},"channel":{"type":"string","enum":["linkedin","instagram"]},"connectedAccountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"action":{"type":"string","enum":["linkedin_invitation","linkedin_cancel_invitation","linkedin_message","linkedin_inmail","linkedin_profile_view","linkedin_search","linkedin_comment","linkedin_reaction","instagram_message","instagram_profile_view","instagram_follow","instagram_unfollow","instagram_comment","instagram_reaction","instagram_post"]},"content":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"template"},"text":{"type":"string","minLength":1},"subject":{"description":"InMail subject line. Required on linkedin_inmail template steps; omit on other steps.","type":"string","minLength":1}},"required":["kind","text"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"ai"},"prompt":{"type":"string","minLength":1},"context":{"default":["conversation"],"type":"array","items":{"type":"string","enum":["profile","posts","conversation","lead_properties"]}},"maxChars":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"fallbackText":{"type":"string"},"requiresApproval":{"default":false,"type":"boolean"}},"required":["kind","prompt","context","requiresApproval"],"additionalProperties":false}],"type":"object"},"attachments":{"description":"LinkedIn message and InMail only. Files from POST /api/v1/files; store the returned url, not a signed URL.","maxItems":5,"type":"array","items":{"type":"object","properties":{"url":{"type":"string","maxLength":4096,"format":"uri","description":"Object URL returned by POST /api/v1/files. Not a signed URL and not passed to LinkedIn."},"filename":{"type":"string","minLength":1,"maxLength":255},"contentType":{"type":"string","minLength":1,"maxLength":127},"size":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["url"],"additionalProperties":false}}},"required":["id","kind","channel","connectedAccountId","action"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-zA-Z0-9_-]+$"},"kind":{"type":"string","const":"condition"},"label":{"type":"string","maxLength":120},"channel":{"type":"string","enum":["linkedin","instagram"]},"connectedAccountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"test":{"oneOf":[{"type":"object","properties":{"predicate":{"type":"string","const":"is_connection"}},"required":["predicate"],"additionalProperties":false},{"type":"object","properties":{"predicate":{"type":"string","const":"has_attribute"},"attribute":{"type":"string","minLength":1,"maxLength":64},"equals":{"type":"string","maxLength":256}},"required":["predicate","attribute"],"additionalProperties":false}],"type":"object"}},"required":["id","kind","channel","connectedAccountId","test"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-zA-Z0-9_-]+$"},"kind":{"type":"string","const":"wait_until"},"label":{"type":"string","maxLength":120},"channel":{"type":"string","enum":["linkedin","instagram"]},"connectedAccountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"event":{"type":"string","enum":["linkedin_invite_accepted","linkedin_message_received","instagram_message_received"]},"timeout":{"type":"object","properties":{"days":{"default":0,"type":"integer","minimum":0,"maximum":90},"hours":{"default":0,"type":"integer","minimum":0,"maximum":23},"minutes":{"default":0,"type":"integer","minimum":0,"maximum":59}},"required":["days","hours","minutes"],"additionalProperties":false}},"required":["id","kind","channel","connectedAccountId","event","timeout"],"additionalProperties":false}],"type":"object"}},"edges":{"type":"array","items":{"type":"object","properties":{"from":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-zA-Z0-9_-]+$"},"to":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-zA-Z0-9_-]+$"},"label":{"default":"next","type":"string","enum":["next","yes","no","on_event","on_timeout"]}},"required":["from","to","label"],"additionalProperties":false}}},"required":["nodes","edges"],"additionalProperties":false},"schedule":{"type":"object","properties":{"workingDays":{"default":[1,2,3,4,5],"minItems":1,"type":"array","items":{"type":"integer","minimum":0,"maximum":6}},"startTime":{"default":"09:00","type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"endTime":{"default":"17:00","type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["workingDays","startTime","endTime"],"additionalProperties":false},"limits":{"type":"object","properties":{"minGapSeconds":{"default":30,"type":"integer","minimum":10,"maximum":300},"maxGapSeconds":{"default":60,"type":"integer","minimum":10,"maximum":300}},"required":["minGapSeconds","maxGapSeconds"],"additionalProperties":false},"suppressionPolicy":{"type":"object","properties":{"bypassSuppressionReasons":{"default":[],"type":"array","items":{"type":"string","enum":["manual","unsubscribed","not_interested","existing_customer","open_opportunity","competitor","employee","invalid_recipient","complained","recently_contacted","unresponsive"]}},"cooldownDays":{"default":30,"type":"integer","minimum":0,"maximum":365},"unresponsiveAfterTouches":{"default":3,"type":"integer","minimum":0,"maximum":50},"autoSuppressKeywords":{"default":["unsubscribe","stop contacting","do not contact","remove me","take me off","not interested"],"type":"array","items":{"type":"string"}}},"required":["bypassSuppressionReasons","cooldownDays","unresponsiveAfterTouches","autoSuppressKeywords"],"additionalProperties":false},"startedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"startedBy":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"pausedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"pausedBy":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"archivedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"archivedBy":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"createdBy":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"updatedAt":{"type":"string","format":"date-time"},"updatedBy":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"connectedAccounts":{"type":"array","items":{"type":"object","properties":{"connectedAccountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"channel":{"type":"string","enum":["linkedin","instagram"]},"displayName":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"channelIdentity":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["connectedAccountId","channel","displayName","imageUrl","channelIdentity"],"additionalProperties":false}}},"required":["id","ownerOrgId","name","status","graph","schedule","limits","suppressionPolicy","startedAt","startedBy","pausedAt","pausedBy","archivedAt","archivedBy","createdAt","createdBy","updatedAt","updatedBy","connectedAccounts"],"additionalProperties":false},"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Id of this request, for support and troubleshooting"}},"required":["campaign","requestId"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized: missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Invalid request payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"delete":{"tags":["Campaigns"],"operationId":"archiveCampaign","summary":"Archive a campaign","parameters":[{"in":"path","name":"campaignId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Campaign id"},"required":true,"description":"Campaign id"}],"responses":{"200":{"description":"Campaign archived.","content":{"application/json":{"schema":{"type":"object","properties":{"archived":{"type":"boolean","const":true},"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Id of this request, for support and troubleshooting"}},"required":["archived","requestId"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized: missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Invalid request payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/campaigns/{campaignId}/stats":{"get":{"tags":["Campaigns"],"operationId":"getCampaignStats","summary":"Get campaign stats","parameters":[{"in":"path","name":"campaignId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Campaign id"},"required":true,"description":"Campaign id"}],"responses":{"200":{"description":"Campaign progress, funnel, enrollments, and steps.","content":{"application/json":{"schema":{"type":"object","properties":{"stats":{"type":"object","properties":{"progress":{"type":"integer","minimum":0,"maximum":100},"funnel":{"type":"object","properties":{"enrolled":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"skippedByReason":{"type":"object","propertyNames":{"type":"string","enum":["duplicate_in_batch","enrolled_elsewhere","suppressed","recently_contacted","unresponsive","daily_limit_reached","lead_not_found","missing_identity","missing_personalization","already_connected","already_invited","already_following","follow_request_pending","not_first_degree","invalid_recipient","generation_failed"]},"additionalProperties":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"invitesSent":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"invitesAccepted":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"acceptanceRate":{"anyOf":[{"type":"number"},{"type":"null"}]},"messagesSent":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"repliedLeads":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"replyRate":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["enrolled","skippedByReason","invitesSent","invitesAccepted","acceptanceRate","messagesSent","repliedLeads","replyRate"],"additionalProperties":false},"enrollments":{"type":"object","properties":{"active":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"waiting":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"completed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"stopped":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"failed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"byExitReason":{"type":"object","propertyNames":{"type":"string","enum":["finished","replied","messaged_directly","timeout","manual","suppressed","dead_end","error","account_disconnected","campaign_archived","lead_deleted"]},"additionalProperties":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}}},"required":["active","waiting","completed","stopped","failed","byExitReason"],"additionalProperties":false},"steps":{"type":"array","items":{"type":"object","properties":{"nodeId":{"type":"string"},"label":{"type":"string"},"kind":{"type":"string","enum":["start","end","delay","action","condition","wait_until"]},"channel":{"anyOf":[{"type":"string","enum":["linkedin","instagram"]},{"type":"null"}]},"action":{"anyOf":[{"type":"string","enum":["linkedin_invitation","linkedin_cancel_invitation","linkedin_message","linkedin_inmail","linkedin_profile_view","linkedin_search","linkedin_comment","linkedin_reaction","instagram_message","instagram_profile_view","instagram_follow","instagram_unfollow","instagram_comment","instagram_reaction","instagram_post"]},{"type":"null"}]},"sent":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"accepted":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"replied":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"skipped":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"failed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"reached":{"type":"object","properties":{"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"preview":{"type":"array","items":{"type":"object","properties":{"leadId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"enrollmentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"companyName":{"anyOf":[{"type":"string"},{"type":"null"}]},"companyDomain":{"anyOf":[{"type":"string"},{"type":"null"}]},"jobTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"timezone":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["active","waiting","completed","stopped","failed"]},"exitReason":{"anyOf":[{"type":"string","enum":["finished","replied","messaged_directly","timeout","manual","suppressed","dead_end","error","account_disconnected","campaign_archived","lead_deleted"]},{"type":"null"}]},"currentNodeId":{"type":"string"},"waitingFor":{"anyOf":[{"type":"string","enum":["linkedin_invite_accepted","linkedin_message_received","instagram_message_received"]},{"type":"null"}]},"waitingUntil":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"lastEventAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"completedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["leadId","enrollmentId","firstName","lastName","companyName","companyDomain","jobTitle","email","imageUrl","timezone","status","exitReason","currentNodeId","waitingFor","waitingUntil","lastEventAt","completedAt","createdAt","updatedAt"],"additionalProperties":false}}},"required":["count","preview"],"additionalProperties":false},"current":{"type":"object","properties":{"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"preview":{"type":"array","items":{"type":"object","properties":{"leadId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"enrollmentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"companyName":{"anyOf":[{"type":"string"},{"type":"null"}]},"companyDomain":{"anyOf":[{"type":"string"},{"type":"null"}]},"jobTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"timezone":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["active","waiting","completed","stopped","failed"]},"exitReason":{"anyOf":[{"type":"string","enum":["finished","replied","messaged_directly","timeout","manual","suppressed","dead_end","error","account_disconnected","campaign_archived","lead_deleted"]},{"type":"null"}]},"currentNodeId":{"type":"string"},"waitingFor":{"anyOf":[{"type":"string","enum":["linkedin_invite_accepted","linkedin_message_received","instagram_message_received"]},{"type":"null"}]},"waitingUntil":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"lastEventAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"completedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["leadId","enrollmentId","firstName","lastName","companyName","companyDomain","jobTitle","email","imageUrl","timezone","status","exitReason","currentNodeId","waitingFor","waitingUntil","lastEventAt","completedAt","createdAt","updatedAt"],"additionalProperties":false}}},"required":["count","preview"],"additionalProperties":false},"completed":{"type":"object","properties":{"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"preview":{"type":"array","items":{"type":"object","properties":{"leadId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"enrollmentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"companyName":{"anyOf":[{"type":"string"},{"type":"null"}]},"companyDomain":{"anyOf":[{"type":"string"},{"type":"null"}]},"jobTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"timezone":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["active","waiting","completed","stopped","failed"]},"exitReason":{"anyOf":[{"type":"string","enum":["finished","replied","messaged_directly","timeout","manual","suppressed","dead_end","error","account_disconnected","campaign_archived","lead_deleted"]},{"type":"null"}]},"currentNodeId":{"type":"string"},"waitingFor":{"anyOf":[{"type":"string","enum":["linkedin_invite_accepted","linkedin_message_received","instagram_message_received"]},{"type":"null"}]},"waitingUntil":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"lastEventAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"completedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["leadId","enrollmentId","firstName","lastName","companyName","companyDomain","jobTitle","email","imageUrl","timezone","status","exitReason","currentNodeId","waitingFor","waitingUntil","lastEventAt","completedAt","createdAt","updatedAt"],"additionalProperties":false}}},"required":["count","preview"],"additionalProperties":false}},"required":["nodeId","label","kind","channel","action","sent","accepted","replied","skipped","failed","reached","current","completed"],"additionalProperties":false}}},"required":["progress","funnel","enrollments","steps"],"additionalProperties":false},"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Id of this request, for support and troubleshooting"}},"required":["stats","requestId"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized: missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Invalid request payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/campaigns/{campaignId}/events":{"get":{"tags":["Campaigns"],"operationId":"listCampaignEvents","summary":"List campaign events","parameters":[{"in":"path","name":"campaignId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Campaign id"},"required":true,"description":"Campaign id"},{"in":"query","name":"cursor","schema":{"type":"string","minLength":1}},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"A page of campaign events, newest first. Pass nextCursor as cursor for the next page.","content":{"application/json":{"schema":{"type":"object","properties":{"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"type":{"anyOf":[{"type":"string","const":"lead_created","description":"A lead was created, from the app, the API, MCP, an import, or a direct message to someone who was not a lead yet."},{"type":"string","const":"lead_updated","description":"A lead's details or handles changed; `data.changes` lists each changed field."},{"type":"string","const":"lead_deleted","description":"A lead was deleted. Its live campaigns stop with `exitReason` `lead_deleted`."},{"type":"string","const":"lead_enrolled","description":"A lead was added to a campaign."},{"type":"string","const":"lead_skipped","description":"A lead was not added to a campaign; `data.skipReason` says why."},{"type":"string","const":"message_generated","description":"AI wrote a message for a step."},{"type":"string","const":"condition_evaluated","description":"A check in the sequence was evaluated."},{"type":"string","const":"task_held","description":"A step is waiting for approval."},{"type":"string","const":"task_approved","description":"A held step was approved."},{"type":"string","const":"task_skipped","description":"A step was skipped; `data.skipReason` says why."},{"type":"string","const":"task_cancelled","description":"A step was cancelled before it ran."},{"type":"string","const":"task_failed","description":"A step failed; `data.errorKind` says why."},{"type":"string","const":"enrollment_waiting","description":"The sequence is waiting, for example for a reply."},{"type":"string","const":"enrollment_completed","description":"The lead reached the end of the sequence."},{"type":"string","const":"enrollment_stopped","description":"The sequence stopped early; `data.exitReason` says why."},{"type":"string","const":"lead_suppressed","description":"A lead matched a [suppression](https://needle.app/docs/suppressions)."},{"type":"string","const":"campaign_status_changed","description":"A campaign's status changed, for example it was started or paused."},{"type":"string","const":"campaign_updated","description":"A campaign's name, sequence, schedule, limits or suppression policy was edited; `data.changedFields` lists which."},{"type":"string","const":"account_connected","description":"A LinkedIn or Instagram account was connected to the workspace for the first time, or again after it was deleted."},{"type":"string","const":"account_reconnected","description":"A disconnected account works again, because a member signed in to it again or LinkedIn or Instagram reports it healthy."},{"type":"string","const":"account_deleted","description":"A connected account was deleted."},{"type":"string","const":"account_paused","description":"A connected account was paused, by its owner or after hitting a limit (`data.errorKind`)."},{"type":"string","const":"account_resumed","description":"A paused connected account was resumed, by its owner or when billing was restored."},{"type":"string","const":"account_disconnected","description":"A connected account stopped working: it needs signing in again (`data.errorKind` is `auth_required`) or LinkedIn or Instagram disconnected it (`disconnected`). Its campaigns wait until it is reconnected."},{"type":"string","const":"account_suspended","description":"A connected account was signed out and stopped, because the workspace's billing lapsed or its owner was removed from the workspace (`data.message`). It has to be connected again to be used."},{"type":"string","const":"account_limits_updated","description":"A connected account's usage limits were changed; `data.changes` lists each limit."},{"type":"string","const":"account_access_granted","description":"A member (`data.member`) was allowed to use a connected account."},{"type":"string","const":"account_access_revoked","description":"A member (`data.member`) can no longer use a connected account. Campaigns they started with it pause."},{"type":"string","const":"account_sharing_changed","description":"A connected account was shared with the whole workspace, or stopped being shared."},{"type":"string","const":"member_invited","description":"Someone was invited to the workspace."},{"type":"string","const":"member_invitation_revoked","description":"An invitation to the workspace was withdrawn."},{"type":"string","const":"member_joined","description":"Someone accepted an invitation and joined."},{"type":"string","const":"member_role_changed","description":"A member's role changed."},{"type":"string","const":"member_removed","description":"An admin removed a member. Their accounts are suspended and their campaigns pause."},{"type":"string","const":"member_left","description":"A member deleted their Needle account."},{"type":"string","const":"api_key_created","description":"An API key was created."},{"type":"string","const":"api_key_revoked","description":"An API key was disabled."},{"type":"string","const":"api_key_enabled","description":"A disabled API key was enabled again."},{"type":"string","const":"api_key_deleted","description":"An API key was deleted."},{"type":"string","const":"webhook_created","description":"A webhook was added."},{"type":"string","const":"webhook_updated","description":"A webhook's URL or headers changed; `data.changedFields` lists which."},{"type":"string","const":"webhook_deleted","description":"A webhook was removed."},{"type":"string","const":"suppression_added","description":"A lead or company was added to the [do-not-contact list](https://needle.app/docs/suppressions) by a member or through the API."},{"type":"string","const":"suppression_removed","description":"An entry was removed from the [do-not-contact list](https://needle.app/docs/suppressions)."},{"type":"string","const":"linkedin_profile_visited","description":"A LinkedIn profile was visited."},{"type":"string","const":"linkedin_invite_sent","description":"A LinkedIn connection request was sent."},{"type":"string","const":"linkedin_invite_withdrawn","description":"A LinkedIn connection request was withdrawn."},{"type":"string","const":"linkedin_message_sent","description":"A LinkedIn message was sent, through Needle or by the account owner in LinkedIn (`data.sentOutsideNeedle`)."},{"type":"string","const":"linkedin_follow_sent","description":"A LinkedIn profile was followed."},{"type":"string","const":"linkedin_unfollowed","description":"A LinkedIn profile was unfollowed."},{"type":"string","const":"linkedin_invite_accepted","description":"A LinkedIn connection request was accepted."},{"type":"string","const":"linkedin_message_received","description":"A LinkedIn reply was received."},{"type":"string","const":"linkedin_post_commented","description":"A comment was posted on LinkedIn."},{"type":"string","const":"linkedin_post_reacted","description":"A reaction was added to a LinkedIn post."},{"type":"string","const":"instagram_message_sent","description":"An Instagram message was sent, through Needle or by the account owner in Instagram (`data.sentOutsideNeedle`)."},{"type":"string","const":"instagram_profile_visited","description":"An Instagram profile was visited."},{"type":"string","const":"instagram_follow_sent","description":"An Instagram profile was followed."},{"type":"string","const":"instagram_unfollowed","description":"An Instagram profile was unfollowed."},{"type":"string","const":"instagram_message_received","description":"An Instagram reply was received."},{"type":"string","const":"instagram_post_commented","description":"A comment was posted on Instagram."},{"type":"string","const":"instagram_post_reacted","description":"An Instagram post was liked."},{"type":"string","const":"instagram_message_reacted","description":"A reaction was added to an Instagram message."},{"type":"string","const":"instagram_post_created","description":"An Instagram post was published."},{"type":"string","description":"A type Needle no longer records, which older events can still have."}]},"label":{"type":"string"},"occurredAt":{"type":"string","format":"date-time"},"channel":{"anyOf":[{"type":"string","enum":["linkedin","instagram"]},{"type":"null"}]},"nodeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"leadId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"leadName":{"anyOf":[{"type":"string"},{"type":"null"}]},"leadImageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"enrollmentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"connectedAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"data":{"anyOf":[{"type":"object","properties":{"nodeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"action":{"anyOf":[{"type":"string","enum":["linkedin_invitation","linkedin_cancel_invitation","linkedin_message","linkedin_inmail","linkedin_profile_view","linkedin_search","linkedin_comment","linkedin_reaction","instagram_message","instagram_profile_view","instagram_follow","instagram_unfollow","instagram_comment","instagram_reaction","instagram_post"]},{"type":"null"}]},"skipReason":{"anyOf":[{"type":"string","enum":["duplicate_in_batch","enrolled_elsewhere","suppressed","recently_contacted","unresponsive","daily_limit_reached","lead_not_found","missing_identity","missing_personalization","already_connected","already_invited","already_following","follow_request_pending","not_first_degree","invalid_recipient","generation_failed"]},{"type":"null"}]},"exitReason":{"anyOf":[{"type":"string","enum":["finished","replied","messaged_directly","timeout","manual","suppressed","dead_end","error","account_disconnected","campaign_archived","lead_deleted"]},{"type":"null"}]},"text":{"anyOf":[{"type":"string"},{"type":"null"}]},"subject":{"anyOf":[{"type":"string"},{"type":"null"}]},"errorKind":{"anyOf":[{"type":"string"},{"type":"null"}]},"message":{"anyOf":[{"type":"string"},{"type":"null"}]},"suppressionReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"keyword":{"anyOf":[{"type":"string"},{"type":"null"}]},"profile":{"description":"Who a direct (lead-less) action targeted, e.g. the profile that was visited, or the lead a lead_created or lead_deleted event is about.","anyOf":[{"type":"object","properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"identity":{"type":"string"},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["identity"],"additionalProperties":false},{"type":"null"}]},"approvedBy":{"description":"The workspace member who approved a held step.","anyOf":[{"type":"object","properties":{"userId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["userId","name"],"additionalProperties":false},{"type":"null"}]},"sentBy":{"description":"The workspace member who sent the message by hand rather than a campaign.","anyOf":[{"type":"object","properties":{"userId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["userId","name"],"additionalProperties":false},{"type":"null"}]},"sentOutsideNeedle":{"description":"The account owner sent the message straight from the channel, not through Needle.","anyOf":[{"type":"boolean"},{"type":"null"}]},"messageId":{"description":"The id of the message on the channel.","anyOf":[{"type":"string"},{"type":"null"}]},"conversationId":{"description":"The id of the chat the message is in.","anyOf":[{"type":"string"},{"type":"null"}]},"stoppedBy":{"description":"The workspace member who stopped the lead.","anyOf":[{"type":"object","properties":{"userId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["userId","name"],"additionalProperties":false},{"type":"null"}]},"properties":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},{"type":"null"}]},"changes":{"description":"What changed, keyed by field. Lead custom properties are keyed `properties.<key>`.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"from":{"anyOf":[{"type":"string"},{"type":"null"}]},"to":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["from","to"],"additionalProperties":false}},{"type":"null"}]},"changedFields":{"description":"Which fields changed, when their values are too large or too secret to include.","anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"member":{"description":"The workspace member the event is about.","anyOf":[{"type":"object","properties":{"userId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["userId","name"],"additionalProperties":false},{"type":"null"}]},"email":{"description":"Who the invitation was sent to.","anyOf":[{"type":"string"},{"type":"null"}]},"role":{"description":"The workspace role: `member`, `admin` or `owner`.","anyOf":[{"type":"string"},{"type":"null"}]},"apiKey":{"description":"The API key the event is about. Never the key itself.","anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},{"type":"null"}]},"webhook":{"description":"The webhook the event is about, with only its URL's host.","anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"host":{"type":"string"}},"required":["id","host"],"additionalProperties":false},{"type":"null"}]},"suppressionId":{"description":"The do-not-contact entry the event is about.","anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"companyDomain":{"description":"The company domain a do-not-contact entry covers.","anyOf":[{"type":"string"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]}},"required":["id","type","label","occurredAt","channel","nodeId","leadId","leadName","leadImageUrl","enrollmentId","connectedAccountId","data"],"additionalProperties":false}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]},"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Id of this request, for support and troubleshooting"}},"required":["events","nextCursor","requestId"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized: missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Invalid request payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/campaigns/{campaignId}/tasks":{"get":{"tags":["Campaigns"],"operationId":"listCampaignTasks","summary":"List campaign tasks","description":"The work this campaign owes its leads, and when each step is due.","parameters":[{"in":"path","name":"campaignId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Campaign id"},"required":true,"description":"Campaign id"},{"in":"query","name":"cursor","schema":{"type":"string","minLength":1}},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100}},{"in":"query","name":"status","schema":{"type":"string","enum":["pending","pending_approval"]}}],"responses":{"200":{"description":"A page of tasks in queue order — the earliest scheduled first, which is the order the worker will run them in. Pass nextCursor as cursor for the next page.","content":{"application/json":{"schema":{"type":"object","properties":{"tasks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"status":{"type":"string","enum":["pending","pending_approval"]},"statusLabel":{"type":"string"},"channel":{"type":"string","enum":["linkedin","instagram"]},"action":{"type":"string","enum":["linkedin_invitation","linkedin_cancel_invitation","linkedin_message","linkedin_inmail","linkedin_profile_view","linkedin_search","linkedin_comment","linkedin_reaction","instagram_message","instagram_profile_view","instagram_follow","instagram_unfollow","instagram_comment","instagram_reaction","instagram_post"]},"actionLabel":{"type":"string"},"nodeId":{"type":"string"},"scheduledAt":{"type":"string","format":"date-time"},"attempts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Non-zero when a transient failure requeued the task"},"lastError":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastErrorKind":{"anyOf":[{"type":"string"},{"type":"null"}]},"text":{"anyOf":[{"type":"string"},{"type":"null"}]},"subject":{"anyOf":[{"type":"string"},{"type":"null"}]},"campaignId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"campaignName":{"anyOf":[{"type":"string"},{"type":"null"}]},"enrollmentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"enrollmentStatus":{"type":"string","enum":["active","waiting","completed","stopped","failed"]},"leadId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"leadName":{"anyOf":[{"type":"string"},{"type":"null"}]},"leadImageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"connectedAccountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"accountName":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"}},"required":["id","status","statusLabel","channel","action","actionLabel","nodeId","scheduledAt","attempts","lastError","lastErrorKind","text","subject","campaignId","campaignName","enrollmentId","enrollmentStatus","leadId","leadName","leadImageUrl","connectedAccountId","accountName","createdAt"],"additionalProperties":false}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]},"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Id of this request, for support and troubleshooting"}},"required":["tasks","nextCursor","requestId"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized: missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Invalid request payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/campaigns/{campaignId}/leads":{"get":{"tags":["Campaigns"],"operationId":"listCampaignLeads","summary":"List campaign leads","parameters":[{"in":"path","name":"campaignId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Campaign id"},"required":true,"description":"Campaign id"},{"in":"query","name":"cursor","schema":{"type":"string","minLength":1}},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"A page of leads in the campaign, newest first. Pass nextCursor as cursor for the next page.","content":{"application/json":{"schema":{"type":"object","properties":{"leads":{"type":"array","items":{"type":"object","properties":{"leadId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"enrollmentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"companyName":{"anyOf":[{"type":"string"},{"type":"null"}]},"companyDomain":{"anyOf":[{"type":"string"},{"type":"null"}]},"jobTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"timezone":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["active","waiting","completed","stopped","failed"]},"exitReason":{"anyOf":[{"type":"string","enum":["finished","replied","messaged_directly","timeout","manual","suppressed","dead_end","error","account_disconnected","campaign_archived","lead_deleted"]},{"type":"null"}]},"currentNodeId":{"type":"string"},"waitingFor":{"anyOf":[{"type":"string","enum":["linkedin_invite_accepted","linkedin_message_received","instagram_message_received"]},{"type":"null"}]},"waitingUntil":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"lastEventAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"completedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["leadId","enrollmentId","firstName","lastName","companyName","companyDomain","jobTitle","email","imageUrl","timezone","status","exitReason","currentNodeId","waitingFor","waitingUntil","lastEventAt","completedAt","createdAt","updatedAt"],"additionalProperties":false}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]},"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Id of this request, for support and troubleshooting"}},"required":["leads","nextCursor","requestId"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized: missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Invalid request payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"post":{"tags":["Campaigns"],"operationId":"enrollCampaignLeads","summary":"Enroll leads","description":"Enrolls leads that already exist, by id — create them first with POST /leads or POST /leads/bulk. A lead is skipped rather than enrolled when it has no handle for a channel the campaign sends on (missing_identity), has an empty lead field that a message uses, or one with a {{...}} inside it (missing_personalization, the detail names the field), is already live in another campaign (enrolled_elsewhere), is on the do-not-contact list (suppressed), was contacted too recently (recently_contacted), did not reply to previous outreach (unresponsive), or the id does not name a lead in this workspace (lead_not_found). Results come back in request order.","parameters":[{"in":"path","name":"campaignId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Campaign id"},"required":true,"description":"Campaign id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"leadIds":{"minItems":1,"maxItems":500,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"description":"Leads to enroll, by id. Create them first with POST /api/v1/leads or POST /api/v1/leads/bulk."}},"required":["leadIds"]}}}},"responses":{"201":{"description":"One result per submitted lead id, in request order.","content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"index":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"status":{"type":"string","const":"accepted"},"leadId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"enrollmentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["index","status","leadId","enrollmentId"],"additionalProperties":false},{"type":"object","properties":{"index":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"status":{"type":"string","const":"skipped"},"reason":{"type":"string","enum":["duplicate_in_batch","enrolled_elsewhere","suppressed","recently_contacted","unresponsive","daily_limit_reached","lead_not_found","missing_identity","missing_personalization","already_connected","already_invited","already_following","follow_request_pending","not_first_degree","invalid_recipient","generation_failed"]},"detail":{"type":"string"}},"required":["index","status","reason"],"additionalProperties":false}],"type":"object"}},"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Id of this request, for support and troubleshooting"}},"required":["results","requestId"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized: missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Invalid request payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/campaigns/{campaignId}/leads/bulk-stop":{"post":{"tags":["Campaigns"],"operationId":"stopCampaignLeads","summary":"Stop leads in a campaign in bulk","description":"Stops the live enrollments of up to 500 leads in this campaign, the same way DELETE /campaigns/{campaignId}/leads/{leadId} does. A lead with no live enrollment in this campaign (never enrolled, already stopped or finished, or not a lead in this workspace) is skipped as not_live rather than failing the batch, so retrying is safe. Results come back in request order.","parameters":[{"in":"path","name":"campaignId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Campaign id"},"required":true,"description":"Campaign id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"leadIds":{"minItems":1,"maxItems":500,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"description":"Leads to stop, by id."}},"required":["leadIds"]}}}},"responses":{"200":{"description":"One result per submitted lead id, in request order.","content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"index":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"status":{"type":"string","const":"stopped"},"leadId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["index","status","leadId"],"additionalProperties":false},{"type":"object","properties":{"index":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"status":{"type":"string","const":"skipped"},"leadId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"reason":{"type":"string","const":"not_live"}},"required":["index","status","leadId","reason"],"additionalProperties":false}],"type":"object"}},"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Id of this request, for support and troubleshooting"}},"required":["results","requestId"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized: missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Invalid request payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/campaigns/{campaignId}/leads/{leadId}":{"delete":{"tags":["Campaigns"],"operationId":"removeCampaignLead","summary":"Stop a lead in a campaign","parameters":[{"in":"path","name":"campaignId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Campaign id"},"required":true,"description":"Campaign id"},{"in":"path","name":"leadId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Lead id"},"required":true,"description":"Lead id"}],"responses":{"200":{"description":"Lead enrollment stopped.","content":{"application/json":{"schema":{"type":"object","properties":{"stopped":{"type":"boolean","const":true},"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Id of this request, for support and troubleshooting"}},"required":["stopped","requestId"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized: missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Invalid request payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/drafts":{"get":{"tags":["Drafts"],"operationId":"listDrafts","summary":"List drafts","description":"Messages drafted for the workspace that wait for a person to review them before they send. Review them in the Needle inbox.","parameters":[{"in":"query","name":"cursor","schema":{"type":"string","minLength":1}},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100}},{"in":"query","name":"campaignId","schema":{"description":"Only drafts from this campaign","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"description":"Only drafts from this campaign"}],"responses":{"200":{"description":"A page of drafts, newest first. Pass nextCursor as cursor for the next page.","content":{"application/json":{"schema":{"type":"object","properties":{"drafts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"status":{"type":"string","enum":["awaiting_review"]},"channel":{"type":"string","enum":["linkedin","instagram"]},"action":{"type":"string","enum":["linkedin_invitation","linkedin_cancel_invitation","linkedin_message","linkedin_inmail","linkedin_profile_view","linkedin_search","linkedin_comment","linkedin_reaction","instagram_message","instagram_profile_view","instagram_follow","instagram_unfollow","instagram_comment","instagram_reaction","instagram_post"]},"text":{"anyOf":[{"type":"string"},{"type":"null"}]},"subject":{"anyOf":[{"type":"string"},{"type":"null"}]},"generatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"lead":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name"],"additionalProperties":false},"connectedAccountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"source":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"campaign"},"campaignId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"campaignName":{"anyOf":[{"type":"string"},{"type":"null"}]},"taskId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"nodeId":{"type":"string","description":"The campaign step that drafted it"}},"required":["kind","campaignId","campaignName","taskId","nodeId"],"additionalProperties":false}],"description":"What drafted the message.","type":"object"}},"required":["id","status","channel","action","text","subject","generatedAt","createdAt","lead","connectedAccountId","source"],"additionalProperties":false}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]},"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Id of this request, for support and troubleshooting"}},"required":["drafts","nextCursor","requestId"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized: missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Invalid request payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/events/search":{"post":{"tags":["Events"],"operationId":"searchEvents","summary":"Search events","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"types":{"type":"array","items":{"anyOf":[{"type":"string","const":"lead_created","description":"A lead was created, from the app, the API, MCP, an import, or a direct message to someone who was not a lead yet."},{"type":"string","const":"lead_updated","description":"A lead's details or handles changed; `data.changes` lists each changed field."},{"type":"string","const":"lead_deleted","description":"A lead was deleted. Its live campaigns stop with `exitReason` `lead_deleted`."},{"type":"string","const":"lead_enrolled","description":"A lead was added to a campaign."},{"type":"string","const":"lead_skipped","description":"A lead was not added to a campaign; `data.skipReason` says why."},{"type":"string","const":"message_generated","description":"AI wrote a message for a step."},{"type":"string","const":"condition_evaluated","description":"A check in the sequence was evaluated."},{"type":"string","const":"task_held","description":"A step is waiting for approval."},{"type":"string","const":"task_approved","description":"A held step was approved."},{"type":"string","const":"task_skipped","description":"A step was skipped; `data.skipReason` says why."},{"type":"string","const":"task_cancelled","description":"A step was cancelled before it ran."},{"type":"string","const":"task_failed","description":"A step failed; `data.errorKind` says why."},{"type":"string","const":"enrollment_waiting","description":"The sequence is waiting, for example for a reply."},{"type":"string","const":"enrollment_completed","description":"The lead reached the end of the sequence."},{"type":"string","const":"enrollment_stopped","description":"The sequence stopped early; `data.exitReason` says why."},{"type":"string","const":"lead_suppressed","description":"A lead matched a [suppression](https://needle.app/docs/suppressions)."},{"type":"string","const":"campaign_status_changed","description":"A campaign's status changed, for example it was started or paused."},{"type":"string","const":"campaign_updated","description":"A campaign's name, sequence, schedule, limits or suppression policy was edited; `data.changedFields` lists which."},{"type":"string","const":"account_connected","description":"A LinkedIn or Instagram account was connected to the workspace for the first time, or again after it was deleted."},{"type":"string","const":"account_reconnected","description":"A disconnected account works again, because a member signed in to it again or LinkedIn or Instagram reports it healthy."},{"type":"string","const":"account_deleted","description":"A connected account was deleted."},{"type":"string","const":"account_paused","description":"A connected account was paused, by its owner or after hitting a limit (`data.errorKind`)."},{"type":"string","const":"account_resumed","description":"A paused connected account was resumed, by its owner or when billing was restored."},{"type":"string","const":"account_disconnected","description":"A connected account stopped working: it needs signing in again (`data.errorKind` is `auth_required`) or LinkedIn or Instagram disconnected it (`disconnected`). Its campaigns wait until it is reconnected."},{"type":"string","const":"account_suspended","description":"A connected account was signed out and stopped, because the workspace's billing lapsed or its owner was removed from the workspace (`data.message`). It has to be connected again to be used."},{"type":"string","const":"account_limits_updated","description":"A connected account's usage limits were changed; `data.changes` lists each limit."},{"type":"string","const":"account_access_granted","description":"A member (`data.member`) was allowed to use a connected account."},{"type":"string","const":"account_access_revoked","description":"A member (`data.member`) can no longer use a connected account. Campaigns they started with it pause."},{"type":"string","const":"account_sharing_changed","description":"A connected account was shared with the whole workspace, or stopped being shared."},{"type":"string","const":"member_invited","description":"Someone was invited to the workspace."},{"type":"string","const":"member_invitation_revoked","description":"An invitation to the workspace was withdrawn."},{"type":"string","const":"member_joined","description":"Someone accepted an invitation and joined."},{"type":"string","const":"member_role_changed","description":"A member's role changed."},{"type":"string","const":"member_removed","description":"An admin removed a member. Their accounts are suspended and their campaigns pause."},{"type":"string","const":"member_left","description":"A member deleted their Needle account."},{"type":"string","const":"api_key_created","description":"An API key was created."},{"type":"string","const":"api_key_revoked","description":"An API key was disabled."},{"type":"string","const":"api_key_enabled","description":"A disabled API key was enabled again."},{"type":"string","const":"api_key_deleted","description":"An API key was deleted."},{"type":"string","const":"webhook_created","description":"A webhook was added."},{"type":"string","const":"webhook_updated","description":"A webhook's URL or headers changed; `data.changedFields` lists which."},{"type":"string","const":"webhook_deleted","description":"A webhook was removed."},{"type":"string","const":"suppression_added","description":"A lead or company was added to the [do-not-contact list](https://needle.app/docs/suppressions) by a member or through the API."},{"type":"string","const":"suppression_removed","description":"An entry was removed from the [do-not-contact list](https://needle.app/docs/suppressions)."},{"type":"string","const":"linkedin_profile_visited","description":"A LinkedIn profile was visited."},{"type":"string","const":"linkedin_invite_sent","description":"A LinkedIn connection request was sent."},{"type":"string","const":"linkedin_invite_withdrawn","description":"A LinkedIn connection request was withdrawn."},{"type":"string","const":"linkedin_message_sent","description":"A LinkedIn message was sent, through Needle or by the account owner in LinkedIn (`data.sentOutsideNeedle`)."},{"type":"string","const":"linkedin_follow_sent","description":"A LinkedIn profile was followed."},{"type":"string","const":"linkedin_unfollowed","description":"A LinkedIn profile was unfollowed."},{"type":"string","const":"linkedin_invite_accepted","description":"A LinkedIn connection request was accepted."},{"type":"string","const":"linkedin_message_received","description":"A LinkedIn reply was received."},{"type":"string","const":"linkedin_post_commented","description":"A comment was posted on LinkedIn."},{"type":"string","const":"linkedin_post_reacted","description":"A reaction was added to a LinkedIn post."},{"type":"string","const":"instagram_message_sent","description":"An Instagram message was sent, through Needle or by the account owner in Instagram (`data.sentOutsideNeedle`)."},{"type":"string","const":"instagram_profile_visited","description":"An Instagram profile was visited."},{"type":"string","const":"instagram_follow_sent","description":"An Instagram profile was followed."},{"type":"string","const":"instagram_unfollowed","description":"An Instagram profile was unfollowed."},{"type":"string","const":"instagram_message_received","description":"An Instagram reply was received."},{"type":"string","const":"instagram_post_commented","description":"A comment was posted on Instagram."},{"type":"string","const":"instagram_post_reacted","description":"An Instagram post was liked."},{"type":"string","const":"instagram_message_reacted","description":"A reaction was added to an Instagram message."},{"type":"string","const":"instagram_post_created","description":"An Instagram post was published."},{"type":"string","description":"A type Needle no longer records, which older events can still have."}]}},"channel":{"type":"string","enum":["linkedin","instagram"]},"campaignId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"leadId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"enrollmentId":{"description":"Only events recorded for this campaign enrollment.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"accountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"actorUserId":{"description":"Only events caused by this member: what they sent, approved or stopped, and what campaigns they started sent.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"from":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"to":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"cursor":{"type":"string","minLength":1},"limit":{"type":"integer","minimum":1,"maximum":100}}}}}},"responses":{"200":{"description":"A page of events, newest first. Filter by campaign, lead, enrollment, account, member, type, channel, or date. Pass nextCursor as cursor for the next page.","content":{"application/json":{"schema":{"type":"object","properties":{"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"type":{"anyOf":[{"type":"string","const":"lead_created","description":"A lead was created, from the app, the API, MCP, an import, or a direct message to someone who was not a lead yet."},{"type":"string","const":"lead_updated","description":"A lead's details or handles changed; `data.changes` lists each changed field."},{"type":"string","const":"lead_deleted","description":"A lead was deleted. Its live campaigns stop with `exitReason` `lead_deleted`."},{"type":"string","const":"lead_enrolled","description":"A lead was added to a campaign."},{"type":"string","const":"lead_skipped","description":"A lead was not added to a campaign; `data.skipReason` says why."},{"type":"string","const":"message_generated","description":"AI wrote a message for a step."},{"type":"string","const":"condition_evaluated","description":"A check in the sequence was evaluated."},{"type":"string","const":"task_held","description":"A step is waiting for approval."},{"type":"string","const":"task_approved","description":"A held step was approved."},{"type":"string","const":"task_skipped","description":"A step was skipped; `data.skipReason` says why."},{"type":"string","const":"task_cancelled","description":"A step was cancelled before it ran."},{"type":"string","const":"task_failed","description":"A step failed; `data.errorKind` says why."},{"type":"string","const":"enrollment_waiting","description":"The sequence is waiting, for example for a reply."},{"type":"string","const":"enrollment_completed","description":"The lead reached the end of the sequence."},{"type":"string","const":"enrollment_stopped","description":"The sequence stopped early; `data.exitReason` says why."},{"type":"string","const":"lead_suppressed","description":"A lead matched a [suppression](https://needle.app/docs/suppressions)."},{"type":"string","const":"campaign_status_changed","description":"A campaign's status changed, for example it was started or paused."},{"type":"string","const":"campaign_updated","description":"A campaign's name, sequence, schedule, limits or suppression policy was edited; `data.changedFields` lists which."},{"type":"string","const":"account_connected","description":"A LinkedIn or Instagram account was connected to the workspace for the first time, or again after it was deleted."},{"type":"string","const":"account_reconnected","description":"A disconnected account works again, because a member signed in to it again or LinkedIn or Instagram reports it healthy."},{"type":"string","const":"account_deleted","description":"A connected account was deleted."},{"type":"string","const":"account_paused","description":"A connected account was paused, by its owner or after hitting a limit (`data.errorKind`)."},{"type":"string","const":"account_resumed","description":"A paused connected account was resumed, by its owner or when billing was restored."},{"type":"string","const":"account_disconnected","description":"A connected account stopped working: it needs signing in again (`data.errorKind` is `auth_required`) or LinkedIn or Instagram disconnected it (`disconnected`). Its campaigns wait until it is reconnected."},{"type":"string","const":"account_suspended","description":"A connected account was signed out and stopped, because the workspace's billing lapsed or its owner was removed from the workspace (`data.message`). It has to be connected again to be used."},{"type":"string","const":"account_limits_updated","description":"A connected account's usage limits were changed; `data.changes` lists each limit."},{"type":"string","const":"account_access_granted","description":"A member (`data.member`) was allowed to use a connected account."},{"type":"string","const":"account_access_revoked","description":"A member (`data.member`) can no longer use a connected account. Campaigns they started with it pause."},{"type":"string","const":"account_sharing_changed","description":"A connected account was shared with the whole workspace, or stopped being shared."},{"type":"string","const":"member_invited","description":"Someone was invited to the workspace."},{"type":"string","const":"member_invitation_revoked","description":"An invitation to the workspace was withdrawn."},{"type":"string","const":"member_joined","description":"Someone accepted an invitation and joined."},{"type":"string","const":"member_role_changed","description":"A member's role changed."},{"type":"string","const":"member_removed","description":"An admin removed a member. Their accounts are suspended and their campaigns pause."},{"type":"string","const":"member_left","description":"A member deleted their Needle account."},{"type":"string","const":"api_key_created","description":"An API key was created."},{"type":"string","const":"api_key_revoked","description":"An API key was disabled."},{"type":"string","const":"api_key_enabled","description":"A disabled API key was enabled again."},{"type":"string","const":"api_key_deleted","description":"An API key was deleted."},{"type":"string","const":"webhook_created","description":"A webhook was added."},{"type":"string","const":"webhook_updated","description":"A webhook's URL or headers changed; `data.changedFields` lists which."},{"type":"string","const":"webhook_deleted","description":"A webhook was removed."},{"type":"string","const":"suppression_added","description":"A lead or company was added to the [do-not-contact list](https://needle.app/docs/suppressions) by a member or through the API."},{"type":"string","const":"suppression_removed","description":"An entry was removed from the [do-not-contact list](https://needle.app/docs/suppressions)."},{"type":"string","const":"linkedin_profile_visited","description":"A LinkedIn profile was visited."},{"type":"string","const":"linkedin_invite_sent","description":"A LinkedIn connection request was sent."},{"type":"string","const":"linkedin_invite_withdrawn","description":"A LinkedIn connection request was withdrawn."},{"type":"string","const":"linkedin_message_sent","description":"A LinkedIn message was sent, through Needle or by the account owner in LinkedIn (`data.sentOutsideNeedle`)."},{"type":"string","const":"linkedin_follow_sent","description":"A LinkedIn profile was followed."},{"type":"string","const":"linkedin_unfollowed","description":"A LinkedIn profile was unfollowed."},{"type":"string","const":"linkedin_invite_accepted","description":"A LinkedIn connection request was accepted."},{"type":"string","const":"linkedin_message_received","description":"A LinkedIn reply was received."},{"type":"string","const":"linkedin_post_commented","description":"A comment was posted on LinkedIn."},{"type":"string","const":"linkedin_post_reacted","description":"A reaction was added to a LinkedIn post."},{"type":"string","const":"instagram_message_sent","description":"An Instagram message was sent, through Needle or by the account owner in Instagram (`data.sentOutsideNeedle`)."},{"type":"string","const":"instagram_profile_visited","description":"An Instagram profile was visited."},{"type":"string","const":"instagram_follow_sent","description":"An Instagram profile was followed."},{"type":"string","const":"instagram_unfollowed","description":"An Instagram profile was unfollowed."},{"type":"string","const":"instagram_message_received","description":"An Instagram reply was received."},{"type":"string","const":"instagram_post_commented","description":"A comment was posted on Instagram."},{"type":"string","const":"instagram_post_reacted","description":"An Instagram post was liked."},{"type":"string","const":"instagram_message_reacted","description":"A reaction was added to an Instagram message."},{"type":"string","const":"instagram_post_created","description":"An Instagram post was published."},{"type":"string","description":"A type Needle no longer records, which older events can still have."}]},"label":{"type":"string"},"occurredAt":{"type":"string","format":"date-time"},"channel":{"anyOf":[{"type":"string","enum":["linkedin","instagram"]},{"type":"null"}]},"nodeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"leadId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"leadName":{"anyOf":[{"type":"string"},{"type":"null"}]},"leadImageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"campaignId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"campaignName":{"anyOf":[{"type":"string"},{"type":"null"}]},"enrollmentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"connectedAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"accountName":{"anyOf":[{"type":"string"},{"type":"null"}]},"actorUserId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}],"description":"The member who caused the event. Null for what leads and the system do."},"actorName":{"anyOf":[{"type":"string"},{"type":"null"}]},"data":{"anyOf":[{"type":"object","properties":{"nodeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"action":{"anyOf":[{"type":"string","enum":["linkedin_invitation","linkedin_cancel_invitation","linkedin_message","linkedin_inmail","linkedin_profile_view","linkedin_search","linkedin_comment","linkedin_reaction","instagram_message","instagram_profile_view","instagram_follow","instagram_unfollow","instagram_comment","instagram_reaction","instagram_post"]},{"type":"null"}]},"skipReason":{"anyOf":[{"type":"string","enum":["duplicate_in_batch","enrolled_elsewhere","suppressed","recently_contacted","unresponsive","daily_limit_reached","lead_not_found","missing_identity","missing_personalization","already_connected","already_invited","already_following","follow_request_pending","not_first_degree","invalid_recipient","generation_failed"]},{"type":"null"}]},"exitReason":{"anyOf":[{"type":"string","enum":["finished","replied","messaged_directly","timeout","manual","suppressed","dead_end","error","account_disconnected","campaign_archived","lead_deleted"]},{"type":"null"}]},"text":{"anyOf":[{"type":"string"},{"type":"null"}]},"subject":{"anyOf":[{"type":"string"},{"type":"null"}]},"errorKind":{"anyOf":[{"type":"string"},{"type":"null"}]},"message":{"anyOf":[{"type":"string"},{"type":"null"}]},"suppressionReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"keyword":{"anyOf":[{"type":"string"},{"type":"null"}]},"profile":{"description":"Who a direct (lead-less) action targeted, e.g. the profile that was visited, or the lead a lead_created or lead_deleted event is about.","anyOf":[{"type":"object","properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"identity":{"type":"string"},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["identity"],"additionalProperties":false},{"type":"null"}]},"approvedBy":{"description":"The workspace member who approved a held step.","anyOf":[{"type":"object","properties":{"userId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["userId","name"],"additionalProperties":false},{"type":"null"}]},"sentBy":{"description":"The workspace member who sent the message by hand rather than a campaign.","anyOf":[{"type":"object","properties":{"userId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["userId","name"],"additionalProperties":false},{"type":"null"}]},"sentOutsideNeedle":{"description":"The account owner sent the message straight from the channel, not through Needle.","anyOf":[{"type":"boolean"},{"type":"null"}]},"messageId":{"description":"The id of the message on the channel.","anyOf":[{"type":"string"},{"type":"null"}]},"conversationId":{"description":"The id of the chat the message is in.","anyOf":[{"type":"string"},{"type":"null"}]},"stoppedBy":{"description":"The workspace member who stopped the lead.","anyOf":[{"type":"object","properties":{"userId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["userId","name"],"additionalProperties":false},{"type":"null"}]},"properties":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},{"type":"null"}]},"changes":{"description":"What changed, keyed by field. Lead custom properties are keyed `properties.<key>`.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"from":{"anyOf":[{"type":"string"},{"type":"null"}]},"to":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["from","to"],"additionalProperties":false}},{"type":"null"}]},"changedFields":{"description":"Which fields changed, when their values are too large or too secret to include.","anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"member":{"description":"The workspace member the event is about.","anyOf":[{"type":"object","properties":{"userId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["userId","name"],"additionalProperties":false},{"type":"null"}]},"email":{"description":"Who the invitation was sent to.","anyOf":[{"type":"string"},{"type":"null"}]},"role":{"description":"The workspace role: `member`, `admin` or `owner`.","anyOf":[{"type":"string"},{"type":"null"}]},"apiKey":{"description":"The API key the event is about. Never the key itself.","anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},{"type":"null"}]},"webhook":{"description":"The webhook the event is about, with only its URL's host.","anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"host":{"type":"string"}},"required":["id","host"],"additionalProperties":false},{"type":"null"}]},"suppressionId":{"description":"The do-not-contact entry the event is about.","anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"companyDomain":{"description":"The company domain a do-not-contact entry covers.","anyOf":[{"type":"string"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]}},"required":["id","type","label","occurredAt","channel","nodeId","leadId","leadName","leadImageUrl","campaignId","campaignName","enrollmentId","connectedAccountId","accountName","actorUserId","actorName","data"],"additionalProperties":false}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]},"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Id of this request, for support and troubleshooting"}},"required":["events","nextCursor","requestId"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized: missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Invalid request payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/linkedin/profiles/{identity}":{"get":{"tags":["LinkedIn"],"operationId":"getLinkedinProfile","summary":"Get a LinkedIn profile","description":"Returns a profile by public identifier or user id. Counts against the daily profile view allowance. Returns 429 when the account is at its limit.","parameters":[{"in":"path","name":"identity","schema":{"type":"string","minLength":1,"description":"User id (ACoAAA…) or public identifier."},"required":true,"description":"User id (ACoAAA…) or public identifier."},{"in":"query","name":"connectedAccountId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Connected account to act as"},"required":true,"description":"Connected account to act as"}],"responses":{"200":{"description":"LinkedIn profile.","content":{"application/json":{"schema":{"type":"object","properties":{"profile":{"type":"object","properties":{"publicIdentifier":{"anyOf":[{"type":"string"},{"type":"null"}]},"profileUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"fullName":{"anyOf":[{"type":"string"},{"type":"null"}]},"headline":{"anyOf":[{"type":"string"},{"type":"null"}]},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The About section of the profile."},"location":{"anyOf":[{"type":"string"},{"type":"null"}]},"companyName":{"anyOf":[{"type":"string"},{"type":"null"}]},"jobTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrlLarge":{"anyOf":[{"type":"string"},{"type":"null"}]},"backgroundImageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"followerCount":{"anyOf":[{"type":"number"},{"type":"null"}]},"degree":{"type":"string","enum":["self","first","second","third_plus","out_of_network","unknown"]},"invitationPending":{"type":"boolean","description":"An invitation from this account is awaiting an answer."},"isConnected":{"type":"boolean","description":"True for a first-degree connection, who can receive a message."},"isOpenProfile":{"type":"boolean","description":"True when this person has Open Profile, so InMail can reach them without a connection and often without a credit."},"workExperience":{"type":"array","items":{"type":"object","properties":{"company":{"type":"string"},"position":{"type":"string"},"location":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"employmentType":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"As written on LinkedIn, such as Full-time or Internship."},"startedOn":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Year and month, YYYY-MM. Null when LinkedIn has no date."},"endedOn":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Year and month, YYYY-MM. Null for the current job."},"skills":{"type":"array","items":{"type":"string"}}},"required":["company","position","location","description","employmentType","startedOn","endedOn","skills"],"additionalProperties":false}},"education":{"type":"array","items":{"type":"object","properties":{"school":{"type":"string"},"degree":{"anyOf":[{"type":"string"},{"type":"null"}]},"startedOn":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Year and month, YYYY-MM. Null when LinkedIn has no date."},"endedOn":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Year and month, YYYY-MM. Null when LinkedIn has no date."}},"required":["school","degree","startedOn","endedOn"],"additionalProperties":false}},"skills":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"endorsementCount":{"type":"number"}},"required":["name","endorsementCount"],"additionalProperties":false}},"projects":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"startedOn":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Year and month, YYYY-MM. Null when LinkedIn has no date."},"endedOn":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Year and month, YYYY-MM. Null when LinkedIn has no date."},"skills":{"type":"array","items":{"type":"string"}}},"required":["name","description","startedOn","endedOn","skills"],"additionalProperties":false}},"isHiring":{"type":"boolean","description":"True when the profile shows the #Hiring badge."},"isOpenToWork":{"type":"boolean","description":"True when the profile shows the #OpenToWork badge."},"websites":{"type":"array","items":{"type":"string"}},"throttledSections":{"type":"array","items":{"type":"string"},"description":"Sections LinkedIn held back on this read, such as experience or skills. Their lists are empty even when the person has entries; try again later."}},"required":["publicIdentifier","profileUrl","firstName","lastName","fullName","headline","summary","location","companyName","jobTitle","imageUrl","imageUrlLarge","backgroundImageUrl","followerCount","degree","invitationPending","isConnected","isOpenProfile","workExperience","education","skills","projects","isHiring","isOpenToWork","websites","throttledSections"],"additionalProperties":false},"remainingUsage":{"type":"object","properties":{"hour":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Remaining hourly allowance for this action. Null when this action has no hourly cap."},"day":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Remaining daily allowance for this action."},"week":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Remaining weekly allowance for this action. Null when this action has no weekly cap."}},"required":["hour","day","week"],"additionalProperties":false,"description":"Remaining allowance for this action on the connected account across hourly, daily, and weekly windows. Each action type has its own limits."},"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Id of this request, for support and troubleshooting"}},"required":["profile","remainingUsage","requestId"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized: missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Invalid request payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/linkedin/search":{"post":{"tags":["LinkedIn"],"operationId":"removedLinkedinPeopleSearch","summary":"Removed LinkedIn people search","description":"This endpoint is gone. Use /linkedin/people/search for Classic or /linkedin/sales-navigator/people/search for Sales Navigator.","responses":{"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized: missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"410":{"description":"Gone. The error data contains the Classic and Sales Navigator replacement endpoints.","content":{"application/json":{"schema":{"type":"object","properties":{"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"error":{"type":"string","const":"This people search endpoint was replaced by separate Classic and Sales Navigator endpoints."},"data":{"type":"object","properties":{"classic":{"type":"string","const":"/api/v1/linkedin/people/search"},"salesNavigator":{"type":"string","const":"/api/v1/linkedin/sales-navigator/people/search"}},"required":["classic","salesNavigator"],"additionalProperties":false}},"required":["requestId","error","data"],"additionalProperties":false}}}},"422":{"description":"Invalid request payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/linkedin/people/search":{"post":{"tags":["LinkedIn"],"operationId":"searchLinkedinClassicPeople","summary":"Search LinkedIn people","description":"Search standard LinkedIn with keywords, focused structured filters, or a Classic people search URL.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"connectedAccountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Connected account to act as"},"keywords":{"type":"string","minLength":1,"maxLength":512},"locations":{"description":"Location ids from the search parameters endpoint with type=LOCATION.","minItems":1,"maxItems":20,"type":"array","items":{"type":"string","pattern":"^\\d+$"}},"industries":{"description":"Industry ids from the search parameters endpoint with type=INDUSTRY.","minItems":1,"maxItems":20,"type":"array","items":{"type":"string","pattern":"^\\d+$"}},"companies":{"description":"Current-company ids from the search parameters endpoint with type=COMPANY.","minItems":1,"maxItems":20,"type":"array","items":{"type":"string","pattern":"^\\d+$"}},"pastCompanies":{"description":"Past-company ids from the search parameters endpoint with type=COMPANY.","minItems":1,"maxItems":20,"type":"array","items":{"type":"string","pattern":"^\\d+$"}},"schools":{"description":"School ids from the search parameters endpoint with type=SCHOOL.","minItems":1,"maxItems":20,"type":"array","items":{"type":"string","pattern":"^\\d+$"}},"serviceCategories":{"description":"Service-category ids from the search parameters endpoint with type=SERVICE.","minItems":1,"maxItems":20,"type":"array","items":{"type":"string","pattern":"^\\d+$"}},"connectionsOf":{"description":"Member ids from the search parameters endpoint with type=CONNECTIONS. Returns people connected to them.","minItems":1,"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":256}},"followersOf":{"description":"Member ids from the search parameters endpoint with type=PEOPLE. Returns people who follow them.","minItems":1,"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":256}},"profileLanguages":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","pattern":"^[a-z]{2}$"},"description":"ISO 639-1 profile-language codes from the search parameters endpoint with type=LANGUAGE."},"networkDistances":{"minItems":1,"maxItems":3,"type":"array","items":{"anyOf":[{"type":"number","const":1},{"type":"number","const":2},{"type":"number","const":3}]},"description":"LinkedIn connection degrees: first, second, or third-plus."},"openTo":{"description":"LinkedIn only filters on these two, not on open to work or hiring.","minItems":1,"maxItems":2,"type":"array","items":{"type":"string","enum":["pro_bono","board_member"]}},"advancedKeywords":{"type":"object","properties":{"firstName":{"type":"string","minLength":1,"maxLength":512},"lastName":{"type":"string","minLength":1,"maxLength":512},"title":{"type":"string","minLength":1,"maxLength":512},"company":{"type":"string","minLength":1,"maxLength":512},"school":{"type":"string","minLength":1,"maxLength":512}},"additionalProperties":false,"description":"LinkedIn's Keywords panel: each field matches text against that profile field only."},"searchUrl":{"type":"string","maxLength":4096,"format":"uri","description":"Use a people search URL copied from standard LinkedIn, such as https://www.linkedin.com/search/results/people/?keywords=engineer. The filters it carries replace the filter fields, which must then be left out. Sales Navigator URLs go to POST /api/v1/linkedin/sales-navigator/people/search."},"cursor":{"type":"string","minLength":1,"maxLength":8192},"limit":{"description":"Requested page size, capped at 10 by LinkedIn Classic.","type":"integer","minimum":1,"maximum":100}},"required":["connectedAccountId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Search hits and an optional cursor.","content":{"application/json":{"schema":{"type":"object","properties":{"hits":{"type":"array","items":{"type":"object","properties":{"publicIdentifier":{"anyOf":[{"type":"string"},{"type":"null"}]},"profileUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"fullName":{"anyOf":[{"type":"string"},{"type":"null"}]},"headline":{"anyOf":[{"type":"string"},{"type":"null"}]},"location":{"anyOf":[{"type":"string"},{"type":"null"}]},"companyName":{"anyOf":[{"type":"string"},{"type":"null"}]},"jobTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrlLarge":{"anyOf":[{"type":"string"},{"type":"null"}]},"degree":{"type":"string","enum":["self","first","second","third_plus","out_of_network","unknown"]},"invitationPending":{"type":"boolean"}},"required":["publicIdentifier","profileUrl","fullName","headline","location","companyName","jobTitle","imageUrl","imageUrlLarge","degree","invitationPending"],"additionalProperties":false}},"cursor":{"anyOf":[{"type":"string"},{"type":"null"}]},"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Id of this request, for support and troubleshooting"}},"required":["hits","cursor","requestId"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized: missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Invalid request payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/linkedin/sales-navigator/people/search":{"post":{"tags":["LinkedIn"],"operationId":"searchLinkedinSalesNavigatorPeople","summary":"Search Sales Navigator people","description":"Search Sales Navigator leads with keywords, focused structured filters, or a Sales Navigator people search URL.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"connectedAccountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Connected account to act as"},"keywords":{"type":"string","minLength":1,"maxLength":512},"firstName":{"description":"Matches the first name on the profile.","type":"string","minLength":1,"maxLength":512},"lastName":{"description":"Matches the last name on the profile.","type":"string","minLength":1,"maxLength":512},"locations":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","pattern":"^\\d+$"},"description":"Geography ids from the search parameters endpoint with type=REGION and service=sales_navigator."},"excludedLocations":{"description":"Geographies to leave out of the results.","minItems":1,"maxItems":20,"type":"array","items":{"type":"string","pattern":"^\\d+$"}},"industries":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","pattern":"^\\d+$"},"description":"Industry ids from the search parameters endpoint with type=SALES_INDUSTRY and service=sales_navigator."},"excludedIndustries":{"description":"Industries to leave out of the results.","minItems":1,"maxItems":20,"type":"array","items":{"type":"string","pattern":"^\\d+$"}},"companies":{"description":"Current-company ids from the search parameters endpoint with type=COMPANY and service=sales_navigator.","minItems":1,"maxItems":20,"type":"array","items":{"type":"string","pattern":"^\\d+$"}},"excludedCompanies":{"description":"Current companies to leave out of the results.","minItems":1,"maxItems":20,"type":"array","items":{"type":"string","pattern":"^\\d+$"}},"pastCompanies":{"description":"Past-company ids from the search parameters endpoint with type=COMPANY and service=sales_navigator.","minItems":1,"maxItems":20,"type":"array","items":{"type":"string","pattern":"^\\d+$"}},"excludedPastCompanies":{"description":"Past companies to leave out of the results.","minItems":1,"maxItems":20,"type":"array","items":{"type":"string","pattern":"^\\d+$"}},"companyLocations":{"description":"Where the company sits, rather than where the person does. Geography ids with type=REGION and service=sales_navigator.","minItems":1,"maxItems":20,"type":"array","items":{"type":"string","pattern":"^\\d+$"}},"excludedCompanyLocations":{"description":"Company geographies to leave out of the results.","minItems":1,"maxItems":20,"type":"array","items":{"type":"string","pattern":"^\\d+$"}},"companyHeadcounts":{"description":"Employee-count bands of the current company.","minItems":1,"maxItems":8,"type":"array","items":{"type":"string","enum":["1_to_10","11_to_50","51_to_200","201_to_500","501_to_1000","1001_to_5000","5001_to_10000","10001_plus"]}},"companyTypes":{"description":"How the current company is held.","minItems":1,"maxItems":8,"type":"array","items":{"type":"string","enum":["public_company","privately_held","non_profit","educational_institution","partnership","self_employed","self_owned","government_agency"]}},"schools":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","pattern":"^\\d+$"},"description":"School ids from the search parameters endpoint with type=SCHOOL and service=sales_navigator."},"excludedSchools":{"description":"Schools to leave out of the results.","minItems":1,"maxItems":20,"type":"array","items":{"type":"string","pattern":"^\\d+$"}},"functions":{"description":"The department someone works in. Function ids from the search parameters endpoint with type=DEPARTMENT and service=sales_navigator.","minItems":1,"maxItems":20,"type":"array","items":{"type":"string","pattern":"^\\d+$"}},"excludedFunctions":{"description":"Functions to leave out of the results.","minItems":1,"maxItems":20,"type":"array","items":{"type":"string","pattern":"^\\d+$"}},"jobTitles":{"description":"Current job-title ids from the search parameters endpoint with type=JOB_TITLE and service=sales_navigator.","minItems":1,"maxItems":20,"type":"array","items":{"type":"string","pattern":"^\\d+$"}},"excludedJobTitles":{"description":"Current job titles to leave out of the results.","minItems":1,"maxItems":20,"type":"array","items":{"type":"string","pattern":"^\\d+$"}},"pastJobTitles":{"description":"Job titles someone used to hold. Ids with type=JOB_TITLE and service=sales_navigator.","minItems":1,"maxItems":20,"type":"array","items":{"type":"string","pattern":"^\\d+$"}},"excludedPastJobTitles":{"description":"Past job titles to leave out of the results.","minItems":1,"maxItems":20,"type":"array","items":{"type":"string","pattern":"^\\d+$"}},"seniorities":{"description":"Seniority levels to search, from owner_partner down to in_training.","minItems":1,"maxItems":10,"type":"array","items":{"type":"string","enum":["owner_partner","cxo","vice_president","director","experienced_manager","entry_level_manager","strategic","senior","entry_level","in_training"]}},"excludedSeniorities":{"description":"Seniority levels to leave out of the results.","minItems":1,"maxItems":10,"type":"array","items":{"type":"string","enum":["owner_partner","cxo","vice_president","director","experienced_manager","entry_level_manager","strategic","senior","entry_level","in_training"]}},"yearsOfExperience":{"description":"Years of experience across someone's whole career.","minItems":1,"maxItems":5,"type":"array","items":{"type":"string","enum":["less_than_1","1_to_2","3_to_5","6_to_10","more_than_10"]}},"yearsAtCompany":{"description":"Years spent at the current company.","minItems":1,"maxItems":5,"type":"array","items":{"type":"string","enum":["less_than_1","1_to_2","3_to_5","6_to_10","more_than_10"]}},"yearsInPosition":{"description":"Years spent in the current position.","minItems":1,"maxItems":5,"type":"array","items":{"type":"string","enum":["less_than_1","1_to_2","3_to_5","6_to_10","more_than_10"]}},"groups":{"description":"LinkedIn groups the person belongs to. Group ids with type=GROUPS and service=sales_navigator.","minItems":1,"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":256}},"personas":{"description":"Personas saved on the Sales Navigator seat. Ids with type=PERSONA and service=sales_navigator.","minItems":1,"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":256}},"accountLists":{"description":"Only people at companies on these saved account lists. Ids with type=ACCOUNT_LISTS and service=sales_navigator.","minItems":1,"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":256}},"excludedAccountLists":{"description":"Saved account lists to leave out of the results.","minItems":1,"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":256}},"leadLists":{"description":"Only people on these saved lead lists. Ids with type=LEAD_LISTS and service=sales_navigator.","minItems":1,"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":256}},"excludedLeadLists":{"description":"Saved lead lists to leave out of the results.","minItems":1,"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":256}},"connectionsOf":{"description":"Member ids from the search parameters endpoint with type=CONNECTIONS. Returns people connected to them.","minItems":1,"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":256}},"profileLanguages":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","pattern":"^[a-z]{2}$"},"description":"ISO 639-1 profile-language codes from the search parameters endpoint with type=LANGUAGE."},"networkDistances":{"minItems":1,"maxItems":3,"type":"array","items":{"anyOf":[{"type":"number","const":1},{"type":"number","const":2},{"type":"number","const":3}]},"description":"LinkedIn connection degrees: first, second, or third-plus."},"spotlights":{"description":"Sales Navigator's Spotlights: recent signals about the person rather than facts about their profile.","minItems":1,"maxItems":7,"type":"array","items":{"type":"string","enum":["changed_jobs","posted_on_linkedin","mentioned_in_news","following_your_company","viewed_your_profile_recently","past_colleague","shared_experiences"]}},"interactedWith":{"description":"Only people this seat has messaged, or whose profile it opened.","minItems":1,"maxItems":2,"type":"array","items":{"type":"string","enum":["messaged","viewed_profile"]}},"includeSaved":{"description":"Also return people already saved as leads, or at saved accounts.","minItems":1,"maxItems":2,"type":"array","items":{"type":"string","enum":["leads","accounts"]}},"searchUrl":{"type":"string","maxLength":4096,"format":"uri","description":"Use a lead search URL copied from Sales Navigator, such as https://www.linkedin.com/sales/search/people?query=.... The filters it carries replace the filter fields, which must then be left out. Standard LinkedIn URLs go to POST /api/v1/linkedin/people/search."},"cursor":{"type":"string","minLength":1,"maxLength":8192},"limit":{"type":"integer","minimum":1,"maximum":100}},"required":["connectedAccountId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Search hits and an optional cursor.","content":{"application/json":{"schema":{"type":"object","properties":{"hits":{"type":"array","items":{"type":"object","properties":{"publicIdentifier":{"anyOf":[{"type":"string"},{"type":"null"}]},"profileUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"fullName":{"anyOf":[{"type":"string"},{"type":"null"}]},"headline":{"anyOf":[{"type":"string"},{"type":"null"}]},"location":{"anyOf":[{"type":"string"},{"type":"null"}]},"companyName":{"anyOf":[{"type":"string"},{"type":"null"}]},"jobTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrlLarge":{"anyOf":[{"type":"string"},{"type":"null"}]},"degree":{"type":"string","enum":["self","first","second","third_plus","out_of_network","unknown"]},"invitationPending":{"type":"boolean"}},"required":["publicIdentifier","profileUrl","fullName","headline","location","companyName","jobTitle","imageUrl","imageUrlLarge","degree","invitationPending"],"additionalProperties":false}},"cursor":{"anyOf":[{"type":"string"},{"type":"null"}]},"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Id of this request, for support and troubleshooting"}},"required":["hits","cursor","requestId"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized: missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Invalid request payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/linkedin/messages":{"post":{"tags":["LinkedIn"],"operationId":"sendLinkedinMessage","summary":"Send a LinkedIn message","description":"Sends a direct message. Only first-degree connections can receive one, so check isConnected on the profile first and send an InMail otherwise. Open Profile (isOpenProfile) can receive InMail without a connection. Attach files with POST /api/v1/files first, then pass the returned url.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"connectedAccountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Connected account to act as"},"identity":{"type":"string","minLength":1,"description":"User id (ACoAAA…) or public identifier."},"text":{"type":"string","minLength":1,"maxLength":8000},"attachments":{"description":"Files from POST /api/v1/files. Pass the returned url, not a signed URL. Needle reads the private object and sends the bytes to LinkedIn.","maxItems":5,"type":"array","items":{"type":"object","properties":{"url":{"type":"string","maxLength":4096,"format":"uri","description":"Object URL returned by POST /api/v1/files. Not a signed URL and not passed to LinkedIn."},"filename":{"type":"string","minLength":1,"maxLength":255},"contentType":{"type":"string","minLength":1,"maxLength":127},"size":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["url"]}}},"required":["connectedAccountId","identity","text"]}}}},"responses":{"201":{"description":"Send result.","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"object","properties":{"messageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"conversationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"sentAt":{"type":"string","format":"date-time"}},"required":["messageId","conversationId","sentAt"],"additionalProperties":false},"remainingUsage":{"type":"object","properties":{"hour":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Remaining hourly allowance for this action. Null when this action has no hourly cap."},"day":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Remaining daily allowance for this action."},"week":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Remaining weekly allowance for this action. Null when this action has no weekly cap."}},"required":["hour","day","week"],"additionalProperties":false,"description":"Remaining allowance for this action on the connected account across hourly, daily, and weekly windows. Each action type has its own limits."},"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Id of this request, for support and troubleshooting"}},"required":["result","remainingUsage","requestId"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized: missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Invalid request payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/linkedin/conversations/{conversationId}/messages":{"get":{"tags":["LinkedIn"],"operationId":"listLinkedinConversationMessages","summary":"List messages in a conversation","description":"Returns the messages in one conversation. Take conversationId from the conversations listing.","parameters":[{"in":"path","name":"conversationId","schema":{"type":"string","minLength":1,"description":"conversationId from the conversations listing"},"required":true,"description":"conversationId from the conversations listing"},{"in":"query","name":"connectedAccountId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Connected account to act as"},"required":true,"description":"Connected account to act as"},{"in":"query","name":"limit","schema":{"description":"Page size. Defaults to 20.","type":"integer","minimum":1,"maximum":100},"description":"Page size. Defaults to 20."}],"responses":{"200":{"description":"Conversation messages.","content":{"application/json":{"schema":{"type":"object","properties":{"messages":{"type":"array","items":{"type":"object","properties":{"messageId":{"type":"string"},"conversationId":{"type":"string"},"direction":{"type":"string","enum":["outbound","inbound"]},"text":{"type":"string"},"sentAt":{"type":"string","format":"date-time"}},"required":["messageId","conversationId","direction","text","sentAt"],"additionalProperties":false}},"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Id of this request, for support and troubleshooting"}},"required":["messages","requestId"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized: missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Invalid request payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/linkedin/invitations":{"get":{"tags":["LinkedIn"],"operationId":"listLinkedinInvitations","summary":"List sent invitations","description":"Connection invitations sent from this account that are still pending. For incoming ones, use GET /api/v1/linkedin/invitations/received.","parameters":[{"in":"query","name":"cursor","schema":{"type":"string","minLength":1}},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100}},{"in":"query","name":"connectedAccountId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Connected account to act as"},"required":true,"description":"Connected account to act as"}],"responses":{"200":{"description":"A page of pending invitations. Pass nextCursor as cursor for the next page.","content":{"application/json":{"schema":{"type":"object","properties":{"invitations":{"type":"array","items":{"type":"object","properties":{"invitationId":{"type":"string"},"publicIdentifier":{"anyOf":[{"type":"string"},{"type":"null"}]},"sentAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["invitationId","publicIdentifier","sentAt"],"additionalProperties":false}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]},"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Id of this request, for support and troubleshooting"}},"required":["invitations","nextCursor","requestId"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized: missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Invalid request payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"post":{"tags":["LinkedIn"],"operationId":"sendLinkedinInvitation","summary":"Send a connection invitation","description":"Sends a connection invitation with an optional note of up to 300 characters. Fails if the recipient is already connected or has an invitation pending.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"connectedAccountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Connected account to act as"},"identity":{"type":"string","minLength":1,"description":"User id (ACoAAA…) or public identifier."},"note":{"type":"string","maxLength":300}},"required":["connectedAccountId","identity"]}}}},"responses":{"201":{"description":"Invitation result.","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"object","properties":{"invitationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"sentAt":{"type":"string","format":"date-time"}},"required":["invitationId","sentAt"],"additionalProperties":false},"remainingUsage":{"type":"object","properties":{"hour":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Remaining hourly allowance for this action. Null when this action has no hourly cap."},"day":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Remaining daily allowance for this action."},"week":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Remaining weekly allowance for this action. Null when this action has no weekly cap."}},"required":["hour","day","week"],"additionalProperties":false,"description":"Remaining allowance for this action on the connected account across hourly, daily, and weekly windows. Each action type has its own limits."},"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Id of this request, for support and troubleshooting"}},"required":["result","remainingUsage","requestId"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized: missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Invalid request payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/linkedin/invitations/{invitationId}":{"delete":{"tags":["LinkedIn"],"operationId":"withdrawLinkedinInvitation","summary":"Withdraw an invitation","description":"Withdraws a pending sent invitation, using an invitationId from GET /api/v1/linkedin/invitations.","parameters":[{"in":"path","name":"invitationId","schema":{"type":"string","minLength":1,"description":"invitationId from the sent invitations listing"},"required":true,"description":"invitationId from the sent invitations listing"},{"in":"query","name":"connectedAccountId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Connected account to act as"},"required":true,"description":"Connected account to act as"}],"responses":{"200":{"description":"Invitation withdrawn.","content":{"application/json":{"schema":{"type":"object","properties":{"withdrawn":{"type":"boolean","const":true},"remainingUsage":{"type":"object","properties":{"hour":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Remaining hourly allowance for this action. Null when this action has no hourly cap."},"day":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Remaining daily allowance for this action."},"week":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Remaining weekly allowance for this action. Null when this action has no weekly cap."}},"required":["hour","day","week"],"additionalProperties":false,"description":"Remaining allowance for this action on the connected account across hourly, daily, and weekly windows. Each action type has its own limits."},"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Id of this request, for support and troubleshooting"}},"required":["withdrawn","remainingUsage","requestId"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized: missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Invalid request payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/linkedin/relations":{"get":{"tags":["LinkedIn"],"operationId":"listLinkedinRelations","summary":"List first-degree connections","description":"First-degree connections of the connected account. These are the recipients a plain message can reach.","parameters":[{"in":"query","name":"connectedAccountId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Connected account to act as"},"required":true,"description":"Connected account to act as"},{"in":"query","name":"cursor","schema":{"type":"string","minLength":1,"maxLength":8192}}],"responses":{"200":{"description":"Relations and an optional cursor.","content":{"application/json":{"schema":{"type":"object","properties":{"relations":{"type":"array","items":{"type":"object","properties":{"publicIdentifier":{"anyOf":[{"type":"string"},{"type":"null"}]},"connectedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["publicIdentifier","connectedAt"],"additionalProperties":false}},"cursor":{"anyOf":[{"type":"string"},{"type":"null"}]},"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Id of this request, for support and troubleshooting"}},"required":["relations","cursor","requestId"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized: missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Invalid request payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/linkedin/companies/{identifier}":{"get":{"tags":["LinkedIn"],"operationId":"getLinkedinCompany","summary":"Get a LinkedIn company","description":"Returns a company by public identifier, numeric id, or company URL.","parameters":[{"in":"path","name":"identifier","schema":{"type":"string","minLength":1,"description":"Company public identifier (heravideo), numeric company id, or a LinkedIn company URL such as https://www.linkedin.com/company/heravideo."},"required":true,"description":"Company public identifier (heravideo), numeric company id, or a LinkedIn company URL such as https://www.linkedin.com/company/heravideo."},{"in":"query","name":"connectedAccountId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Connected account to act as"},"required":true,"description":"Connected account to act as"}],"responses":{"200":{"description":"LinkedIn company profile.","content":{"application/json":{"schema":{"type":"object","properties":{"company":{"type":"object","properties":{"id":{"type":"string"},"publicIdentifier":{"anyOf":[{"type":"string"},{"type":"null"}]},"profileUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"tagline":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"website":{"anyOf":[{"type":"string"},{"type":"null"}]},"industry":{"type":"array","items":{"type":"string"}},"employeeCount":{"anyOf":[{"type":"number"},{"type":"null"}]},"employeeCountRange":{"anyOf":[{"type":"object","properties":{"from":{"anyOf":[{"type":"number"},{"type":"null"}]},"to":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["from","to"],"additionalProperties":false},{"type":"null"}]},"followerCount":{"anyOf":[{"type":"number"},{"type":"null"}]},"logoUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"organizationType":{"anyOf":[{"type":"string"},{"type":"null"}]},"headquarters":{"anyOf":[{"type":"string"},{"type":"null"}]},"foundedOn":{"anyOf":[{"type":"string"},{"type":"null"}]},"isFollowing":{"type":"boolean"},"isEmployee":{"type":"boolean"}},"required":["id","publicIdentifier","profileUrl","name","tagline","description","website","industry","employeeCount","employeeCountRange","followerCount","logoUrl","organizationType","headquarters","foundedOn","isFollowing","isEmployee"],"additionalProperties":false},"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Id of this request, for support and troubleshooting"}},"required":["company","requestId"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized: missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Invalid request payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/linkedin/companies/{identifier}/jobs":{"get":{"tags":["LinkedIn"],"operationId":"listLinkedinCompanyJobs","summary":"List jobs posted by a company","description":"Jobs currently posted by a company. Use cursor for the next page.","parameters":[{"in":"path","name":"identifier","schema":{"type":"string","minLength":1,"description":"Company public identifier (heravideo), numeric company id, or a LinkedIn company URL such as https://www.linkedin.com/company/heravideo."},"required":true,"description":"Company public identifier (heravideo), numeric company id, or a LinkedIn company URL such as https://www.linkedin.com/company/heravideo."},{"in":"query","name":"connectedAccountId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Connected account to act as"},"required":true,"description":"Connected account to act as"},{"in":"query","name":"cursor","schema":{"type":"string","minLength":1,"maxLength":8192}},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"Jobs and an optional cursor.","content":{"application/json":{"schema":{"type":"object","properties":{"jobs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"location":{"anyOf":[{"type":"string"},{"type":"null"}]},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"postedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"promoted":{"type":"boolean"},"easyApply":{"type":"boolean"},"companyId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Numeric company id, accepted as identifier by /companies."},"companyName":{"anyOf":[{"type":"string"},{"type":"null"}]},"companyPublicIdentifier":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Company public identifier, accepted as identifier by /companies."}},"required":["id","title","location","url","postedAt","promoted","easyApply","companyId","companyName","companyPublicIdentifier"],"additionalProperties":false}},"cursor":{"anyOf":[{"type":"string"},{"type":"null"}]},"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Id of this request, for support and troubleshooting"}},"required":["jobs","cursor","requestId"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized: missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Invalid request payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/linkedin/jobs/search":{"post":{"tags":["LinkedIn"],"operationId":"searchLinkedinJobs","summary":"Search LinkedIn jobs","description":"Job search by keywords, companies, or filters; a jobs search URL replaces them all. location, industries, jobTitles and jobFunctions take ids from GET /api/v1/linkedin/search/parameters.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"connectedAccountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Connected account to act as"},"keywords":{"type":"string","minLength":1,"maxLength":512},"companies":{"description":"Companies to search within. Each non-numeric identifier costs one extra lookup call.","minItems":1,"maxItems":10,"type":"array","items":{"type":"string","minLength":1,"description":"Company public identifier (heravideo), numeric company id, or a LinkedIn company URL such as https://www.linkedin.com/company/heravideo."}},"location":{"description":"A single location id from GET /api/v1/linkedin/search/parameters?type=LOCATION. One location per search.","type":"string","pattern":"^\\d+$"},"industries":{"description":"Industry ids from GET /api/v1/linkedin/search/parameters?type=INDUSTRY.","minItems":1,"maxItems":20,"type":"array","items":{"type":"string","pattern":"^\\d+$"}},"jobTitles":{"description":"Job title ids from GET /api/v1/linkedin/search/parameters?type=JOB_TITLE.","minItems":1,"maxItems":20,"type":"array","items":{"type":"string","pattern":"^\\d+$"}},"jobFunctions":{"description":"Job function ids from GET /api/v1/linkedin/search/parameters?type=JOB_FUNCTION.","minItems":1,"maxItems":20,"type":"array","items":{"type":"string","pattern":"^[a-z]+$"}},"seniority":{"minItems":1,"type":"array","items":{"type":"string","enum":["executive","director","mid_senior","associate","entry","intern"]}},"jobType":{"minItems":1,"type":"array","items":{"type":"string","enum":["full_time","part_time","contract","temporary","volunteer","internship","other"]}},"workplace":{"minItems":1,"type":"array","items":{"type":"string","enum":["on_site","hybrid","remote"]}},"postedWithinDays":{"type":"integer","minimum":1,"maximum":365},"sortBy":{"description":"Defaults to relevance.","type":"string","enum":["relevance","date"]},"searchUrl":{"description":"A LinkedIn jobs search URL, which cannot be combined with the filter fields above. Use it for filters this endpoint does not expose, such as salary.","type":"string","maxLength":4096,"format":"uri"},"cursor":{"type":"string","minLength":1,"maxLength":8192},"limit":{"description":"Page size, capped at 50 for a classic job search. Use cursor for the next page.","type":"integer","minimum":1,"maximum":100}},"required":["connectedAccountId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Jobs and an optional cursor.","content":{"application/json":{"schema":{"type":"object","properties":{"jobs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"location":{"anyOf":[{"type":"string"},{"type":"null"}]},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"postedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"promoted":{"type":"boolean"},"easyApply":{"type":"boolean"},"companyId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Numeric company id, accepted as identifier by /companies."},"companyName":{"anyOf":[{"type":"string"},{"type":"null"}]},"companyPublicIdentifier":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Company public identifier, accepted as identifier by /companies."}},"required":["id","title","location","url","postedAt","promoted","easyApply","companyId","companyName","companyPublicIdentifier"],"additionalProperties":false}},"cursor":{"anyOf":[{"type":"string"},{"type":"null"}]},"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Id of this request, for support and troubleshooting"}},"required":["jobs","cursor","requestId"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized: missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Invalid request payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/linkedin/jobs/{jobId}":{"get":{"tags":["LinkedIn"],"operationId":"getLinkedinJob","summary":"Get a LinkedIn job","description":"Returns any public job by id or job URL, with the full description, applicant count, apply link and hiring team that job listings and search leave out. Salary, seniority, skills, screening questions and views are not returned for jobs posted by other companies.","parameters":[{"in":"path","name":"jobId","schema":{"type":"string","minLength":1,"description":"Numeric job id from a job listing or search, or a job URL such as https://www.linkedin.com/jobs/view/4447604185 (URL-encoded when sent in the path)."},"required":true,"description":"Numeric job id from a job listing or search, or a job URL such as https://www.linkedin.com/jobs/view/4447604185 (URL-encoded when sent in the path)."},{"in":"query","name":"connectedAccountId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Connected account to act as"},"required":true,"description":"Connected account to act as"},{"in":"query","name":"service","schema":{"description":"recruiter for a job posted through LinkedIn Recruiter, which needs a Recruiter seat on the connected account. Defaults to classic.","type":"string","enum":["classic","recruiter"]},"description":"recruiter for a job posted through LinkedIn Recruiter, which needs a Recruiter seat on the connected account. Defaults to classic."}],"responses":{"200":{"description":"LinkedIn job.","content":{"application/json":{"schema":{"type":"object","properties":{"job":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"state":{"type":"string","enum":["active","draft","review","closed","paused"]},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"location":{"type":"string"},"companyId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Numeric company id, accepted as identifier by /companies."},"companyName":{"anyOf":[{"type":"string"},{"type":"null"}]},"applicantCount":{"type":"number"},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"publishedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"closedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"applyUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"External application page, when the job links to one."},"hiringTeam":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"LinkedIn member id, accepted as identity."},"name":{"type":"string"},"publicIdentifier":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Accepted as identity by the profile and messaging routes."},"profileUrl":{"type":"string"},"canSendFreeInMail":{"type":"boolean"}},"required":["id","name","publicIdentifier","profileUrl","canSendFreeInMail"],"additionalProperties":false}},{"type":"null"}]},"salary":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Not returned for jobs posted by other companies."},"workplace":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Not returned for jobs posted by other companies."},"seniority":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Not returned for jobs posted by other companies."},"skills":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Not returned for jobs posted by other companies."},"functions":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Not returned for jobs posted by other companies."},"industries":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Not returned for jobs posted by other companies."},"screeningQuestions":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"question":{"type":"string"},"favorableAnswers":{"type":"array","items":{"type":"string"}}},"required":["question","favorableAnswers"],"additionalProperties":false}},{"type":"null"}],"description":"Not returned for jobs posted by other companies."},"viewCount":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Not returned for jobs posted by other companies."},"cost":{"type":"number","description":"0 for jobs posted by other companies."}},"required":["id","url","state","title","description","location","companyId","companyName","applicantCount","createdAt","publishedAt","closedAt","applyUrl","hiringTeam","salary","workplace","seniority","skills","functions","industries","screeningQuestions","viewCount","cost"],"additionalProperties":false},"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Id of this request, for support and troubleshooting"}},"required":["job","requestId"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized: missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Invalid request payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/linkedin/companies/search":{"post":{"tags":["LinkedIn"],"operationId":"searchLinkedinCompanies","summary":"Search LinkedIn companies","description":"Company search by keywords or a company search URL, one or the other. Hits carry the numeric id, which the company endpoints accept as identifier.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"connectedAccountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Connected account to act as"},"keywords":{"type":"string","minLength":1,"maxLength":512},"searchUrl":{"type":"string","maxLength":4096,"format":"uri","description":"A search URL copied from LinkedIn, searching for the same kind of entity this endpoint returns. Filters carried in the URL take precedence."},"cursor":{"type":"string","minLength":1,"maxLength":8192},"limit":{"description":"Page size, capped at 10 for a company keyword search. Use cursor for the next page.","type":"integer","minimum":1,"maximum":100}},"required":["connectedAccountId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Companies and an optional cursor.","content":{"application/json":{"schema":{"type":"object","properties":{"companies":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Numeric company id, accepted as identifier by /companies."},"publicIdentifier":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Usually null on a search hit. Use id instead."},"profileUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"summary":{"anyOf":[{"type":"string"},{"type":"null"}]},"industry":{"anyOf":[{"type":"string"},{"type":"null"}]},"location":{"anyOf":[{"type":"string"},{"type":"null"}]},"logoUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"followerCount":{"anyOf":[{"type":"number"},{"type":"null"}]},"jobOfferCount":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Usually null on a search hit. Use the company jobs endpoint for open roles."}},"required":["id","publicIdentifier","profileUrl","name","summary","industry","location","logoUrl","followerCount","jobOfferCount"],"additionalProperties":false}},"cursor":{"anyOf":[{"type":"string"},{"type":"null"}]},"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Id of this request, for support and troubleshooting"}},"required":["companies","cursor","requestId"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized: missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Invalid request payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/linkedin/posts/search":{"post":{"tags":["LinkedIn"],"operationId":"searchLinkedinPosts","summary":"Search LinkedIn posts","description":"Post search by keywords or a post search URL, one or the other. Each hit carries the postId used by the post, comment and reaction endpoints.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"connectedAccountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Connected account to act as"},"keywords":{"type":"string","minLength":1,"maxLength":512},"searchUrl":{"type":"string","maxLength":4096,"format":"uri","description":"A search URL copied from LinkedIn, searching for the same kind of entity this endpoint returns. Filters carried in the URL take precedence."},"cursor":{"type":"string","minLength":1,"maxLength":8192},"limit":{"description":"Page size, capped at 49 for a post keyword search. Use cursor for the next page.","type":"integer","minimum":1,"maximum":100}},"required":["connectedAccountId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Posts and an optional cursor.","content":{"application/json":{"schema":{"type":"object","properties":{"posts":{"type":"array","items":{"type":"object","properties":{"postId":{"type":"string","description":"Pass this id to the comment and reaction endpoints."},"text":{"type":"string"},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"postedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"reactionCount":{"anyOf":[{"type":"number"},{"type":"null"}]},"commentCount":{"anyOf":[{"type":"number"},{"type":"null"}]},"repostCount":{"anyOf":[{"type":"number"},{"type":"null"}]},"author":{"anyOf":[{"type":"object","properties":{"publicIdentifier":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"headline":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"isCompany":{"type":"boolean"}},"required":["publicIdentifier","name","headline","imageUrl","isCompany"],"additionalProperties":false},{"type":"null"}]}},"required":["postId","text","url","postedAt","reactionCount","commentCount","repostCount","author"],"additionalProperties":false}},"cursor":{"anyOf":[{"type":"string"},{"type":"null"}]},"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Id of this request, for support and troubleshooting"}},"required":["posts","cursor","requestId"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized: missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Invalid request payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/linkedin/posts":{"get":{"tags":["LinkedIn"],"operationId":"listLinkedinPosts","summary":"List posts by a person or company","description":"Posts authored by a person. A company identifier also works, but GET /api/v1/linkedin/companies/{identifier}/posts resolves it in one call instead of two.","parameters":[{"in":"query","name":"connectedAccountId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Connected account to act as"},"required":true,"description":"Connected account to act as"},{"in":"query","name":"identity","schema":{"type":"string","minLength":1,"description":"Author to read, as a user id or public identifier. For a company page, prefer GET /api/v1/linkedin/companies/{identifier}/posts."},"required":true,"description":"Author to read, as a user id or public identifier. For a company page, prefer GET /api/v1/linkedin/companies/{identifier}/posts."},{"in":"query","name":"cursor","schema":{"type":"string","minLength":1,"maxLength":8192}},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"Posts and an optional cursor.","content":{"application/json":{"schema":{"type":"object","properties":{"posts":{"type":"array","items":{"type":"object","properties":{"postId":{"type":"string","description":"Pass this id to the comment and reaction endpoints."},"text":{"type":"string"},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"postedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"reactionCount":{"anyOf":[{"type":"number"},{"type":"null"}]},"commentCount":{"anyOf":[{"type":"number"},{"type":"null"}]},"repostCount":{"anyOf":[{"type":"number"},{"type":"null"}]},"author":{"anyOf":[{"type":"object","properties":{"publicIdentifier":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"headline":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"isCompany":{"type":"boolean"}},"required":["publicIdentifier","name","headline","imageUrl","isCompany"],"additionalProperties":false},{"type":"null"}]}},"required":["postId","text","url","postedAt","reactionCount","commentCount","repostCount","author"],"additionalProperties":false}},"cursor":{"anyOf":[{"type":"string"},{"type":"null"}]},"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Id of this request, for support and troubleshooting"}},"required":["posts","cursor","requestId"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized: missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Invalid request payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/linkedin/posts/{postId}":{"get":{"tags":["LinkedIn"],"operationId":"getLinkedinPost","summary":"Get a LinkedIn post","description":"Returns one post by postId, as returned by a post listing or search. An id copied from a post URL often does not resolve.","parameters":[{"in":"path","name":"postId","schema":{"type":"string","minLength":1,"description":"Post id as returned by a post listing or search. An id copied from a post URL often does not resolve."},"required":true,"description":"Post id as returned by a post listing or search. An id copied from a post URL often does not resolve."},{"in":"query","name":"connectedAccountId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Connected account to act as"},"required":true,"description":"Connected account to act as"}],"responses":{"200":{"description":"LinkedIn post.","content":{"application/json":{"schema":{"type":"object","properties":{"post":{"type":"object","properties":{"postId":{"type":"string","description":"Pass this id to the comment and reaction endpoints."},"text":{"type":"string"},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"postedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"reactionCount":{"anyOf":[{"type":"number"},{"type":"null"}]},"commentCount":{"anyOf":[{"type":"number"},{"type":"null"}]},"repostCount":{"anyOf":[{"type":"number"},{"type":"null"}]},"author":{"anyOf":[{"type":"object","properties":{"publicIdentifier":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"headline":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"isCompany":{"type":"boolean"}},"required":["publicIdentifier","name","headline","imageUrl","isCompany"],"additionalProperties":false},{"type":"null"}]}},"required":["postId","text","url","postedAt","reactionCount","commentCount","repostCount","author"],"additionalProperties":false},"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Id of this request, for support and troubleshooting"}},"required":["post","requestId"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized: missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Invalid request payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/linkedin/posts/{postId}/comments":{"get":{"tags":["LinkedIn"],"operationId":"listLinkedinPostComments","summary":"List comments on a post","description":"Top-level comments on a post, or replies to one comment when commentId is given.","parameters":[{"in":"path","name":"postId","schema":{"type":"string","minLength":1,"description":"Post id as returned by a post listing or search. An id copied from a post URL often does not resolve."},"required":true,"description":"Post id as returned by a post listing or search. An id copied from a post URL often does not resolve."},{"in":"query","name":"connectedAccountId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Connected account to act as"},"required":true,"description":"Connected account to act as"},{"in":"query","name":"commentId","schema":{"description":"Read replies to this comment instead of top-level comments.","type":"string","minLength":1},"description":"Read replies to this comment instead of top-level comments."},{"in":"query","name":"sortBy","schema":{"type":"string","enum":["MOST_RECENT","MOST_RELEVANT"]}},{"in":"query","name":"cursor","schema":{"type":"string","minLength":1,"maxLength":8192}},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"Comments and an optional cursor.","content":{"application/json":{"schema":{"type":"object","properties":{"comments":{"type":"array","items":{"type":"object","properties":{"commentId":{"type":"string"},"postId":{"anyOf":[{"type":"string"},{"type":"null"}]},"text":{"type":"string"},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"reactionCount":{"anyOf":[{"type":"number"},{"type":"null"}]},"replyCount":{"anyOf":[{"type":"number"},{"type":"null"}]},"authorName":{"anyOf":[{"type":"string"},{"type":"null"}]},"authorIdentity":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Pass as identity to the profile, message and invite endpoints."},"authorHeadline":{"anyOf":[{"type":"string"},{"type":"null"}]},"authorProfileUrl":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["commentId","postId","text","createdAt","reactionCount","replyCount","authorName","authorIdentity","authorHeadline","authorProfileUrl"],"additionalProperties":false}},"cursor":{"anyOf":[{"type":"string"},{"type":"null"}]},"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Id of this request, for support and troubleshooting"}},"required":["comments","cursor","requestId"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized: missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Invalid request payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"post":{"tags":["LinkedIn"],"operationId":"commentOnLinkedinPost","summary":"Comment on a post","description":"Adds a comment to a post, or a reply when commentId is given. Comments are public and cannot be edited or removed through this API.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"connectedAccountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Connected account to act as"},"text":{"type":"string","minLength":1,"maxLength":1250},"commentId":{"description":"Reply to this comment instead of commenting on the post.","type":"string","minLength":1}},"required":["connectedAccountId","text"]}}}},"responses":{"201":{"description":"Comment result.","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"object","properties":{"commentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"}},"required":["commentId","createdAt"],"additionalProperties":false},"remainingUsage":{"type":"object","properties":{"hour":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Remaining hourly allowance for this action. Null when this action has no hourly cap."},"day":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Remaining daily allowance for this action."},"week":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Remaining weekly allowance for this action. Null when this action has no weekly cap."}},"required":["hour","day","week"],"additionalProperties":false,"description":"Remaining allowance for this action on the connected account across hourly, daily, and weekly windows. Each action type has its own limits."},"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Id of this request, for support and troubleshooting"}},"required":["result","remainingUsage","requestId"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized: missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Invalid request payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/linkedin/posts/{postId}/reactions":{"get":{"tags":["LinkedIn"],"operationId":"listLinkedinPostReactions","summary":"List reactions on a post","description":"People who reacted to a post, or to a comment when commentId is given. Each entry carries the reaction they left. identity is a public identifier or member id for a person, and a company id when isCompany is true.","parameters":[{"in":"path","name":"postId","schema":{"type":"string","minLength":1,"description":"Post id as returned by a post listing or search. An id copied from a post URL often does not resolve."},"required":true,"description":"Post id as returned by a post listing or search. An id copied from a post URL often does not resolve."},{"in":"query","name":"connectedAccountId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Connected account to act as"},"required":true,"description":"Connected account to act as"},{"in":"query","name":"commentId","schema":{"description":"Read reactions on this comment instead of the ones on the post.","type":"string","minLength":1},"description":"Read reactions on this comment instead of the ones on the post."},{"in":"query","name":"cursor","schema":{"type":"string","minLength":1,"maxLength":8192}},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"Reactions and an optional cursor.","content":{"application/json":{"schema":{"type":"object","properties":{"reactions":{"type":"array","items":{"type":"object","properties":{"reaction":{"anyOf":[{"type":"string","enum":["like","celebrate","support","love","insightful","funny"]},{"type":"null"}],"description":"The reaction this person left. Null when LinkedIn returns a reaction we do not recognise."},"identity":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Public identifier or member id for a person. A company id when isCompany is true."},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"headline":{"anyOf":[{"type":"string"},{"type":"null"}]},"profileUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"isCompany":{"type":"boolean"}},"required":["reaction","identity","name","headline","profileUrl","imageUrl","isCompany"],"additionalProperties":false}},"cursor":{"anyOf":[{"type":"string"},{"type":"null"}]},"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Id of this request, for support and troubleshooting"}},"required":["reactions","cursor","requestId"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized: missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Invalid request payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"post":{"tags":["LinkedIn"],"operationId":"reactToLinkedinPost","summary":"React to a post","description":"Adds a reaction to a post, or to a comment when commentId is given. Defaults to like.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"connectedAccountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Connected account to act as"},"reaction":{"description":"Defaults to like.","type":"string","enum":["like","celebrate","support","love","insightful","funny"]},"commentId":{"description":"React to this comment instead of the post.","type":"string","minLength":1}},"required":["connectedAccountId"]}}}},"responses":{"201":{"description":"Reaction result.","content":{"application/json":{"schema":{"type":"object","properties":{"remainingUsage":{"type":"object","properties":{"hour":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Remaining hourly allowance for this action. Null when this action has no hourly cap."},"day":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Remaining daily allowance for this action."},"week":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Remaining weekly allowance for this action. Null when this action has no weekly cap."}},"required":["hour","day","week"],"additionalProperties":false,"description":"Remaining allowance for this action on the connected account across hourly, daily, and weekly windows. Each action type has its own limits."},"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Id of this request, for support and troubleshooting"}},"required":["remainingUsage","requestId"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized: missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Invalid request payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/linkedin/inmails":{"post":{"tags":["LinkedIn"],"operationId":"sendLinkedinInMail","summary":"Send a Sales Navigator InMail","description":"Sends an InMail. Does not require a connection. Reaches in-network recipients and out-of-network Open Profiles. Costs one credit unless LinkedIn treats the recipient as Open Profile, and requires a Sales Navigator seat on the connected account. Attach files with POST /api/v1/files first, then pass the returned url.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"connectedAccountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Connected account to act as"},"identity":{"type":"string","minLength":1,"description":"User id (ACoAAA…) or public identifier."},"subject":{"type":"string","minLength":1,"maxLength":200,"description":"InMail subject line shown to the recipient."},"text":{"type":"string","minLength":1,"maxLength":1900},"attachments":{"description":"Files from POST /api/v1/files. Pass the returned url, not a signed URL. Needle reads the private object and sends the bytes to LinkedIn.","maxItems":5,"type":"array","items":{"type":"object","properties":{"url":{"type":"string","maxLength":4096,"format":"uri","description":"Object URL returned by POST /api/v1/files. Not a signed URL and not passed to LinkedIn."},"filename":{"type":"string","minLength":1,"maxLength":255},"contentType":{"type":"string","minLength":1,"maxLength":127},"size":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["url"]}}},"required":["connectedAccountId","identity","subject","text"]}}}},"responses":{"201":{"description":"Send result.","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"object","properties":{"messageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"conversationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"sentAt":{"type":"string","format":"date-time"}},"required":["messageId","conversationId","sentAt"],"additionalProperties":false},"remainingUsage":{"type":"object","properties":{"hour":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Remaining hourly allowance for this action. Null when this action has no hourly cap."},"day":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Remaining daily allowance for this action."},"week":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Remaining weekly allowance for this action. Null when this action has no weekly cap."}},"required":["hour","day","week"],"additionalProperties":false,"description":"Remaining allowance for this action on the connected account across hourly, daily, and weekly windows. Each action type has its own limits."},"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Id of this request, for support and troubleshooting"}},"required":["result","remainingUsage","requestId"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized: missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Invalid request payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/linkedin/inmails/balance":{"get":{"tags":["LinkedIn"],"operationId":"getLinkedinInMailBalance","summary":"Get remaining InMail credits","description":"InMail credits left on the connected account. Credits come with a Sales Navigator seat and renew monthly, separately from the daily action allowances.","parameters":[{"in":"query","name":"connectedAccountId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Connected account to act as"},"required":true,"description":"Connected account to act as"}],"responses":{"200":{"description":"Remaining InMail credits.","content":{"application/json":{"schema":{"type":"object","properties":{"balance":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Sales Navigator InMail credits left on this account."},"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Id of this request, for support and troubleshooting"}},"required":["balance","requestId"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized: missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Invalid request payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/linkedin/conversations":{"get":{"tags":["LinkedIn"],"operationId":"listLinkedinConversations","summary":"List conversations","description":"Conversations in the account inbox. Use a conversationId from here to read its messages.","parameters":[{"in":"query","name":"connectedAccountId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Connected account to act as"},"required":true,"description":"Connected account to act as"},{"in":"query","name":"cursor","schema":{"type":"string","minLength":1,"maxLength":8192}},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"Conversations and an optional cursor.","content":{"application/json":{"schema":{"type":"object","properties":{"conversations":{"type":"array","items":{"type":"object","properties":{"conversationId":{"type":"string"},"attendeeIdentity":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Pass as identity to the profile, message and invite endpoints."},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"unreadCount":{"anyOf":[{"type":"number"},{"type":"null"}]},"lastMessageAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["conversationId","attendeeIdentity","name","unreadCount","lastMessageAt"],"additionalProperties":false}},"cursor":{"anyOf":[{"type":"string"},{"type":"null"}]},"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Id of this request, for support and troubleshooting"}},"required":["conversations","cursor","requestId"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized: missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Invalid request payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/linkedin/followers":{"get":{"tags":["LinkedIn"],"operationId":"listLinkedinFollowers","summary":"List followers","description":"Followers of the connected account, or of the person or company given in identity. A company page is readable only by its admins.","parameters":[{"in":"query","name":"connectedAccountId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Connected account to act as"},"required":true,"description":"Connected account to act as"},{"in":"query","name":"identity","schema":{"description":"Whose followers to read: a person (user id or public identifier) or a company (public identifier, numeric id, or company URL). Omit for the connected account; a company page is readable only by its admins.","type":"string","minLength":1},"description":"Whose followers to read: a person (user id or public identifier) or a company (public identifier, numeric id, or company URL). Omit for the connected account; a company page is readable only by its admins."},{"in":"query","name":"cursor","schema":{"type":"string","minLength":1,"maxLength":8192}},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"Followers and an optional cursor.","content":{"application/json":{"schema":{"type":"object","properties":{"users":{"type":"array","items":{"type":"object","properties":{"identity":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Pass as identity to the profile, message and invite endpoints."},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"headline":{"anyOf":[{"type":"string"},{"type":"null"}]},"profileUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["identity","name","headline","profileUrl","imageUrl"],"additionalProperties":false}},"cursor":{"anyOf":[{"type":"string"},{"type":"null"}]},"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Id of this request, for support and troubleshooting"}},"required":["users","cursor","requestId"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized: missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Invalid request payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/linkedin/following":{"get":{"tags":["LinkedIn"],"operationId":"listLinkedinFollowing","summary":"List followed accounts","description":"Accounts the connected account follows. Not supported yet — requests return an error.","parameters":[{"in":"query","name":"connectedAccountId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Connected account to act as"},"required":true,"description":"Connected account to act as"},{"in":"query","name":"cursor","schema":{"type":"string","minLength":1,"maxLength":8192}},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"Followed accounts and an optional cursor.","content":{"application/json":{"schema":{"type":"object","properties":{"users":{"type":"array","items":{"type":"object","properties":{"identity":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Pass as identity to the profile, message and invite endpoints."},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"headline":{"anyOf":[{"type":"string"},{"type":"null"}]},"profileUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["identity","name","headline","profileUrl","imageUrl"],"additionalProperties":false}},"cursor":{"anyOf":[{"type":"string"},{"type":"null"}]},"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Id of this request, for support and troubleshooting"}},"required":["users","cursor","requestId"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized: missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Invalid request payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/linkedin/invitations/received":{"get":{"tags":["LinkedIn"],"operationId":"listLinkedinReceivedInvitations","summary":"List received invitations","description":"Connection invitations received by this account that are still pending. Accept or decline them with POST /api/v1/linkedin/invitations/received/{invitationId}.","parameters":[{"in":"query","name":"cursor","schema":{"type":"string","minLength":1}},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100}},{"in":"query","name":"connectedAccountId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Connected account to act as"},"required":true,"description":"Connected account to act as"}],"responses":{"200":{"description":"A page of received invitations. Pass nextCursor as cursor for the next page.","content":{"application/json":{"schema":{"type":"object","properties":{"invitations":{"type":"array","items":{"type":"object","properties":{"invitationId":{"type":"string"},"publicIdentifier":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"headline":{"anyOf":[{"type":"string"},{"type":"null"}]},"message":{"anyOf":[{"type":"string"},{"type":"null"}]},"receivedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["invitationId","publicIdentifier","name","headline","message","receivedAt"],"additionalProperties":false}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]},"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Id of this request, for support and troubleshooting"}},"required":["invitations","nextCursor","requestId"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized: missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Invalid request payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/linkedin/invitations/received/{invitationId}":{"post":{"tags":["LinkedIn"],"operationId":"respondToLinkedinInvitation","summary":"Accept or decline a received invitation","description":"Accepts or declines a pending received invitation. Neither action can be reversed through this API.","parameters":[{"in":"path","name":"invitationId","schema":{"type":"string","minLength":1,"description":"invitationId from the received invitations listing"},"required":true,"description":"invitationId from the received invitations listing"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"connectedAccountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Connected account to act as"},"action":{"type":"string","enum":["accept","decline"]}},"required":["connectedAccountId","action"]}}}},"responses":{"200":{"description":"The action that was applied.","content":{"application/json":{"schema":{"type":"object","properties":{"action":{"type":"string","enum":["accept","decline"]},"remainingUsage":{"type":"object","properties":{"hour":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Remaining hourly allowance for this action. Null when this action has no hourly cap."},"day":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Remaining daily allowance for this action."},"week":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Remaining weekly allowance for this action. Null when this action has no weekly cap."}},"required":["hour","day","week"],"additionalProperties":false,"description":"Remaining allowance for this action on the connected account across hourly, daily, and weekly windows. Each action type has its own limits."},"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Id of this request, for support and troubleshooting"}},"required":["action","remainingUsage","requestId"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized: missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Invalid request payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/linkedin/search/parameters":{"get":{"tags":["LinkedIn"],"operationId":"listLinkedinSearchParameters","summary":"List LinkedIn search parameters","description":"Resolves filter ids (location, industry, job title, company, …) from keywords. Pass the returned id to search filters that take an id instead of text.","parameters":[{"in":"query","name":"connectedAccountId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Connected account to act as"},"required":true,"description":"Connected account to act as"},{"in":"query","name":"type","schema":{"type":"string","enum":["LOCATION","INDUSTRY","COMPANY","SCHOOL","SERVICE","JOB_TITLE","JOB_FUNCTION","CONNECTIONS","PEOPLE","LANGUAGE","REGION","SALES_INDUSTRY","DEPARTMENT","GROUPS","PERSONA","ACCOUNT_LISTS","LEAD_LISTS"],"description":"Kind of filter value to resolve, and it has to be one the chosen service has. Standard LinkedIn takes LOCATION, INDUSTRY, COMPANY, SCHOOL, SERVICE, JOB_TITLE, JOB_FUNCTION, CONNECTIONS, PEOPLE, LANGUAGE. Sales Navigator takes REGION, SALES_INDUSTRY, COMPANY, SCHOOL, JOB_TITLE, DEPARTMENT, GROUPS, PERSONA, ACCOUNT_LISTS, LEAD_LISTS, CONNECTIONS, LANGUAGE. LANGUAGE returns ISO 639-1 codes rather than LinkedIn ids."},"required":true,"description":"Kind of filter value to resolve, and it has to be one the chosen service has. Standard LinkedIn takes LOCATION, INDUSTRY, COMPANY, SCHOOL, SERVICE, JOB_TITLE, JOB_FUNCTION, CONNECTIONS, PEOPLE, LANGUAGE. Sales Navigator takes REGION, SALES_INDUSTRY, COMPANY, SCHOOL, JOB_TITLE, DEPARTMENT, GROUPS, PERSONA, ACCOUNT_LISTS, LEAD_LISTS, CONNECTIONS, LANGUAGE. LANGUAGE returns ISO 639-1 codes rather than LinkedIn ids."},{"in":"query","name":"keywords","schema":{"description":"Text to match, such as Berlin for LOCATION or REGION, engineer for JOB_TITLE, or Russian or ru for LANGUAGE. Saved groups, personas and lists are listed whole when this is left out.","type":"string","minLength":1,"maxLength":512},"description":"Text to match, such as Berlin for LOCATION or REGION, engineer for JOB_TITLE, or Russian or ru for LANGUAGE. Saved groups, personas and lists are listed whole when this is left out."},{"in":"query","name":"service","schema":{"description":"Which search to resolve against. Defaults to classic.","type":"string","enum":["classic","sales_navigator"]},"description":"Which search to resolve against. Defaults to classic."},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"Matching search parameters and an optional cursor.","content":{"application/json":{"schema":{"type":"object","properties":{"parameters":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"pictureUrl":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","title","pictureUrl"],"additionalProperties":false}},"cursor":{"anyOf":[{"type":"string"},{"type":"null"}]},"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Id of this request, for support and troubleshooting"}},"required":["parameters","cursor","requestId"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized: missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Invalid request payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/instagram/profiles/{identity}":{"get":{"tags":["Instagram"],"operationId":"getInstagramProfile","summary":"Get an Instagram profile","description":"Returns a profile by username, with the connected account’s relationship to it. Counts against the daily profile view allowance. Returns 429 when the account is at its limit.","parameters":[{"in":"path","name":"identity","schema":{"type":"string","minLength":1,"description":"Username without @."},"required":true,"description":"Username without @."},{"in":"query","name":"connectedAccountId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Connected account to act as"},"required":true,"description":"Connected account to act as"}],"responses":{"200":{"description":"Instagram profile.","content":{"application/json":{"schema":{"type":"object","properties":{"profile":{"type":"object","properties":{"username":{"anyOf":[{"type":"string"},{"type":"null"}]},"profileUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Split out of fullName, the one name a profile carries."},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"fullName":{"anyOf":[{"type":"string"},{"type":"null"}]},"biography":{"anyOf":[{"type":"string"},{"type":"null"}]},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Business and creator accounts only."},"location":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"City, on business accounts only."},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrlLarge":{"anyOf":[{"type":"string"},{"type":"null"}]},"backgroundImageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"followerCount":{"anyOf":[{"type":"number"},{"type":"null"}]},"followingCount":{"anyOf":[{"type":"number"},{"type":"null"}]},"postCount":{"anyOf":[{"type":"number"},{"type":"null"}]},"mutualFollowerCount":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Followers shared with the connected account."},"externalLinks":{"type":"array","items":{"type":"string"},"description":"Links in the biography."},"isPrivate":{"type":"boolean","description":"True when only a follower can read the posts and followers."},"isVerified":{"type":"boolean"},"followRequestPending":{"type":"boolean","description":"True while a follow request waits for an answer, which only a private account can do."},"isFollowing":{"type":"boolean","description":"True when the connected account follows."},"isFollowedBy":{"type":"boolean","description":"True when they follow the connected account."}},"required":["username","profileUrl","firstName","lastName","fullName","biography","category","location","imageUrl","imageUrlLarge","backgroundImageUrl","followerCount","followingCount","postCount","mutualFollowerCount","externalLinks","isPrivate","isVerified","followRequestPending","isFollowing","isFollowedBy"],"additionalProperties":false},"remainingUsage":{"type":"object","properties":{"hour":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Remaining hourly allowance for this action. Null when this action has no hourly cap."},"day":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Remaining daily allowance for this action."},"week":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Remaining weekly allowance for this action. Null when this action has no weekly cap."}},"required":["hour","day","week"],"additionalProperties":false,"description":"Remaining allowance for this action on the connected account across hourly, daily, and weekly windows. Each action type has its own limits."},"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Id of this request, for support and troubleshooting"}},"required":["profile","remainingUsage","requestId"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized: missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Invalid request payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/instagram/me":{"get":{"tags":["Instagram"],"operationId":"getInstagramAccountProfile","summary":"Get the connected account profile","description":"Returns the profile of the connected account itself, including its follower, following and post counts.","parameters":[{"in":"query","name":"connectedAccountId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Connected account to act as"},"required":true,"description":"Connected account to act as"}],"responses":{"200":{"description":"Connected account profile.","content":{"application/json":{"schema":{"type":"object","properties":{"profile":{"type":"object","properties":{"username":{"anyOf":[{"type":"string"},{"type":"null"}]},"profileUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Split out of fullName, the one name a profile carries."},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"fullName":{"anyOf":[{"type":"string"},{"type":"null"}]},"biography":{"anyOf":[{"type":"string"},{"type":"null"}]},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Business and creator accounts only."},"location":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"City, on business accounts only."},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrlLarge":{"anyOf":[{"type":"string"},{"type":"null"}]},"backgroundImageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"followerCount":{"anyOf":[{"type":"number"},{"type":"null"}]},"followingCount":{"anyOf":[{"type":"number"},{"type":"null"}]},"postCount":{"anyOf":[{"type":"number"},{"type":"null"}]},"externalLinks":{"type":"array","items":{"type":"string"},"description":"Links in the biography."},"isPrivate":{"type":"boolean","description":"True when only a follower can read the posts and followers."},"isVerified":{"type":"boolean"}},"required":["username","profileUrl","firstName","lastName","fullName","biography","category","location","imageUrl","imageUrlLarge","backgroundImageUrl","followerCount","followingCount","postCount","externalLinks","isPrivate","isVerified"],"additionalProperties":false},"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Id of this request, for support and troubleshooting"}},"required":["profile","requestId"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized: missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Invalid request payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/instagram/messages":{"post":{"tags":["Instagram"],"operationId":"sendInstagramMessage","summary":"Send an Instagram message","description":"Sends a direct message, opening the conversation when there is none. Attachments are read from the URLs given.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"connectedAccountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Connected account to act as"},"identity":{"type":"string","minLength":1,"description":"Username without @."},"text":{"type":"string","minLength":1,"maxLength":8000},"attachments":{"description":"Files to send alongside the text.","maxItems":10,"type":"array","items":{"type":"object","properties":{"url":{"type":"string","maxLength":4096,"format":"uri","description":"Public https URL to read the file from."},"filename":{"type":"string","minLength":1,"maxLength":255}},"required":["url"],"description":"A JPEG, PNG, WebP, MP4, MOV, M4A or MP3 file. Up to 16 MB, or 100 MB for video."}}},"required":["connectedAccountId","identity","text"]}}}},"responses":{"201":{"description":"Send result.","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"object","properties":{"messageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"conversationId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Pass as conversationId to read the thread back."},"sentAt":{"type":"string","format":"date-time"}},"required":["messageId","conversationId","sentAt"],"additionalProperties":false},"remainingUsage":{"type":"object","properties":{"hour":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Remaining hourly allowance for this action. Null when this action has no hourly cap."},"day":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Remaining daily allowance for this action."},"week":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Remaining weekly allowance for this action. Null when this action has no weekly cap."}},"required":["hour","day","week"],"additionalProperties":false,"description":"Remaining allowance for this action on the connected account across hourly, daily, and weekly windows. Each action type has its own limits."},"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Id of this request, for support and troubleshooting"}},"required":["result","remainingUsage","requestId"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized: missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Invalid request payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/instagram/messages/{messageId}/reactions":{"post":{"tags":["Instagram"],"operationId":"reactToInstagramMessage","summary":"React to an Instagram message","description":"Adds an emoji reaction to a message. Read the reactions already on it from the messages of the conversation.","parameters":[{"in":"path","name":"messageId","schema":{"type":"string","minLength":1,"description":"messageId from the messages of a conversation."},"required":true,"description":"messageId from the messages of a conversation."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"connectedAccountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Connected account to act as"},"reaction":{"type":"string","minLength":1,"maxLength":8,"description":"A single emoji, such as 👍."}},"required":["connectedAccountId","reaction"]}}}},"responses":{"201":{"description":"Reaction added.","content":{"application/json":{"schema":{"type":"object","properties":{"remainingUsage":{"type":"object","properties":{"hour":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Remaining hourly allowance for this action. Null when this action has no hourly cap."},"day":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Remaining daily allowance for this action."},"week":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Remaining weekly allowance for this action. Null when this action has no weekly cap."}},"required":["hour","day","week"],"additionalProperties":false,"description":"Remaining allowance for this action on the connected account across hourly, daily, and weekly windows. Each action type has its own limits."},"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Id of this request, for support and troubleshooting"}},"required":["remainingUsage","requestId"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized: missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Invalid request payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/instagram/conversations":{"get":{"tags":["Instagram"],"operationId":"listInstagramConversations","summary":"List Instagram conversations","description":"Returns the conversations of the connected account. Take conversationId from here to read the messages or the participants.","parameters":[{"in":"query","name":"connectedAccountId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Connected account to act as"},"required":true,"description":"Connected account to act as"},{"in":"query","name":"cursor","schema":{"type":"string","minLength":1,"maxLength":8192}},{"in":"query","name":"limit","schema":{"description":"Page size, up to 100. Defaults to 20. A page can hold fewer, so follow cursor until it comes back null.","type":"integer","minimum":1,"maximum":100},"description":"Page size, up to 100. Defaults to 20. A page can hold fewer, so follow cursor until it comes back null."}],"responses":{"200":{"description":"Conversations.","content":{"application/json":{"schema":{"type":"object","properties":{"conversations":{"type":"array","items":{"type":"object","properties":{"conversationId":{"type":"string"},"attendeeIdentity":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Account id of the other participant, taken as identity by the profile endpoint. Read the participants of the conversation for their username."},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"unreadCount":{"anyOf":[{"type":"number"},{"type":"null"}]},"lastMessageAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["conversationId","attendeeIdentity","name","unreadCount","lastMessageAt"],"additionalProperties":false}},"cursor":{"anyOf":[{"type":"string"},{"type":"null"}]},"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Id of this request, for support and troubleshooting"}},"required":["conversations","cursor","requestId"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized: missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Invalid request payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/instagram/conversations/{conversationId}/messages":{"get":{"tags":["Instagram"],"operationId":"listInstagramConversationMessages","summary":"List messages in a conversation","description":"Returns the messages of one conversation, most recent first, each with the reactions on it.","parameters":[{"in":"path","name":"conversationId","schema":{"type":"string","minLength":1,"description":"conversationId from the conversations listing"},"required":true,"description":"conversationId from the conversations listing"},{"in":"query","name":"connectedAccountId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Connected account to act as"},"required":true,"description":"Connected account to act as"},{"in":"query","name":"limit","schema":{"description":"Page size. Defaults to 20.","type":"integer","minimum":1,"maximum":100},"description":"Page size. Defaults to 20."}],"responses":{"200":{"description":"Conversation messages.","content":{"application/json":{"schema":{"type":"object","properties":{"messages":{"type":"array","items":{"type":"object","properties":{"messageId":{"type":"string","description":"Pass as messageId to react to the message."},"conversationId":{"type":"string"},"direction":{"type":"string","enum":["outbound","inbound"]},"text":{"type":"string"},"sentAt":{"type":"string","format":"date-time"},"reactions":{"type":"array","items":{"type":"object","properties":{"reaction":{"type":"string","description":"The emoji that was used."},"senderIdentity":{"anyOf":[{"type":"string"},{"type":"null"}]},"isOwn":{"type":"boolean","description":"True when the connected account left the reaction."}},"required":["reaction","senderIdentity","isOwn"],"additionalProperties":false}}},"required":["messageId","conversationId","direction","text","sentAt","reactions"],"additionalProperties":false}},"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Id of this request, for support and troubleshooting"}},"required":["messages","requestId"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized: missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Invalid request payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/instagram/conversations/{conversationId}/participants":{"get":{"tags":["Instagram"],"operationId":"listInstagramConversationParticipants","summary":"List the participants of a conversation","description":"Returns the accounts in a conversation. Take identity from here to read a participant’s profile, posts or followers.","parameters":[{"in":"path","name":"conversationId","schema":{"type":"string","minLength":1,"description":"conversationId from the conversations listing"},"required":true,"description":"conversationId from the conversations listing"},{"in":"query","name":"connectedAccountId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Connected account to act as"},"required":true,"description":"Connected account to act as"}],"responses":{"200":{"description":"Conversation participants.","content":{"application/json":{"schema":{"type":"object","properties":{"participants":{"type":"array","items":{"type":"object","properties":{"identity":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Username, taken as identity by the other endpoints."},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"profileUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"isSelf":{"type":"boolean","description":"True for the connected account itself."},"isFollowing":{"type":"boolean"},"isFollowedBy":{"type":"boolean"}},"required":["identity","name","profileUrl","imageUrl","isSelf","isFollowing","isFollowedBy"],"additionalProperties":false}},"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Id of this request, for support and troubleshooting"}},"required":["participants","requestId"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized: missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Invalid request payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/instagram/posts":{"get":{"tags":["Instagram"],"operationId":"listInstagramPosts","summary":"List the posts of an account","description":"Returns the posts of one account, most recent first. A username that does not exist comes back with no posts rather than an error.","parameters":[{"in":"query","name":"connectedAccountId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Connected account to act as"},"required":true,"description":"Connected account to act as"},{"in":"query","name":"identity","schema":{"type":"string","minLength":1,"description":"Whose posts to read, as a username without @."},"required":true,"description":"Whose posts to read, as a username without @."},{"in":"query","name":"cursor","schema":{"type":"string","minLength":1,"maxLength":8192}},{"in":"query","name":"limit","schema":{"description":"Page size, up to 100. Defaults to 20. A page can hold fewer, so follow cursor until it comes back null.","type":"integer","minimum":1,"maximum":100},"description":"Page size, up to 100. Defaults to 20. A page can hold fewer, so follow cursor until it comes back null."}],"responses":{"200":{"description":"Posts.","content":{"application/json":{"schema":{"type":"object","properties":{"posts":{"type":"array","items":{"type":"object","properties":{"postId":{"type":"string","description":"Pass as postId to comment on the post or read its likes."},"shortcode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The id in the post URL, as in instagram.com/p/{shortcode}."},"text":{"type":"string","description":"The caption, empty when the post carries none."},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"postedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"likeCount":{"anyOf":[{"type":"number"},{"type":"null"}]},"commentCount":{"anyOf":[{"type":"number"},{"type":"null"}]},"hasLiked":{"type":"boolean","description":"True when the connected account already liked the post."},"commentsDisabled":{"type":"boolean","description":"True when the post accepts no comments."},"mediaType":{"anyOf":[{"type":"string","enum":["image","video"]},{"type":"null"}]},"previewImageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"videoUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"locationName":{"anyOf":[{"type":"string"},{"type":"null"}]},"author":{"anyOf":[{"type":"object","properties":{"identity":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Username, taken as identity by the other endpoints."},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"isVerified":{"type":"boolean"},"isPrivate":{"type":"boolean"}},"required":["identity","imageUrl","isVerified","isPrivate"],"additionalProperties":false},{"type":"null"}]}},"required":["postId","shortcode","text","url","postedAt","likeCount","commentCount","hasLiked","commentsDisabled","mediaType","previewImageUrl","videoUrl","locationName","author"],"additionalProperties":false}},"cursor":{"anyOf":[{"type":"string"},{"type":"null"}]},"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Id of this request, for support and troubleshooting"}},"required":["posts","cursor","requestId"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized: missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Invalid request payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"post":{"tags":["Instagram"],"operationId":"createInstagramPost","summary":"Publish an Instagram post","description":"Publishes a feed post or a story from the connected account. At least one image or video is required.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"connectedAccountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Connected account to act as"},"text":{"type":"string","maxLength":2200,"description":"Caption for the post. Write @username to mention someone."},"media":{"minItems":1,"maxItems":10,"type":"array","items":{"type":"object","properties":{"url":{"type":"string","maxLength":4096,"format":"uri","description":"Public https URL to read the file from."},"filename":{"type":"string","minLength":1,"maxLength":255}},"required":["url"],"description":"A JPEG, PNG, WebP, MP4, MOV, M4A or MP3 file. Up to 16 MB, or 100 MB for video."},"description":"Images or videos to publish."},"postType":{"description":"Defaults to feed. A story is visible for 24 hours.","type":"string","enum":["feed","story"]},"location":{"description":"Name of a place to tag.","type":"string","minLength":1,"maxLength":200}},"required":["connectedAccountId","text","media"]}}}},"responses":{"201":{"description":"Published post.","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"object","properties":{"postId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"}},"required":["postId","createdAt"],"additionalProperties":false},"remainingUsage":{"type":"object","properties":{"hour":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Remaining hourly allowance for this action. Null when this action has no hourly cap."},"day":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Remaining daily allowance for this action."},"week":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Remaining weekly allowance for this action. Null when this action has no weekly cap."}},"required":["hour","day","week"],"additionalProperties":false,"description":"Remaining allowance for this action on the connected account across hourly, daily, and weekly windows. Each action type has its own limits."},"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Id of this request, for support and troubleshooting"}},"required":["result","remainingUsage","requestId"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized: missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Invalid request payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/instagram/posts/{postId}":{"get":{"tags":["Instagram"],"operationId":"getInstagramPost","summary":"Get an Instagram post","description":"Returns one post, by postId or by the short code from its URL.","parameters":[{"in":"path","name":"postId","schema":{"type":"string","minLength":1,"description":"postId from a posts listing, or the short code from the post URL."},"required":true,"description":"postId from a posts listing, or the short code from the post URL."},{"in":"query","name":"connectedAccountId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Connected account to act as"},"required":true,"description":"Connected account to act as"}],"responses":{"200":{"description":"Post.","content":{"application/json":{"schema":{"type":"object","properties":{"post":{"type":"object","properties":{"postId":{"type":"string","description":"Pass as postId to comment on the post or read its likes."},"shortcode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The id in the post URL, as in instagram.com/p/{shortcode}."},"text":{"type":"string","description":"The caption, empty when the post carries none."},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"postedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"likeCount":{"anyOf":[{"type":"number"},{"type":"null"}]},"commentCount":{"anyOf":[{"type":"number"},{"type":"null"}]},"hasLiked":{"type":"boolean","description":"True when the connected account already liked the post."},"commentsDisabled":{"type":"boolean","description":"True when the post accepts no comments."},"mediaType":{"anyOf":[{"type":"string","enum":["image","video"]},{"type":"null"}]},"previewImageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"videoUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"locationName":{"anyOf":[{"type":"string"},{"type":"null"}]},"author":{"anyOf":[{"type":"object","properties":{"identity":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Username, taken as identity by the other endpoints."},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"isVerified":{"type":"boolean"},"isPrivate":{"type":"boolean"}},"required":["identity","imageUrl","isVerified","isPrivate"],"additionalProperties":false},{"type":"null"}]}},"required":["postId","shortcode","text","url","postedAt","likeCount","commentCount","hasLiked","commentsDisabled","mediaType","previewImageUrl","videoUrl","locationName","author"],"additionalProperties":false},"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Id of this request, for support and troubleshooting"}},"required":["post","requestId"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized: missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Invalid request payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/instagram/posts/{postId}/comments":{"get":{"tags":["Instagram"],"operationId":"listInstagramPostComments","summary":"List the comments on a post","description":"Returns the comments on a post, or the replies to one comment. Take commentId from a row to read that reply thread.","parameters":[{"in":"path","name":"postId","schema":{"type":"string","minLength":1,"description":"postId from a posts listing, or the short code from the post URL."},"required":true,"description":"postId from a posts listing, or the short code from the post URL."},{"in":"query","name":"connectedAccountId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Connected account to act as"},"required":true,"description":"Connected account to act as"},{"in":"query","name":"commentId","schema":{"description":"Read the replies to this comment instead of the top-level comments.","type":"string","minLength":1},"description":"Read the replies to this comment instead of the top-level comments."},{"in":"query","name":"cursor","schema":{"type":"string","minLength":1,"maxLength":8192}},{"in":"query","name":"limit","schema":{"description":"Page size, up to 100. Defaults to 20. A page can hold fewer, so follow cursor until it comes back null.","type":"integer","minimum":1,"maximum":100},"description":"Page size, up to 100. Defaults to 20. A page can hold fewer, so follow cursor until it comes back null."}],"responses":{"200":{"description":"Comments.","content":{"application/json":{"schema":{"type":"object","properties":{"comments":{"type":"array","items":{"type":"object","properties":{"commentId":{"type":"string","description":"Pass as commentId to read the replies, reply, or like it."},"text":{"type":"string"},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"authorIdentity":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Username, taken as identity by the other endpoints."},"authorIsVerified":{"type":"boolean"},"likeCount":{"anyOf":[{"type":"number"},{"type":"null"}]},"replyCount":{"anyOf":[{"type":"number"},{"type":"null"}]},"hasLiked":{"type":"boolean","description":"True when the connected account already liked the comment."},"parentCommentId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The comment this one replies to, null on a top-level comment."}},"required":["commentId","text","createdAt","authorIdentity","authorIsVerified","likeCount","replyCount","hasLiked","parentCommentId"],"additionalProperties":false}},"cursor":{"anyOf":[{"type":"string"},{"type":"null"}]},"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Id of this request, for support and troubleshooting"}},"required":["comments","cursor","requestId"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized: missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Invalid request payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"post":{"tags":["Instagram"],"operationId":"commentOnInstagramPost","summary":"Comment on a post","description":"Comments on a post, or replies to a comment. A comment cannot be edited or removed through this API.","parameters":[{"in":"path","name":"postId","schema":{"type":"string","minLength":1,"description":"postId from a posts listing, or the short code from the post URL."},"required":true,"description":"postId from a posts listing, or the short code from the post URL."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"connectedAccountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Connected account to act as"},"text":{"type":"string","minLength":1,"maxLength":2200,"description":"The comment. Write @username to mention someone."},"commentId":{"description":"Reply to this comment instead of commenting on the post.","type":"string","minLength":1}},"required":["connectedAccountId","text"]}}}},"responses":{"201":{"description":"Comment result.","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"object","properties":{"commentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"}},"required":["commentId","createdAt"],"additionalProperties":false},"remainingUsage":{"type":"object","properties":{"hour":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Remaining hourly allowance for this action. Null when this action has no hourly cap."},"day":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Remaining daily allowance for this action."},"week":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Remaining weekly allowance for this action. Null when this action has no weekly cap."}},"required":["hour","day","week"],"additionalProperties":false,"description":"Remaining allowance for this action on the connected account across hourly, daily, and weekly windows. Each action type has its own limits."},"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Id of this request, for support and troubleshooting"}},"required":["result","remainingUsage","requestId"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized: missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Invalid request payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/instagram/posts/{postId}/reactions":{"get":{"tags":["Instagram"],"operationId":"listInstagramPostReactions","summary":"List the likes on a post","description":"Returns the accounts that liked a post, or one of its comments.","parameters":[{"in":"path","name":"postId","schema":{"type":"string","minLength":1,"description":"postId from a posts listing, or the short code from the post URL."},"required":true,"description":"postId from a posts listing, or the short code from the post URL."},{"in":"query","name":"connectedAccountId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Connected account to act as"},"required":true,"description":"Connected account to act as"},{"in":"query","name":"commentId","schema":{"description":"Read the likes on this comment instead of the ones on the post.","type":"string","minLength":1},"description":"Read the likes on this comment instead of the ones on the post."},{"in":"query","name":"cursor","schema":{"type":"string","minLength":1,"maxLength":8192}},{"in":"query","name":"limit","schema":{"description":"Page size, up to 100. Defaults to 20. A page can hold fewer, so follow cursor until it comes back null.","type":"integer","minimum":1,"maximum":100},"description":"Page size, up to 100. Defaults to 20. A page can hold fewer, so follow cursor until it comes back null."}],"responses":{"200":{"description":"Accounts that liked the post.","content":{"application/json":{"schema":{"type":"object","properties":{"users":{"type":"array","items":{"type":"object","properties":{"identity":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Username, taken as identity by the other endpoints."},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"isPrivate":{"type":"boolean"},"isVerified":{"type":"boolean"}},"required":["identity","name","imageUrl","isPrivate","isVerified"],"additionalProperties":false}},"cursor":{"anyOf":[{"type":"string"},{"type":"null"}]},"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Id of this request, for support and troubleshooting"}},"required":["users","cursor","requestId"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized: missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Invalid request payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"post":{"tags":["Instagram"],"operationId":"likeInstagramPost","summary":"Like a post","description":"Likes a post, or one of its comments. A like is the only reaction a post takes.","parameters":[{"in":"path","name":"postId","schema":{"type":"string","minLength":1,"description":"postId from a posts listing, or the short code from the post URL."},"required":true,"description":"postId from a posts listing, or the short code from the post URL."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"connectedAccountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Connected account to act as"},"commentId":{"description":"Like this comment instead of the post.","type":"string","minLength":1}},"required":["connectedAccountId"]}}}},"responses":{"201":{"description":"Like added.","content":{"application/json":{"schema":{"type":"object","properties":{"remainingUsage":{"type":"object","properties":{"hour":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Remaining hourly allowance for this action. Null when this action has no hourly cap."},"day":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Remaining daily allowance for this action."},"week":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Remaining weekly allowance for this action. Null when this action has no weekly cap."}},"required":["hour","day","week"],"additionalProperties":false,"description":"Remaining allowance for this action on the connected account across hourly, daily, and weekly windows. Each action type has its own limits."},"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Id of this request, for support and troubleshooting"}},"required":["remainingUsage","requestId"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized: missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Invalid request payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/instagram/followers":{"get":{"tags":["Instagram"],"operationId":"listInstagramFollowers","summary":"List followers","description":"Returns the followers of an account, or of the connected account when identity is omitted.","parameters":[{"in":"query","name":"connectedAccountId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Connected account to act as"},"required":true,"description":"Connected account to act as"},{"in":"query","name":"identity","schema":{"description":"Whose followers to read. Omit for the connected account.","type":"string","minLength":1},"description":"Whose followers to read. Omit for the connected account."},{"in":"query","name":"cursor","schema":{"type":"string","minLength":1,"maxLength":8192}},{"in":"query","name":"limit","schema":{"description":"Page size, up to 25. A page can hold fewer, so follow cursor until it comes back null.","type":"integer","minimum":1,"maximum":25},"description":"Page size, up to 25. A page can hold fewer, so follow cursor until it comes back null."}],"responses":{"200":{"description":"Followers.","content":{"application/json":{"schema":{"type":"object","properties":{"users":{"type":"array","items":{"type":"object","properties":{"identity":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Username, taken as identity by the other endpoints."},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"isPrivate":{"type":"boolean"},"isVerified":{"type":"boolean"}},"required":["identity","name","imageUrl","isPrivate","isVerified"],"additionalProperties":false}},"cursor":{"anyOf":[{"type":"string"},{"type":"null"}]},"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Id of this request, for support and troubleshooting"}},"required":["users","cursor","requestId"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized: missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Invalid request payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/instagram/following":{"get":{"tags":["Instagram"],"operationId":"listInstagramFollowing","summary":"List followed accounts","description":"Returns the accounts one account follows, or the ones the connected account follows when identity is omitted.","parameters":[{"in":"query","name":"connectedAccountId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Connected account to act as"},"required":true,"description":"Connected account to act as"},{"in":"query","name":"identity","schema":{"description":"Whose followed accounts to read. Omit for the connected account.","type":"string","minLength":1},"description":"Whose followed accounts to read. Omit for the connected account."},{"in":"query","name":"cursor","schema":{"type":"string","minLength":1,"maxLength":8192}},{"in":"query","name":"limit","schema":{"description":"Page size, up to 25. A page can hold fewer, so follow cursor until it comes back null.","type":"integer","minimum":1,"maximum":25},"description":"Page size, up to 25. A page can hold fewer, so follow cursor until it comes back null."}],"responses":{"200":{"description":"Followed accounts.","content":{"application/json":{"schema":{"type":"object","properties":{"users":{"type":"array","items":{"type":"object","properties":{"identity":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Username, taken as identity by the other endpoints."},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"isPrivate":{"type":"boolean"},"isVerified":{"type":"boolean"}},"required":["identity","name","imageUrl","isPrivate","isVerified"],"additionalProperties":false}},"cursor":{"anyOf":[{"type":"string"},{"type":"null"}]},"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Id of this request, for support and troubleshooting"}},"required":["users","cursor","requestId"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized: missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Invalid request payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/instagram/follows":{"post":{"tags":["Instagram"],"operationId":"followInstagramUser","summary":"Follow an Instagram user","description":"Follows an account. A private account gets a follow request instead, reported as followRequestPending on its profile.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"connectedAccountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Connected account to act as"},"identity":{"type":"string","minLength":1,"description":"Username without @."}},"required":["connectedAccountId","identity"]}}}},"responses":{"201":{"description":"Follow result.","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"object","properties":{"invitationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"sentAt":{"type":"string","format":"date-time"}},"required":["invitationId","sentAt"],"additionalProperties":false},"remainingUsage":{"type":"object","properties":{"hour":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Remaining hourly allowance for this action. Null when this action has no hourly cap."},"day":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Remaining daily allowance for this action."},"week":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Remaining weekly allowance for this action. Null when this action has no weekly cap."}},"required":["hour","day","week"],"additionalProperties":false,"description":"Remaining allowance for this action on the connected account across hourly, daily, and weekly windows. Each action type has its own limits."},"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Id of this request, for support and troubleshooting"}},"required":["result","remainingUsage","requestId"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized: missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Invalid request payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/instagram/follows/{identity}":{"delete":{"tags":["Instagram"],"operationId":"unfollowInstagramUser","summary":"Unfollow an Instagram user","description":"Unfollows an account, or withdraws a follow request still waiting for an answer.","parameters":[{"in":"path","name":"identity","schema":{"type":"string","minLength":1,"description":"Username without @."},"required":true,"description":"Username without @."},{"in":"query","name":"connectedAccountId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Connected account to act as"},"required":true,"description":"Connected account to act as"}],"responses":{"200":{"description":"Unfollowed.","content":{"application/json":{"schema":{"type":"object","properties":{"unfollowed":{"type":"boolean","const":true},"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Id of this request, for support and troubleshooting"}},"required":["unfollowed","requestId"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized: missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Invalid request payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/places/search":{"post":{"tags":["Places"],"operationId":"searchPlaces","summary":"Search places","description":"Build a list of businesses and locations. Pass a query for text search, or a location (and optional type) for nearby search. Page text-search results with the returned cursor. The response includes remainingUsage.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"query":{"description":"Free-text query, e.g. \"dentists in Munich\". Required unless `location` is set.","type":"string","minLength":1,"maxLength":1024},"location":{"description":"Center point. Required unless `query` is set. Without a query this is a nearby search inside the radius.","type":"object","properties":{"latitude":{"type":"number","minimum":-90,"maximum":90},"longitude":{"type":"number","minimum":-180,"maximum":180}},"required":["latitude","longitude"]},"radiusMeters":{"description":"Radius when `location` is set. Defaults to 50 km. Nearby search stays inside this circle; text search is biased toward it.","type":"integer","minimum":1,"maximum":50000},"type":{"description":"A Google Places type such as `restaurant` or `dentist`.","type":"string","minLength":1,"maxLength":64},"language":{"description":"BCP-47 language code for names and addresses.","type":"string","minLength":2,"maxLength":16},"region":{"description":"CLDR region code that biases results, e.g. `DE`.","type":"string","minLength":2,"maxLength":2},"cursor":{"description":"Text-search pagination cursor. Nearby search does not page.","type":"string","minLength":1,"maxLength":8192},"limit":{"type":"integer","minimum":1,"maximum":20}}}}}},"responses":{"200":{"description":"Place hits, an optional cursor, and the remaining Places calls.","content":{"application/json":{"schema":{"type":"object","properties":{"hits":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"formattedAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"anyOf":[{"type":"string"},{"type":"null"}]},"region":{"anyOf":[{"type":"string"},{"type":"null"}]},"country":{"anyOf":[{"type":"string"},{"type":"null"}]},"postalCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"location":{"anyOf":[{"type":"object","properties":{"latitude":{"type":"number","minimum":-90,"maximum":90},"longitude":{"type":"number","minimum":-180,"maximum":180}},"required":["latitude","longitude"],"additionalProperties":false},{"type":"null"}]},"googleMapsUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"websiteUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"websiteDomain":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"types":{"type":"array","items":{"type":"string"}},"primaryType":{"anyOf":[{"type":"string"},{"type":"null"}]},"businessStatus":{"type":"string","enum":["operational","temporarily_closed","permanently_closed","unknown"]},"rating":{"anyOf":[{"type":"number"},{"type":"null"}]},"ratingCount":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"weekdayHours":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]}},"required":["id","name","formattedAddress","city","region","country","postalCode","location","googleMapsUrl","websiteUrl","websiteDomain","phone","types","primaryType","businessStatus","rating","ratingCount","weekdayHours"],"additionalProperties":false}},"cursor":{"anyOf":[{"type":"string"},{"type":"null"}]},"remainingUsage":{"type":"object","properties":{"hour":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Remaining hourly allowance. Null because Places has no hourly cap."},"day":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Calls left before the next cap. The fewer of the calls left today and the calls left this month."},"week":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Remaining weekly allowance. Null because Places has no weekly cap."}},"required":["hour","day","week"],"additionalProperties":false,"description":"Remaining Search Places calls for this workspace, in the same shape as a connected account remainingUsage."},"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Id of this request, for support and troubleshooting"}},"required":["hits","cursor","remainingUsage","requestId"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized: missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Invalid request payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/places/{placeId}":{"get":{"tags":["Places"],"operationId":"getPlace","summary":"Get a place","parameters":[{"in":"path","name":"placeId","schema":{"type":"string","minLength":1,"description":"Google Place id"},"required":true,"description":"Google Place id"}],"responses":{"200":{"description":"Place details and the remaining Places calls.","content":{"application/json":{"schema":{"type":"object","properties":{"place":{"type":"object","properties":{"id":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"formattedAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"anyOf":[{"type":"string"},{"type":"null"}]},"region":{"anyOf":[{"type":"string"},{"type":"null"}]},"country":{"anyOf":[{"type":"string"},{"type":"null"}]},"postalCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"location":{"anyOf":[{"type":"object","properties":{"latitude":{"type":"number","minimum":-90,"maximum":90},"longitude":{"type":"number","minimum":-180,"maximum":180}},"required":["latitude","longitude"],"additionalProperties":false},{"type":"null"}]},"googleMapsUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"websiteUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"websiteDomain":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"types":{"type":"array","items":{"type":"string"}},"primaryType":{"anyOf":[{"type":"string"},{"type":"null"}]},"businessStatus":{"type":"string","enum":["operational","temporarily_closed","permanently_closed","unknown"]},"rating":{"anyOf":[{"type":"number"},{"type":"null"}]},"ratingCount":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"weekdayHours":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]}},"required":["id","name","formattedAddress","city","region","country","postalCode","location","googleMapsUrl","websiteUrl","websiteDomain","phone","types","primaryType","businessStatus","rating","ratingCount","weekdayHours"],"additionalProperties":false},"remainingUsage":{"type":"object","properties":{"hour":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Remaining hourly allowance. Null because Places has no hourly cap."},"day":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Calls left before the next cap. The fewer of the calls left today and the calls left this month."},"week":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Remaining weekly allowance. Null because Places has no weekly cap."}},"required":["hour","day","week"],"additionalProperties":false,"description":"Remaining Search Places calls for this workspace, in the same shape as a connected account remainingUsage."},"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Id of this request, for support and troubleshooting"}},"required":["place","remainingUsage","requestId"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized: missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Invalid request payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/compose":{"post":{"tags":["Compose"],"operationId":"composePreview","summary":"Preview an AI-composed message","description":"identity accepts the same forms as leads: a LinkedIn public identifier, /in/ path, profile URL, or user id; or an Instagram username, @handle, or profile URL.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"channel":{"type":"string","enum":["linkedin","instagram"]},"connectedAccountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"identity":{"type":"string","minLength":1,"description":"LinkedIn public identifier, /in/ path, profile URL, or user id (ACoAAA…); or Instagram username, @handle, or profile URL. Stored as the identifier."},"prompt":{"type":"string","minLength":1},"context":{"default":["conversation"],"type":"array","items":{"type":"string","enum":["profile","posts","conversation","lead_properties"]}},"maxChars":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"leadProperties":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["channel","connectedAccountId","identity","prompt"]}}}},"responses":{"200":{"description":"Generated text and compose metadata.","content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string"},"meta":{"type":"object","properties":{"contextUsed":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","enum":["profile","posts","conversation","lead_properties"]},"cached":{"type":"boolean"},"itemCount":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["source","cached","itemCount"],"additionalProperties":false}},"generatedAt":{"type":"string","format":"date-time"}},"required":["contextUsed","generatedAt"],"additionalProperties":false},"channelCalls":{"type":"integer","minimum":0,"maximum":9007199254740991},"remainingBudget":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}},"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Id of this request, for support and troubleshooting"}},"required":["text","meta","channelCalls","remainingBudget","requestId"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized: missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Invalid request payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/files":{"get":{"tags":["Files"],"operationId":"listFiles","summary":"List files","description":"Lists private files in this workspace. Pass a returned url on a LinkedIn send or campaign step. Pass nextCursor as cursor for the next page.","parameters":[{"in":"query","name":"cursor","schema":{"type":"string","minLength":1}},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"A page of files. Pass nextCursor as cursor for the next page.","content":{"application/json":{"schema":{"type":"object","properties":{"files":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","maxLength":4096,"format":"uri","description":"Object URL to attach on a send or campaign step. Not a download link."},"filename":{"type":"string"},"contentType":{"type":"string"},"size":{"type":"integer","minimum":0,"maximum":9007199254740991},"createdAt":{"type":"string","format":"date-time"}},"required":["url","filename","contentType","size","createdAt"],"additionalProperties":false}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]},"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Id of this request, for support and troubleshooting"}},"required":["files","nextCursor","requestId"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized: missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Invalid request payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"post":{"tags":["Files"],"operationId":"createFileUpload","summary":"Create a file upload","description":"Stores a private object in Needle. Pass filename and contentType to mint a short-lived signed PUT URL, then PUT the bytes to uploadUrl. Or pass sourceUrl to copy a public https file into Needle. Then pass the returned url when sending a LinkedIn message or InMail, or on a campaign send step. downloadUrl is a preview link; do not pass it to LinkedIn.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"filename":{"type":"string","minLength":1,"maxLength":255},"contentType":{"type":"string","minLength":1,"maxLength":127},"sourceUrl":{"description":"Public https URL. Needle copies the file into a private object and returns the url to attach.","type":"string","maxLength":4096,"format":"uri"}}}}}},"responses":{"201":{"description":"Object identity, a preview URL, and a short-lived upload URL when you still need to PUT bytes.","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","description":"Private object identity. Store this on a send or a campaign step. Not a download link."},"uploadUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Short-lived signed PUT URL when you upload bytes yourself. Null when Needle already copied sourceUrl. Discard after use."},"filename":{"type":"string"},"downloadUrl":{"type":"string","description":"Preview URL on needle.app that redirects to a short-lived signed GET. Do not send this to LinkedIn."},"expiresAt":{"description":"When the preview URL stops redirecting. Each visit mints a fresh signature until then.","type":"string","format":"date-time"},"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Id of this request, for support and troubleshooting"}},"required":["url","uploadUrl","filename","downloadUrl","expiresAt","requestId"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized: missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Invalid request payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"delete":{"tags":["Files"],"operationId":"deleteFile","summary":"Delete a file","description":"Deletes a private file stored with POST /api/v1/files. Pass the url returned by that call or by GET /api/v1/files. Messages and campaign steps that still reference it will fail when sending.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","maxLength":4096,"format":"uri"}},"required":["url"]}}}},"responses":{"200":{"description":"File deleted.","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"boolean","const":true},"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Id of this request, for support and troubleshooting"}},"required":["deleted","requestId"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized: missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Invalid request payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/files/access":{"post":{"tags":["Files"],"operationId":"createFileAccessUrl","summary":"Create a file preview URL","description":"Mints a preview URL that redirects to a short-lived signed GET so the browser can open a file stored with POST /api/v1/files. The preview URL stays valid until expiresAt. Do not pass it to LinkedIn.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","maxLength":4096,"format":"uri"}},"required":["url"]}}}},"responses":{"200":{"description":"A preview URL and when it stops redirecting. Each visit gets a fresh signature.","content":{"application/json":{"schema":{"type":"object","properties":{"downloadUrl":{"type":"string","description":"Preview URL on needle.app that redirects to a short-lived signed GET. Do not send this to LinkedIn."},"expiresAt":{"description":"When the preview URL stops redirecting. Each visit mints a fresh signature until then.","type":"string","format":"date-time"},"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Id of this request, for support and troubleshooting"}},"required":["downloadUrl","expiresAt","requestId"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized: missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Invalid request payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/suppressions":{"get":{"tags":["Suppressions"],"operationId":"listSuppressions","summary":"List suppressions","parameters":[{"in":"query","name":"cursor","schema":{"type":"string","minLength":1}},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100}},{"in":"query","name":"reason","schema":{"type":"string","enum":["manual","unsubscribed","not_interested","existing_customer","open_opportunity","competitor","employee","invalid_recipient","complained","recently_contacted","unresponsive"]}}],"responses":{"200":{"description":"A page of suppression entries, newest first. Pass nextCursor as cursor for the next page.","content":{"application/json":{"schema":{"type":"object","properties":{"suppressions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"ownerOrgId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"scope":{"type":"string","enum":["lead","company"]},"leadId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"companyDomain":{"anyOf":[{"type":"string"},{"type":"null"}]},"reason":{"type":"string","enum":["manual","unsubscribed","not_interested","existing_customer","open_opportunity","competitor","employee","invalid_recipient","complained","recently_contacted","unresponsive"]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"expiresAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"createdBy":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"deletedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"deletedBy":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]}},"required":["id","ownerOrgId","scope","leadId","companyDomain","reason","note","expiresAt","createdBy","createdAt","deletedAt","deletedBy"],"additionalProperties":false}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]},"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Id of this request, for support and troubleshooting"}},"required":["suppressions","nextCursor","requestId"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized: missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Invalid request payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"post":{"tags":["Suppressions"],"operationId":"createSuppressions","summary":"Create suppressions","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"entries":{"minItems":1,"maxItems":1000,"type":"array","items":{"oneOf":[{"type":"object","properties":{"scope":{"type":"string","const":"lead"},"leadId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"reason":{"type":"string","enum":["manual","unsubscribed","not_interested","existing_customer","open_opportunity","competitor","employee","invalid_recipient","complained","recently_contacted","unresponsive"]},"note":{"type":"string","maxLength":500},"expiresAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["scope","leadId","reason"]},{"type":"object","properties":{"scope":{"type":"string","const":"company"},"companyDomain":{"type":"string","minLength":1,"maxLength":256},"reason":{"type":"string","enum":["manual","unsubscribed","not_interested","existing_customer","open_opportunity","competitor","employee","invalid_recipient","complained","recently_contacted","unresponsive"]},"note":{"type":"string","maxLength":500},"expiresAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["scope","companyDomain","reason"]}],"type":"object"}}},"required":["entries"]}}}},"responses":{"201":{"description":"Created entries.","content":{"application/json":{"schema":{"type":"object","properties":{"created":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"alreadyListed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Id of this request, for support and troubleshooting"}},"required":["created","alreadyListed","requestId"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized: missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Invalid request payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/suppressions/check":{"post":{"tags":["Suppressions"],"operationId":"checkSuppressions","summary":"Check people and companies against the suppression list","description":"identity accepts the same forms as leads: a LinkedIn public identifier, /in/ path, profile URL, or user id; or an Instagram username, @handle, or profile URL.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"identities":{"minItems":1,"maxItems":1000,"type":"array","items":{"type":"object","properties":{"channel":{"type":"string","enum":["linkedin","instagram"]},"identity":{"type":"string","minLength":1,"maxLength":512,"description":"LinkedIn public identifier, /in/ path, profile URL, or user id (ACoAAA…); or Instagram username, @handle, or profile URL. Stored as the identifier."},"companyDomain":{"type":"string","maxLength":256},"campaignId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["channel","identity"]}}},"required":["identities"]}}}},"responses":{"200":{"description":"Match results.","content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"type":"object","properties":{"channel":{"type":"string","enum":["linkedin","instagram"]},"identity":{"type":"string"},"decision":{"oneOf":[{"type":"object","properties":{"contactable":{"type":"boolean","const":true}},"required":["contactable"],"additionalProperties":false},{"type":"object","properties":{"contactable":{"type":"boolean","const":false},"reason":{"type":"string","enum":["manual","unsubscribed","not_interested","existing_customer","open_opportunity","competitor","employee","invalid_recipient","complained","recently_contacted","unresponsive"]},"source":{"type":"string","enum":["list","cooldown","unresponsive"]},"detail":{"type":"string"}},"required":["contactable","reason","source","detail"],"additionalProperties":false}],"type":"object"}},"required":["channel","identity","decision"],"additionalProperties":false}},"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Id of this request, for support and troubleshooting"}},"required":["results","requestId"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized: missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Invalid request payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/suppressions/{suppressionId}":{"delete":{"tags":["Suppressions"],"operationId":"deleteSuppression","summary":"Delete a suppression","parameters":[{"in":"path","name":"suppressionId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Suppression id"},"required":true,"description":"Suppression id"}],"responses":{"200":{"description":"Suppression deleted.","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"boolean","const":true},"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Id of this request, for support and troubleshooting"}},"required":["deleted","requestId"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized: missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Invalid request payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/webhooks":{"get":{"tags":["Webhooks"],"operationId":"listWebhooks","summary":"List webhooks","description":"The URLs this workspace receives its events at, oldest first, with their delivery status.","responses":{"200":{"description":"The webhooks.","content":{"application/json":{"schema":{"type":"object","properties":{"webhooks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"url":{"type":"string"},"headerNames":{"type":"array","items":{"type":"string"},"description":"Names of the extra headers sent with every request."},"lastAttemptAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"lastError":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Why the last failed delivery failed, for example 401. Null once a delivery succeeds."},"createdAt":{"type":"string","format":"date-time"},"createdBy":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The member who created the webhook. It receives the events they can see, and is deleted when they leave the workspace."}},"required":["id","url","headerNames","lastAttemptAt","lastError","createdAt","createdBy"],"additionalProperties":false}},"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Id of this request, for support and troubleshooting"}},"required":["webhooks","requestId"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized: missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Invalid request payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"post":{"tags":["Webhooks"],"operationId":"createWebhook","summary":"Create a webhook","description":"Every event is sent to each of the workspace's webhooks, signed with that webhook's secret. Up to 5 per workspace. See [Webhooks](https://needle.app/docs/webhooks) for the request body, headers, signature checks, and retries.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","maxLength":2048,"format":"uri","description":"An https URL that accepts POST requests."},"headers":{"description":"Extra headers sent with every request, for example an API key your endpoint checks: {\"Authorization\": \"Bearer ...\"}. Up to 5. Names are stored in lower case.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["url"]}}}},"responses":{"201":{"description":"Webhook created. The response carries the secret.","content":{"application/json":{"schema":{"type":"object","properties":{"webhook":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"url":{"type":"string"},"headerNames":{"type":"array","items":{"type":"string"},"description":"Names of the extra headers sent with every request."},"lastAttemptAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"lastError":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Why the last failed delivery failed, for example 401. Null once a delivery succeeds."},"createdAt":{"type":"string","format":"date-time"},"createdBy":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The member who created the webhook. It receives the events they can see, and is deleted when they leave the workspace."}},"required":["id","url","headerNames","lastAttemptAt","lastError","createdAt","createdBy"],"additionalProperties":false},"secret":{"type":"string","description":"The signing secret, whsec_…. Returned only here, when the webhook is created, and never again."},"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Id of this request, for support and troubleshooting"}},"required":["webhook","secret","requestId"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized: missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"The workspace already has 5 webhooks.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Invalid request payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/webhooks/{webhookId}":{"get":{"tags":["Webhooks"],"operationId":"getWebhook","summary":"Get a webhook","description":"One webhook, with its delivery status.","parameters":[{"in":"path","name":"webhookId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Webhook id"},"required":true,"description":"Webhook id"}],"responses":{"200":{"description":"The webhook.","content":{"application/json":{"schema":{"type":"object","properties":{"webhook":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"url":{"type":"string"},"headerNames":{"type":"array","items":{"type":"string"},"description":"Names of the extra headers sent with every request."},"lastAttemptAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"lastError":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Why the last failed delivery failed, for example 401. Null once a delivery succeeds."},"createdAt":{"type":"string","format":"date-time"},"createdBy":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The member who created the webhook. It receives the events they can see, and is deleted when they leave the workspace."}},"required":["id","url","headerNames","lastAttemptAt","lastError","createdAt","createdBy"],"additionalProperties":false},"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Id of this request, for support and troubleshooting"}},"required":["webhook","requestId"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized: missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Invalid request payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"patch":{"tags":["Webhooks"],"operationId":"updateWebhook","summary":"Update a webhook","description":"Change the URL, the headers, or both. Only the member who created the webhook can change it. The secret stays the same. Pending deliveries go out with the new URL and headers.","parameters":[{"in":"path","name":"webhookId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Webhook id"},"required":true,"description":"Webhook id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"description":"The new URL. A different URL removes all saved headers first.","type":"string","maxLength":2048,"format":"uri"},"headers":{"description":"Changes only the headers named here: a value sets or replaces that header, null removes it. Headers not named stay, except when url changes: then only the headers sent here are kept.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"null"}]}}}}}}},"responses":{"200":{"description":"Webhook updated.","content":{"application/json":{"schema":{"type":"object","properties":{"webhook":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"url":{"type":"string"},"headerNames":{"type":"array","items":{"type":"string"},"description":"Names of the extra headers sent with every request."},"lastAttemptAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"lastError":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Why the last failed delivery failed, for example 401. Null once a delivery succeeds."},"createdAt":{"type":"string","format":"date-time"},"createdBy":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The member who created the webhook. It receives the events they can see, and is deleted when they leave the workspace."}},"required":["id","url","headerNames","lastAttemptAt","lastError","createdAt","createdBy"],"additionalProperties":false},"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Id of this request, for support and troubleshooting"}},"required":["webhook","requestId"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized: missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Invalid request payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"delete":{"tags":["Webhooks"],"operationId":"deleteWebhook","summary":"Delete a webhook","description":"Stops sending events to it and drops its pending deliveries. The member who created it or a workspace admin can delete it.","parameters":[{"in":"path","name":"webhookId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Webhook id"},"required":true,"description":"Webhook id"}],"responses":{"200":{"description":"Webhook deleted.","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"boolean","const":true},"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Id of this request, for support and troubleshooting"}},"required":["deleted","requestId"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized: missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Invalid request payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}}},"components":{"schemas":{"MeUser":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"email":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"organization":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"domain":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"role":{"type":"string","enum":["member","admin","owner"]}},"required":["id","name","domain","imageUrl","role"],"additionalProperties":false}},"required":["id","email","name","imageUrl","organization"],"additionalProperties":false},"ApiError":{"type":"object","properties":{"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Id of this request, for support and troubleshooting"},"error":{"type":"string","description":"Human-readable error message"},"data":{"description":"Optional extra details"}},"required":["requestId","error"],"additionalProperties":false}},"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"sk-ndl-<id>.<secret>"}}}}