{"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"},{"name":"Onboarding"},{"name":"Assistant chats"},{"name":"Docs"}],"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_sales_navigator_message","linkedin_recruiter_message","linkedin_inmail","linkedin_recruiter_inmail","linkedin_profile_view","linkedin_search","linkedin_sales_navigator_search","linkedin_recruiter_search","linkedin_comment","linkedin_reaction","linkedin_post_view","linkedin_company_view","linkedin_job_view","linkedin_conversation_view","linkedin_network_view","linkedin_invitation_list","linkedin_invitation_response","linkedin_search_parameter","linkedin_inmail_balance","linkedin_own_profile","instagram_message","instagram_profile_view","instagram_follow","instagram_unfollow","instagram_comment","instagram_reaction","instagram_post","instagram_post_view","instagram_conversation_view","instagram_network_view","instagram_own_profile"]},"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"}]},"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","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/search":{"post":{"tags":["Connected accounts"],"operationId":"searchConnectedAccounts","summary":"Search connected accounts","description":"Find connected accounts by display name, handle, or username. Every word in query must appear. Accounts whose name or handle starts with the query come first. Pass nextCursor as cursor, with the same query, for the next page. Use the id with Get a connected account.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"query":{"type":"string","minLength":1,"maxLength":200,"description":"Text to match. Every word must appear in the record."},"cursor":{"type":"string","minLength":1},"limit":{"type":"integer","minimum":1,"maximum":100}},"required":["query"]}}}},"responses":{"200":{"description":"Matching connected accounts.","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_sales_navigator_message","linkedin_recruiter_message","linkedin_inmail","linkedin_recruiter_inmail","linkedin_profile_view","linkedin_search","linkedin_sales_navigator_search","linkedin_recruiter_search","linkedin_comment","linkedin_reaction","linkedin_post_view","linkedin_company_view","linkedin_job_view","linkedin_conversation_view","linkedin_network_view","linkedin_invitation_list","linkedin_invitation_response","linkedin_search_parameter","linkedin_inmail_balance","linkedin_own_profile","instagram_message","instagram_profile_view","instagram_follow","instagram_unfollow","instagram_comment","instagram_reaction","instagram_post","instagram_post_view","instagram_conversation_view","instagram_network_view","instagram_own_profile"]},"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"}]},"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","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_sales_navigator_message","linkedin_recruiter_message","linkedin_inmail","linkedin_recruiter_inmail","linkedin_profile_view","linkedin_search","linkedin_sales_navigator_search","linkedin_recruiter_search","linkedin_comment","linkedin_reaction","linkedin_post_view","linkedin_company_view","linkedin_job_view","linkedin_conversation_view","linkedin_network_view","linkedin_invitation_list","linkedin_invitation_response","linkedin_search_parameter","linkedin_inmail_balance","linkedin_own_profile","instagram_message","instagram_profile_view","instagram_follow","instagram_unfollow","instagram_comment","instagram_reaction","instagram_post","instagram_post_view","instagram_conversation_view","instagram_network_view","instagram_own_profile"]},"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"}]},"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","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_sales_navigator_message","linkedin_recruiter_message","linkedin_inmail","linkedin_recruiter_inmail","linkedin_profile_view","linkedin_search","linkedin_sales_navigator_search","linkedin_recruiter_search","linkedin_comment","linkedin_reaction","linkedin_post_view","linkedin_company_view","linkedin_job_view","linkedin_conversation_view","linkedin_network_view","linkedin_invitation_list","linkedin_invitation_response","linkedin_search_parameter","linkedin_inmail_balance","linkedin_own_profile","instagram_message","instagram_profile_view","instagram_follow","instagram_unfollow","instagram_comment","instagram_reaction","instagram_post","instagram_post_view","instagram_conversation_view","instagram_network_view","instagram_own_profile"]},"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"}]},"minWaitSeconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"The least time in seconds between two of this action on the account. Null when it has no minimum wait."}},"required":["action","hourUsed","hourLimit","dayUsed","dayLimit","weekUsed","weekLimit","minWaitSeconds"],"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_sales_navigator_message","linkedin_recruiter_message","linkedin_inmail","linkedin_recruiter_inmail","linkedin_profile_view","linkedin_search","linkedin_sales_navigator_search","linkedin_recruiter_search","linkedin_comment","linkedin_reaction","linkedin_post_view","linkedin_company_view","linkedin_job_view","linkedin_conversation_view","linkedin_network_view","linkedin_invitation_list","linkedin_invitation_response","linkedin_search_parameter","linkedin_inmail_balance","linkedin_own_profile","instagram_message","instagram_profile_view","instagram_follow","instagram_unfollow","instagram_comment","instagram_reaction","instagram_post","instagram_post_view","instagram_conversation_view","instagram_network_view","instagram_own_profile"]},"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_sales_navigator_message","linkedin_recruiter_message","linkedin_inmail","linkedin_recruiter_inmail","linkedin_profile_view","linkedin_search","linkedin_sales_navigator_search","linkedin_recruiter_search","linkedin_comment","linkedin_reaction","linkedin_post_view","linkedin_company_view","linkedin_job_view","linkedin_conversation_view","linkedin_network_view","linkedin_invitation_list","linkedin_invitation_response","linkedin_search_parameter","linkedin_inmail_balance","linkedin_own_profile","instagram_message","instagram_profile_view","instagram_follow","instagram_unfollow","instagram_comment","instagram_reaction","instagram_post","instagram_post_view","instagram_conversation_view","instagram_network_view","instagram_own_profile"]},"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"}]},"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","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. Deprecated: use `draft_created`, which is sent alongside it."},{"type":"string","const":"task_approved","description":"A held step was approved. Deprecated: use `draft_approved`, which is sent alongside it."},{"type":"string","const":"draft_created","description":"A drafted message is waiting for a member to review it, created through the API or held by a campaign step."},{"type":"string","const":"draft_approved","description":"A member approved a draft, possibly after editing it (`data.edited`). The message itself is the `linkedin_message_sent` (also for an InMail), `linkedin_invite_sent` or `instagram_message_sent` event that follows, with the same `data.draftId`. An approved InMail to someone out of network without Open Profile goes out as a connection request without a note instead."},{"type":"string","const":"draft_discarded","description":"A draft will not be sent; `data.discardReason` says why."},{"type":"string","const":"draft_failed","description":"An approved draft could not be sent; `data.message` says why."},{"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, after hitting a limit, or by Needle after 10 failures in a row on Instagram (`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, headers or event types changed, or it was turned on again; `data.changedFields` lists which (`url`, `headers`, `eventTypes`, `enabled`)."},{"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_message_edited","description":"A LinkedIn message was edited. `data.text` is the new text and `data.messageId` names the message; its sent or received event keeps the original text."},{"type":"string","const":"linkedin_message_deleted","description":"A LinkedIn message was deleted. `data.messageId` names the message and `data.text` is what it said."},{"type":"string","const":"linkedin_message_reaction_added","description":"A reaction was added to a LinkedIn message. `data.reaction` is the emoji, `data.reactedBy` says who reacted, `data.messageId` names the message and `data.text` is what it said. LinkedIn reports no removals."},{"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_follow_accepted","description":"An Instagram follow request was accepted."},{"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_message_edited","description":"An Instagram message was edited. `data.text` is the new text and `data.messageId` names the message; its sent or received event keeps the original text."},{"type":"string","const":"instagram_message_deleted","description":"An Instagram message was deleted. `data.messageId` names the message and `data.text` is what it said."},{"type":"string","const":"instagram_message_reaction_added","description":"A reaction was added to an Instagram message. `data.reaction` is the emoji, `data.reactedBy` says who reacted, `data.messageId` names the message and `data.text` is what it said. Instagram reports no removals."},{"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":{"description":"When it happened, as LinkedIn or Instagram reports it. They can report some events, such as accepted connection requests, hours later, so this can be well before createdAt.","type":"string","format":"date-time"},"createdAt":{"description":"When Needle recorded it.","type":"string","format":"date-time"},"channel":{"anyOf":[{"type":"string","enum":["linkedin","instagram"]},{"type":"null"}]},"messagingChannel":{"anyOf":[{"type":"string","enum":["linkedin","instagram","linkedin_sales_navigator","linkedin_recruiter"]},{"type":"null"}],"description":"The inbox the event happened in. The same as channel, except \"linkedin_sales_navigator\" for the Sales Navigator inbox (InMails, and messages sent or received there) and \"linkedin_recruiter\" for the Recruiter inbox. Each keeps its own conversations, apart from LinkedIn ones. Null when channel is 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"}]},"leadEmail":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The lead's email. Null when the event has no lead."},"leadIdentities":{"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 @. The same value Get a lead returns."},"profileUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The profile link, for example https://www.linkedin.com/in/jane-doe. When only the LinkedIn member id is known, the link uses it and opens the same profile. Null for channels without a profile page, such as email. To match a person, use channelUserId."},"channelUserId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The person's user id on the channel, such as LinkedIn's ACoAAA… id. Null when not known yet."}},"required":["channel","channelIdentity","profileUrl","channelUserId"],"additionalProperties":false},"description":"The lead's profiles, one per channel, to match the person in your own system. Empty when the event has no lead."},"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_sales_navigator_message","linkedin_recruiter_message","linkedin_inmail","linkedin_recruiter_inmail","linkedin_profile_view","linkedin_search","linkedin_sales_navigator_search","linkedin_recruiter_search","linkedin_comment","linkedin_reaction","linkedin_post_view","linkedin_company_view","linkedin_job_view","linkedin_conversation_view","linkedin_network_view","linkedin_invitation_list","linkedin_invitation_response","linkedin_search_parameter","linkedin_inmail_balance","linkedin_own_profile","instagram_message","instagram_profile_view","instagram_follow","instagram_unfollow","instagram_comment","instagram_reaction","instagram_post","instagram_post_view","instagram_conversation_view","instagram_network_view","instagram_own_profile"]},{"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","step_removed"]},{"type":"null"}]},"text":{"anyOf":[{"type":"string"},{"type":"null"}]},"edited":{"description":"On `draft_approved`, whether the reviewer changed the draft before approving it.","anyOf":[{"type":"boolean"},{"type":"null"}]},"originalText":{"description":"On `draft_approved`, the drafted text before the reviewer edited it. Only set when `edited` is `true`.","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, who replied or accepted, 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"}]},"channelUserId":{"description":"The person's user id on the channel, such as LinkedIn's ACoAAA… id. Set on every reply and accepted connection request, whether or not the person is a lead.","anyOf":[{"type":"string"},{"type":"null"}]}},"required":["identity"],"additionalProperties":false},{"type":"null"}]},"approvedBy":{"description":"The workspace member who approved a draft or 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"}]},"draftId":{"description":"The draft the event is about, or the draft a message sent.","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"}]},"discardReason":{"description":"Why a draft will not be sent.","anyOf":[{"type":"string","enum":["rejected","superseded","withdrawn","enrollment_stopped","campaign_archived","task_cancelled"]},{"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"}]},"messageDirection":{"description":"On a message edit, deletion or reaction, `sent` when the account wrote the message and `received` when the other person did.","anyOf":[{"type":"string","enum":["sent","received"]},{"type":"null"}]},"attachments":{"description":"The files on a received message, or on one the account owner sent from the channel’s app. `durationMs` is set on audio and video; `unavailable` when the channel no longer serves the file.","anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["image","video","audio","file"]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"durationMs":{"anyOf":[{"type":"number"},{"type":"null"}]},"unavailable":{"type":"boolean"}},"required":["id","kind","name","durationMs","unavailable"],"additionalProperties":false}},{"type":"null"}]},"reaction":{"description":"On a message reaction, the emoji.","anyOf":[{"type":"string"},{"type":"null"}]},"reactedBy":{"description":"On a message reaction, `account` when the account reacted and `contact` when the other person did.","anyOf":[{"type":"string","enum":["account","contact"]},{"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"},"keyHint":{"description":"The masked key, such as `sk-ndl-019...k7mx`. Never the key itself.","anyOf":[{"type":"string"},{"type":"null"}]}},"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","createdAt","channel","messagingChannel","nodeId","leadId","leadName","leadImageUrl","leadEmail","leadIdentities","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), usage so far, and the minimum wait. 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_sales_navigator_message","linkedin_recruiter_message","linkedin_inmail","linkedin_recruiter_inmail","linkedin_profile_view","linkedin_search","linkedin_sales_navigator_search","linkedin_recruiter_search","linkedin_comment","linkedin_reaction","linkedin_post_view","linkedin_company_view","linkedin_job_view","linkedin_conversation_view","linkedin_network_view","linkedin_invitation_list","linkedin_invitation_response","linkedin_search_parameter","linkedin_inmail_balance","linkedin_own_profile","instagram_message","instagram_profile_view","instagram_follow","instagram_unfollow","instagram_comment","instagram_reaction","instagram_post","instagram_post_view","instagram_conversation_view","instagram_network_view","instagram_own_profile"]},"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."},"minWaitSeconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"The least time in seconds between two of this action on the account. Null when it has no minimum wait."}},"required":["action","defaultLimits","override","limits","usage","minWaitSeconds"],"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_sales_navigator_message","linkedin_recruiter_message","linkedin_inmail","linkedin_recruiter_inmail","linkedin_profile_view","linkedin_search","linkedin_sales_navigator_search","linkedin_recruiter_search","linkedin_comment","linkedin_reaction","linkedin_post_view","linkedin_company_view","linkedin_job_view","linkedin_conversation_view","linkedin_network_view","linkedin_invitation_list","linkedin_invitation_response","linkedin_search_parameter","linkedin_inmail_balance","linkedin_own_profile","instagram_message","instagram_profile_view","instagram_follow","instagram_unfollow","instagram_comment","instagram_reaction","instagram_post","instagram_post_view","instagram_conversation_view","instagram_network_view","instagram_own_profile"],"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_sales_navigator_message","linkedin_recruiter_message","linkedin_inmail","linkedin_recruiter_inmail","linkedin_profile_view","linkedin_search","linkedin_sales_navigator_search","linkedin_recruiter_search","linkedin_comment","linkedin_reaction","linkedin_post_view","linkedin_company_view","linkedin_job_view","linkedin_conversation_view","linkedin_network_view","linkedin_invitation_list","linkedin_invitation_response","linkedin_search_parameter","linkedin_inmail_balance","linkedin_own_profile","instagram_message","instagram_profile_view","instagram_follow","instagram_unfollow","instagram_comment","instagram_reaction","instagram_post","instagram_post_view","instagram_conversation_view","instagram_network_view","instagram_own_profile"]},"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."},"minWaitSeconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"The least time in seconds between two of this action on the account. Null when it has no minimum wait."}},"required":["action","defaultLimits","override","limits","usage","minWaitSeconds"],"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_sales_navigator_message","linkedin_recruiter_message","linkedin_inmail","linkedin_recruiter_inmail","linkedin_profile_view","linkedin_search","linkedin_sales_navigator_search","linkedin_recruiter_search","linkedin_comment","linkedin_reaction","linkedin_post_view","linkedin_company_view","linkedin_job_view","linkedin_conversation_view","linkedin_network_view","linkedin_invitation_list","linkedin_invitation_response","linkedin_search_parameter","linkedin_inmail_balance","linkedin_own_profile","instagram_message","instagram_profile_view","instagram_follow","instagram_unfollow","instagram_comment","instagram_reaction","instagram_post","instagram_post_view","instagram_conversation_view","instagram_network_view","instagram_own_profile"],"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_sales_navigator_message","linkedin_recruiter_message","linkedin_inmail","linkedin_recruiter_inmail","linkedin_profile_view","linkedin_search","linkedin_sales_navigator_search","linkedin_recruiter_search","linkedin_comment","linkedin_reaction","linkedin_post_view","linkedin_company_view","linkedin_job_view","linkedin_conversation_view","linkedin_network_view","linkedin_invitation_list","linkedin_invitation_response","linkedin_search_parameter","linkedin_inmail_balance","linkedin_own_profile","instagram_message","instagram_profile_view","instagram_follow","instagram_unfollow","instagram_comment","instagram_reaction","instagram_post","instagram_post_view","instagram_conversation_view","instagram_network_view","instagram_own_profile"]},"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."},"minWaitSeconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"The least time in seconds between two of this action on the account. Null when it has no minimum wait."}},"required":["action","defaultLimits","override","limits","usage","minWaitSeconds"],"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_sales_navigator_message","linkedin_recruiter_message","linkedin_inmail","linkedin_recruiter_inmail","linkedin_profile_view","linkedin_search","linkedin_sales_navigator_search","linkedin_recruiter_search","linkedin_comment","linkedin_reaction","linkedin_post_view","linkedin_company_view","linkedin_job_view","linkedin_conversation_view","linkedin_network_view","linkedin_invitation_list","linkedin_invitation_response","linkedin_search_parameter","linkedin_inmail_balance","linkedin_own_profile","instagram_message","instagram_profile_view","instagram_follow","instagram_unfollow","instagram_comment","instagram_reaction","instagram_post","instagram_post_view","instagram_conversation_view","instagram_network_view","instagram_own_profile"]},"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/connect-links":{"post":{"tags":["Connected accounts"],"operationId":"createConnectLink","summary":"Create a connect link","description":"A link someone outside the workspace, such as a client, opens to connect their LinkedIn or Instagram account themselves. They need no Needle account, and their password never goes through you. Accounts connected through it are yours. Pass reconnectAccountId for a link that only signs that account in again. Links expire after 24 hours. A new connect link needs a free account license in the workspace. Each account connected through a link sends an account_connected event (account_reconnected for a reconnect link), which you can get with a [webhook](https://needle.app/docs/webhooks) or Search events.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reconnectAccountId":{"description":"A connected account you own that needs signing in again. The link then only reconnects that account, with its login filled in. Left out, the link connects new accounts.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}}}}},"responses":{"201":{"description":"Link created.","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","description":"The page to send. Whoever opens it can sign in without a Needle account."},"expiresAt":{"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","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"}}}},"402":{"description":"The workspace has no free account license.","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"}]},"properties":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Custom properties, keyed by property key."},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"createdByUser":{"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"}},"required":["id","name","email"],"additionalProperties":false,"description":"A member of this workspace"},{"type":"null"}]},"updatedByUser":{"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"}},"required":["id","name","email"],"additionalProperties":false,"description":"A member of this workspace"},{"type":"null"}]}},"required":["id","firstName","lastName","companyName","companyDomain","jobTitle","email","imageUrl","timezone","identities","liveEnrollment","properties","createdAt","updatedAt","createdByUser","updatedByUser"],"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"}]},"properties":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Custom properties, keyed by property key."},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"createdByUser":{"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"}},"required":["id","name","email"],"additionalProperties":false,"description":"A member of this workspace"},{"type":"null"}]},"updatedByUser":{"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"}},"required":["id","name","email"],"additionalProperties":false,"description":"A member of this workspace"},{"type":"null"}]},"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","step_removed"]},{"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","properties","createdAt","updatedAt","createdByUser","updatedByUser","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/search":{"post":{"tags":["Leads"],"operationId":"searchLeads","summary":"Search leads","description":"Find leads by free text and filters. With a query, best matches come first (name, then email starting with it); without one, newest first. Every word in query must appear in the name, email, company, title, or a handle. Filter on built-in fields or on custom properties as properties.<key>; GET /lead-properties lists the keys, their types, and common values. An operator that does not fit the field type returns 400 naming the operators that do. Pass nextCursor as cursor, with the same query and filters, for the next page.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"query":{"description":"Free text. Every word must appear in the name, email, company, company domain, job title, or a profile handle. Combined with filters.","type":"string","maxLength":200},"filters":{"default":[],"description":"Every filter must match.","maxItems":20,"type":"array","items":{"type":"object","properties":{"field":{"type":"string","minLength":1,"maxLength":300,"description":"A built-in field (firstName, lastName, jobTitle, companyName, companyDomain, email, createdAt, updatedAt, createdBy, updatedBy, enrollmentStatus) or a custom property as properties.<key>, e.g. properties.industry. List custom properties and their types with GET /api/v1/lead-properties."},"operator":{"type":"string","enum":["eq","neq","in","not_in","contains","not_contains","starts_with","gt","gte","lt","lte","before","after","on","between","is_set","is_not_set"],"description":"string: eq, neq, in, not_in, contains, not_contains, starts_with. number: eq, neq, gt, gte, lt, lte. date: before, after, on, between. boolean: eq. Every type: is_set, is_not_set. createdBy and updatedBy (a member id): eq, neq, in, not_in. enrollmentStatus (active, waiting, completed, stopped, failed): eq and in match leads with any enrollment in those statuses, neq and not_in leads with none; is_set means enrolled in any campaign, is_not_set never enrolled. String matching ignores case. neq, not_in and not_contains also match leads without a value."},"value":{"description":"Omit for is_set and is_not_set. A list for in and not_in. Dates as YYYY-MM-DD, in UTC; two dates [from, to] for between, both inclusive. createdAt and updatedAt also take ISO 8601 instants with an offset, e.g. 2026-10-22T22:00:00Z, to bound by time instead of whole UTC days: before matches earlier, after matches at or later, and between includes from and excludes to. on always takes a date.","anyOf":[{"anyOf":[{"type":"string","maxLength":1000},{"type":"number"},{"type":"boolean"}]},{"minItems":1,"maxItems":100,"type":"array","items":{"anyOf":[{"type":"string","maxLength":1000},{"type":"number"},{"type":"boolean"}]}}]}},"required":["field","operator"]}},"cursor":{"type":"string","minLength":1},"limit":{"type":"integer","minimum":1,"maximum":100}}}}}},"responses":{"200":{"description":"A page of matching leads.","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"}]},"properties":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Custom properties, keyed by property key."},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"createdByUser":{"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"}},"required":["id","name","email"],"additionalProperties":false,"description":"A member of this workspace"},{"type":"null"}]},"updatedByUser":{"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"}},"required":["id","name","email"],"additionalProperties":false,"description":"A member of this workspace"},{"type":"null"}]}},"required":["id","firstName","lastName","companyName","companyDomain","jobTitle","email","imageUrl","timezone","identities","liveEnrollment","properties","createdAt","updatedAt","createdByUser","updatedByUser"],"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"}}}}}}},"/api/v1/lead-properties":{"get":{"tags":["Leads"],"operationId":"listLeadProperties","summary":"List lead properties","description":"Every custom property key used by leads in this workspace, with its type, how many leads have a value, and the most common values. Use these to build filters for POST /leads/search.","responses":{"200":{"description":"Custom properties, by key.","content":{"application/json":{"schema":{"type":"object","properties":{"properties":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"Property key. Filter on it as properties.<key>."},"type":{"type":"string","enum":["string","number","boolean","date"],"description":"How values are compared when filtering. Values are always stored as text; the type is guessed from the first value seen and can be changed."},"showAsColumn":{"type":"boolean","description":"Shown as a column in the leads table."},"leadCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Leads with a non-empty value."},"topValues":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string"},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["value","count"],"additionalProperties":false},"description":"Up to 5 most common values, most common first."}},"required":["key","type","showAsColumn","leadCount","topValues"],"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":["properties","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/lead-properties/{key}":{"patch":{"tags":["Leads"],"operationId":"updateLeadProperty","summary":"Update a lead property","description":"Change how a custom property is compared when filtering (type), or whether it shows as a column in the leads table. Stored values are not changed.","parameters":[{"in":"path","name":"key","schema":{"type":"string","minLength":1,"maxLength":256,"description":"Property key"},"required":true,"description":"Property key"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["string","number","boolean","date"],"description":"How values are compared when filtering. Values are always stored as text; the type is guessed from the first value seen and can be changed."},"showAsColumn":{"type":"boolean","description":"Show this property as a column in the leads table."}}}}}},"responses":{"200":{"description":"The updated property.","content":{"application/json":{"schema":{"type":"object","properties":{"property":{"type":"object","properties":{"key":{"type":"string","description":"Property key. Filter on it as properties.<key>."},"type":{"type":"string","enum":["string","number","boolean","date"],"description":"How values are compared when filtering. Values are always stored as text; the type is guessed from the first value seen and can be changed."},"showAsColumn":{"type":"boolean","description":"Shown as a column in the leads table."},"leadCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Leads with a non-empty value."},"topValues":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string"},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["value","count"],"additionalProperties":false},"description":"Up to 5 most common values, most common first."}},"required":["key","type","showAsColumn","leadCount","topValues"],"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":["property","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/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"}]},"properties":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Custom properties, keyed by property key."},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"createdByUser":{"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"}},"required":["id","name","email"],"additionalProperties":false,"description":"A member of this workspace"},{"type":"null"}]},"updatedByUser":{"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"}},"required":["id","name","email"],"additionalProperties":false,"description":"A member of this workspace"},{"type":"null"}]},"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","step_removed"]},{"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","properties","createdAt","updatedAt","createdByUser","updatedByUser","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"}]},"properties":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Custom properties, keyed by property key."},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"createdByUser":{"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"}},"required":["id","name","email"],"additionalProperties":false,"description":"A member of this workspace"},{"type":"null"}]},"updatedByUser":{"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"}},"required":["id","name","email"],"additionalProperties":false,"description":"A member of this workspace"},{"type":"null"}]},"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","step_removed"]},{"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","properties","createdAt","updatedAt","createdByUser","updatedByUser","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"}]},"properties":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Custom properties, keyed by property key."},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"createdByUser":{"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"}},"required":["id","name","email"],"additionalProperties":false,"description":"A member of this workspace"},{"type":"null"}]},"updatedByUser":{"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"}},"required":["id","name","email"],"additionalProperties":false,"description":"A member of this workspace"},{"type":"null"}]},"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","step_removed"]},{"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","properties","createdAt","updatedAt","createdByUser","updatedByUser","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. Deprecated: use `draft_created`, which is sent alongside it."},{"type":"string","const":"task_approved","description":"A held step was approved. Deprecated: use `draft_approved`, which is sent alongside it."},{"type":"string","const":"draft_created","description":"A drafted message is waiting for a member to review it, created through the API or held by a campaign step."},{"type":"string","const":"draft_approved","description":"A member approved a draft, possibly after editing it (`data.edited`). The message itself is the `linkedin_message_sent` (also for an InMail), `linkedin_invite_sent` or `instagram_message_sent` event that follows, with the same `data.draftId`. An approved InMail to someone out of network without Open Profile goes out as a connection request without a note instead."},{"type":"string","const":"draft_discarded","description":"A draft will not be sent; `data.discardReason` says why."},{"type":"string","const":"draft_failed","description":"An approved draft could not be sent; `data.message` says why."},{"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, after hitting a limit, or by Needle after 10 failures in a row on Instagram (`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, headers or event types changed, or it was turned on again; `data.changedFields` lists which (`url`, `headers`, `eventTypes`, `enabled`)."},{"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_message_edited","description":"A LinkedIn message was edited. `data.text` is the new text and `data.messageId` names the message; its sent or received event keeps the original text."},{"type":"string","const":"linkedin_message_deleted","description":"A LinkedIn message was deleted. `data.messageId` names the message and `data.text` is what it said."},{"type":"string","const":"linkedin_message_reaction_added","description":"A reaction was added to a LinkedIn message. `data.reaction` is the emoji, `data.reactedBy` says who reacted, `data.messageId` names the message and `data.text` is what it said. LinkedIn reports no removals."},{"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_follow_accepted","description":"An Instagram follow request was accepted."},{"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_message_edited","description":"An Instagram message was edited. `data.text` is the new text and `data.messageId` names the message; its sent or received event keeps the original text."},{"type":"string","const":"instagram_message_deleted","description":"An Instagram message was deleted. `data.messageId` names the message and `data.text` is what it said."},{"type":"string","const":"instagram_message_reaction_added","description":"A reaction was added to an Instagram message. `data.reaction` is the emoji, `data.reactedBy` says who reacted, `data.messageId` names the message and `data.text` is what it said. Instagram reports no removals."},{"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":{"description":"When it happened, as LinkedIn or Instagram reports it. They can report some events, such as accepted connection requests, hours later, so this can be well before createdAt.","type":"string","format":"date-time"},"createdAt":{"description":"When Needle recorded it.","type":"string","format":"date-time"},"channel":{"anyOf":[{"type":"string","enum":["linkedin","instagram"]},{"type":"null"}]},"messagingChannel":{"anyOf":[{"type":"string","enum":["linkedin","instagram","linkedin_sales_navigator","linkedin_recruiter"]},{"type":"null"}],"description":"The inbox the event happened in. The same as channel, except \"linkedin_sales_navigator\" for the Sales Navigator inbox (InMails, and messages sent or received there) and \"linkedin_recruiter\" for the Recruiter inbox. Each keeps its own conversations, apart from LinkedIn ones. Null when channel is 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"}]},"leadEmail":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The lead's email. Null when the event has no lead."},"leadIdentities":{"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 @. The same value Get a lead returns."},"profileUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The profile link, for example https://www.linkedin.com/in/jane-doe. When only the LinkedIn member id is known, the link uses it and opens the same profile. Null for channels without a profile page, such as email. To match a person, use channelUserId."},"channelUserId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The person's user id on the channel, such as LinkedIn's ACoAAA… id. Null when not known yet."}},"required":["channel","channelIdentity","profileUrl","channelUserId"],"additionalProperties":false},"description":"The lead's profiles, one per channel, to match the person in your own system. Empty when the event has no lead."},"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_sales_navigator_message","linkedin_recruiter_message","linkedin_inmail","linkedin_recruiter_inmail","linkedin_profile_view","linkedin_search","linkedin_sales_navigator_search","linkedin_recruiter_search","linkedin_comment","linkedin_reaction","linkedin_post_view","linkedin_company_view","linkedin_job_view","linkedin_conversation_view","linkedin_network_view","linkedin_invitation_list","linkedin_invitation_response","linkedin_search_parameter","linkedin_inmail_balance","linkedin_own_profile","instagram_message","instagram_profile_view","instagram_follow","instagram_unfollow","instagram_comment","instagram_reaction","instagram_post","instagram_post_view","instagram_conversation_view","instagram_network_view","instagram_own_profile"]},{"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","step_removed"]},{"type":"null"}]},"text":{"anyOf":[{"type":"string"},{"type":"null"}]},"edited":{"description":"On `draft_approved`, whether the reviewer changed the draft before approving it.","anyOf":[{"type":"boolean"},{"type":"null"}]},"originalText":{"description":"On `draft_approved`, the drafted text before the reviewer edited it. Only set when `edited` is `true`.","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, who replied or accepted, 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"}]},"channelUserId":{"description":"The person's user id on the channel, such as LinkedIn's ACoAAA… id. Set on every reply and accepted connection request, whether or not the person is a lead.","anyOf":[{"type":"string"},{"type":"null"}]}},"required":["identity"],"additionalProperties":false},{"type":"null"}]},"approvedBy":{"description":"The workspace member who approved a draft or 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"}]},"draftId":{"description":"The draft the event is about, or the draft a message sent.","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"}]},"discardReason":{"description":"Why a draft will not be sent.","anyOf":[{"type":"string","enum":["rejected","superseded","withdrawn","enrollment_stopped","campaign_archived","task_cancelled"]},{"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"}]},"messageDirection":{"description":"On a message edit, deletion or reaction, `sent` when the account wrote the message and `received` when the other person did.","anyOf":[{"type":"string","enum":["sent","received"]},{"type":"null"}]},"attachments":{"description":"The files on a received message, or on one the account owner sent from the channel’s app. `durationMs` is set on audio and video; `unavailable` when the channel no longer serves the file.","anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["image","video","audio","file"]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"durationMs":{"anyOf":[{"type":"number"},{"type":"null"}]},"unavailable":{"type":"boolean"}},"required":["id","kind","name","durationMs","unavailable"],"additionalProperties":false}},{"type":"null"}]},"reaction":{"description":"On a message reaction, the emoji.","anyOf":[{"type":"string"},{"type":"null"}]},"reactedBy":{"description":"On a message reaction, `account` when the account reacted and `contact` when the other person did.","anyOf":[{"type":"string","enum":["account","contact"]},{"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"},"keyHint":{"description":"The masked key, such as `sk-ndl-019...k7mx`. Never the key itself.","anyOf":[{"type":"string"},{"type":"null"}]}},"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","createdAt","channel","messagingChannel","nodeId","leadId","leadName","leadImageUrl","leadEmail","leadIdentities","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_sales_navigator_message","linkedin_recruiter_message","linkedin_inmail","linkedin_recruiter_inmail","linkedin_profile_view","linkedin_search","linkedin_sales_navigator_search","linkedin_recruiter_search","linkedin_comment","linkedin_reaction","linkedin_post_view","linkedin_company_view","linkedin_job_view","linkedin_conversation_view","linkedin_network_view","linkedin_invitation_list","linkedin_invitation_response","linkedin_search_parameter","linkedin_inmail_balance","linkedin_own_profile","instagram_message","instagram_profile_view","instagram_follow","instagram_unfollow","instagram_comment","instagram_reaction","instagram_post","instagram_post_view","instagram_conversation_view","instagram_network_view","instagram_own_profile"]},"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","description":"A page of campaigns, newest first. Filter by status. Pass nextCursor as cursor for the next page. Results leave out the step graph; use Get a campaign for it.","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"]},"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"}]},"createdByUser":{"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"}},"required":["id","name","email"],"additionalProperties":false,"description":"A member of this workspace"},{"type":"null"}]},"updatedByUser":{"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"}},"required":["id","name","email"],"additionalProperties":false,"description":"A member of this workspace"},{"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}},"enrollmentCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Leads ever enrolled, including ones that finished or stopped."},"progress":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How far enrolled leads are through the sequence on average, 0 to 100. Finished leads count as 100."}},"required":["id","ownerOrgId","name","status","schedule","limits","suppressionPolicy","startedAt","startedBy","pausedAt","pausedBy","archivedAt","archivedBy","createdAt","createdBy","updatedAt","updatedBy","createdByUser","updatedByUser","connectedAccounts","enrollmentCount","progress"],"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":{"description":"Account that sends this step.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-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_sales_navigator_message","linkedin_recruiter_message","linkedin_inmail","linkedin_recruiter_inmail","linkedin_profile_view","linkedin_search","linkedin_sales_navigator_search","linkedin_recruiter_search","linkedin_comment","linkedin_reaction","linkedin_post_view","linkedin_company_view","linkedin_job_view","linkedin_conversation_view","linkedin_network_view","linkedin_invitation_list","linkedin_invitation_response","linkedin_search_parameter","linkedin_inmail_balance","linkedin_own_profile","instagram_message","instagram_profile_view","instagram_follow","instagram_unfollow","instagram_comment","instagram_reaction","instagram_post","instagram_post_view","instagram_conversation_view","instagram_network_view","instagram_own_profile"]},"messagingChannel":{"description":"Inbox the step sends from. Omit it for the default: linkedin_message sends from LinkedIn, linkedin_inmail from Sales Navigator. Set \"linkedin_sales_navigator\" on linkedin_message to send it from Sales Navigator, in its own chat apart from the LinkedIn one; the lead must be a connection. Set \"linkedin_recruiter\" to send from LinkedIn Recruiter: on linkedin_inmail it is a Recruiter InMail, paid with Recruiter credits (none for a connection); on linkedin_message it goes into the lead's open Recruiter chat, or reaches a connection. Steps that send from Sales Navigator or Recruiter need an account with that product.","type":"string","enum":["linkedin","instagram","linkedin_sales_navigator","linkedin_recruiter"]},"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","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":{"description":"Account this check runs against.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-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","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":{"description":"Account this wait listens on.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-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","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":{"description":"Account that sends this step.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-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_sales_navigator_message","linkedin_recruiter_message","linkedin_inmail","linkedin_recruiter_inmail","linkedin_profile_view","linkedin_search","linkedin_sales_navigator_search","linkedin_recruiter_search","linkedin_comment","linkedin_reaction","linkedin_post_view","linkedin_company_view","linkedin_job_view","linkedin_conversation_view","linkedin_network_view","linkedin_invitation_list","linkedin_invitation_response","linkedin_search_parameter","linkedin_inmail_balance","linkedin_own_profile","instagram_message","instagram_profile_view","instagram_follow","instagram_unfollow","instagram_comment","instagram_reaction","instagram_post","instagram_post_view","instagram_conversation_view","instagram_network_view","instagram_own_profile"]},"messagingChannel":{"description":"Inbox the step sends from. Omit it for the default: linkedin_message sends from LinkedIn, linkedin_inmail from Sales Navigator. Set \"linkedin_sales_navigator\" on linkedin_message to send it from Sales Navigator, in its own chat apart from the LinkedIn one; the lead must be a connection. Set \"linkedin_recruiter\" to send from LinkedIn Recruiter: on linkedin_inmail it is a Recruiter InMail, paid with Recruiter credits (none for a connection); on linkedin_message it goes into the lead's open Recruiter chat, or reaches a connection. Steps that send from Sales Navigator or Recruiter need an account with that product.","type":"string","enum":["linkedin","instagram","linkedin_sales_navigator","linkedin_recruiter"]},"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","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":{"description":"Account this check runs against.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-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","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":{"description":"Account this wait listens on.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-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","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"}]},"createdByUser":{"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"}},"required":["id","name","email"],"additionalProperties":false,"description":"A member of this workspace"},{"type":"null"}]},"updatedByUser":{"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"}},"required":["id","name","email"],"additionalProperties":false,"description":"A member of this workspace"},{"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}},"enrollmentCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Leads ever enrolled, including ones that finished or stopped."},"progress":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How far enrolled leads are through the sequence on average, 0 to 100. Finished leads count as 100."}},"required":["id","ownerOrgId","name","status","graph","schedule","limits","suppressionPolicy","startedAt","startedBy","pausedAt","pausedBy","archivedAt","archivedBy","createdAt","createdBy","updatedAt","updatedBy","createdByUser","updatedByUser","connectedAccounts","enrollmentCount","progress"],"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/search":{"post":{"tags":["Campaigns"],"operationId":"searchCampaigns","summary":"Search campaigns","description":"Find campaigns by name. Every word in query must appear. Campaigns whose name starts with the query come first. Pass nextCursor as cursor, with the same query, for the next page. Results leave out the step graph; use the id with Get a campaign for it.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"query":{"type":"string","minLength":1,"maxLength":200,"description":"Text to match. Every word must appear in the record."},"cursor":{"type":"string","minLength":1},"limit":{"type":"integer","minimum":1,"maximum":100}},"required":["query"]}}}},"responses":{"200":{"description":"Matching campaigns.","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"]},"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"}]},"createdByUser":{"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"}},"required":["id","name","email"],"additionalProperties":false,"description":"A member of this workspace"},{"type":"null"}]},"updatedByUser":{"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"}},"required":["id","name","email"],"additionalProperties":false,"description":"A member of this workspace"},{"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}},"enrollmentCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Leads ever enrolled, including ones that finished or stopped."},"progress":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How far enrolled leads are through the sequence on average, 0 to 100. Finished leads count as 100."}},"required":["id","ownerOrgId","name","status","schedule","limits","suppressionPolicy","startedAt","startedBy","pausedAt","pausedBy","archivedAt","archivedBy","createdAt","createdBy","updatedAt","updatedBy","createdByUser","updatedByUser","connectedAccounts","enrollmentCount","progress"],"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"}}}}}}},"/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":{"description":"Account that sends this step.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-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_sales_navigator_message","linkedin_recruiter_message","linkedin_inmail","linkedin_recruiter_inmail","linkedin_profile_view","linkedin_search","linkedin_sales_navigator_search","linkedin_recruiter_search","linkedin_comment","linkedin_reaction","linkedin_post_view","linkedin_company_view","linkedin_job_view","linkedin_conversation_view","linkedin_network_view","linkedin_invitation_list","linkedin_invitation_response","linkedin_search_parameter","linkedin_inmail_balance","linkedin_own_profile","instagram_message","instagram_profile_view","instagram_follow","instagram_unfollow","instagram_comment","instagram_reaction","instagram_post","instagram_post_view","instagram_conversation_view","instagram_network_view","instagram_own_profile"]},"messagingChannel":{"description":"Inbox the step sends from. Omit it for the default: linkedin_message sends from LinkedIn, linkedin_inmail from Sales Navigator. Set \"linkedin_sales_navigator\" on linkedin_message to send it from Sales Navigator, in its own chat apart from the LinkedIn one; the lead must be a connection. Set \"linkedin_recruiter\" to send from LinkedIn Recruiter: on linkedin_inmail it is a Recruiter InMail, paid with Recruiter credits (none for a connection); on linkedin_message it goes into the lead's open Recruiter chat, or reaches a connection. Steps that send from Sales Navigator or Recruiter need an account with that product.","type":"string","enum":["linkedin","instagram","linkedin_sales_navigator","linkedin_recruiter"]},"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","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":{"description":"Account this check runs against.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-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","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":{"description":"Account this wait listens on.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-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","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"}]},"createdByUser":{"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"}},"required":["id","name","email"],"additionalProperties":false,"description":"A member of this workspace"},{"type":"null"}]},"updatedByUser":{"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"}},"required":["id","name","email"],"additionalProperties":false,"description":"A member of this workspace"},{"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}},"enrollmentCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Leads ever enrolled, including ones that finished or stopped."},"progress":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How far enrolled leads are through the sequence on average, 0 to 100. Finished leads count as 100."}},"required":["id","ownerOrgId","name","status","graph","schedule","limits","suppressionPolicy","startedAt","startedBy","pausedAt","pausedBy","archivedAt","archivedBy","createdAt","createdBy","updatedAt","updatedBy","createdByUser","updatedByUser","connectedAccounts","enrollmentCount","progress"],"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":{"description":"Account that sends this step.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-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_sales_navigator_message","linkedin_recruiter_message","linkedin_inmail","linkedin_recruiter_inmail","linkedin_profile_view","linkedin_search","linkedin_sales_navigator_search","linkedin_recruiter_search","linkedin_comment","linkedin_reaction","linkedin_post_view","linkedin_company_view","linkedin_job_view","linkedin_conversation_view","linkedin_network_view","linkedin_invitation_list","linkedin_invitation_response","linkedin_search_parameter","linkedin_inmail_balance","linkedin_own_profile","instagram_message","instagram_profile_view","instagram_follow","instagram_unfollow","instagram_comment","instagram_reaction","instagram_post","instagram_post_view","instagram_conversation_view","instagram_network_view","instagram_own_profile"]},"messagingChannel":{"description":"Inbox the step sends from. Omit it for the default: linkedin_message sends from LinkedIn, linkedin_inmail from Sales Navigator. Set \"linkedin_sales_navigator\" on linkedin_message to send it from Sales Navigator, in its own chat apart from the LinkedIn one; the lead must be a connection. Set \"linkedin_recruiter\" to send from LinkedIn Recruiter: on linkedin_inmail it is a Recruiter InMail, paid with Recruiter credits (none for a connection); on linkedin_message it goes into the lead's open Recruiter chat, or reaches a connection. Steps that send from Sales Navigator or Recruiter need an account with that product.","type":"string","enum":["linkedin","instagram","linkedin_sales_navigator","linkedin_recruiter"]},"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","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":{"description":"Account this check runs against.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-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","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":{"description":"Account this wait listens on.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-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","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":{"description":"Account that sends this step.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-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_sales_navigator_message","linkedin_recruiter_message","linkedin_inmail","linkedin_recruiter_inmail","linkedin_profile_view","linkedin_search","linkedin_sales_navigator_search","linkedin_recruiter_search","linkedin_comment","linkedin_reaction","linkedin_post_view","linkedin_company_view","linkedin_job_view","linkedin_conversation_view","linkedin_network_view","linkedin_invitation_list","linkedin_invitation_response","linkedin_search_parameter","linkedin_inmail_balance","linkedin_own_profile","instagram_message","instagram_profile_view","instagram_follow","instagram_unfollow","instagram_comment","instagram_reaction","instagram_post","instagram_post_view","instagram_conversation_view","instagram_network_view","instagram_own_profile"]},"messagingChannel":{"description":"Inbox the step sends from. Omit it for the default: linkedin_message sends from LinkedIn, linkedin_inmail from Sales Navigator. Set \"linkedin_sales_navigator\" on linkedin_message to send it from Sales Navigator, in its own chat apart from the LinkedIn one; the lead must be a connection. Set \"linkedin_recruiter\" to send from LinkedIn Recruiter: on linkedin_inmail it is a Recruiter InMail, paid with Recruiter credits (none for a connection); on linkedin_message it goes into the lead's open Recruiter chat, or reaches a connection. Steps that send from Sales Navigator or Recruiter need an account with that product.","type":"string","enum":["linkedin","instagram","linkedin_sales_navigator","linkedin_recruiter"]},"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","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":{"description":"Account this check runs against.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-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","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":{"description":"Account this wait listens on.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-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","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"}]},"createdByUser":{"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"}},"required":["id","name","email"],"additionalProperties":false,"description":"A member of this workspace"},{"type":"null"}]},"updatedByUser":{"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"}},"required":["id","name","email"],"additionalProperties":false,"description":"A member of this workspace"},{"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}},"enrollmentCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Leads ever enrolled, including ones that finished or stopped."},"progress":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How far enrolled leads are through the sequence on average, 0 to 100. Finished leads count as 100."}},"required":["id","ownerOrgId","name","status","graph","schedule","limits","suppressionPolicy","startedAt","startedBy","pausedAt","pausedBy","archivedAt","archivedBy","createdAt","createdBy","updatedAt","updatedBy","createdByUser","updatedByUser","connectedAccounts","enrollmentCount","progress"],"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"}]},"repliedBySentiment":{"type":"object","properties":{"interested":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"neutral":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"not_interested":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["interested","neutral","not_interested"],"additionalProperties":false,"description":"Replied leads by whether they are interested in what the outreach offers, judged by AI from its latest messages. A lead whose reply has not been judged yet is in none of the three."}},"required":["enrolled","skippedByReason","invitesSent","invitesAccepted","acceptanceRate","messagesSent","repliedLeads","replyRate","repliedBySentiment"],"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","step_removed"]},"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_sales_navigator_message","linkedin_recruiter_message","linkedin_inmail","linkedin_recruiter_inmail","linkedin_profile_view","linkedin_search","linkedin_sales_navigator_search","linkedin_recruiter_search","linkedin_comment","linkedin_reaction","linkedin_post_view","linkedin_company_view","linkedin_job_view","linkedin_conversation_view","linkedin_network_view","linkedin_invitation_list","linkedin_invitation_response","linkedin_search_parameter","linkedin_inmail_balance","linkedin_own_profile","instagram_message","instagram_profile_view","instagram_follow","instagram_unfollow","instagram_comment","instagram_reaction","instagram_post","instagram_post_view","instagram_conversation_view","instagram_network_view","instagram_own_profile"]},{"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","step_removed"]},{"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","step_removed"]},{"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","step_removed"]},{"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. Deprecated: use `draft_created`, which is sent alongside it."},{"type":"string","const":"task_approved","description":"A held step was approved. Deprecated: use `draft_approved`, which is sent alongside it."},{"type":"string","const":"draft_created","description":"A drafted message is waiting for a member to review it, created through the API or held by a campaign step."},{"type":"string","const":"draft_approved","description":"A member approved a draft, possibly after editing it (`data.edited`). The message itself is the `linkedin_message_sent` (also for an InMail), `linkedin_invite_sent` or `instagram_message_sent` event that follows, with the same `data.draftId`. An approved InMail to someone out of network without Open Profile goes out as a connection request without a note instead."},{"type":"string","const":"draft_discarded","description":"A draft will not be sent; `data.discardReason` says why."},{"type":"string","const":"draft_failed","description":"An approved draft could not be sent; `data.message` says why."},{"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, after hitting a limit, or by Needle after 10 failures in a row on Instagram (`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, headers or event types changed, or it was turned on again; `data.changedFields` lists which (`url`, `headers`, `eventTypes`, `enabled`)."},{"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_message_edited","description":"A LinkedIn message was edited. `data.text` is the new text and `data.messageId` names the message; its sent or received event keeps the original text."},{"type":"string","const":"linkedin_message_deleted","description":"A LinkedIn message was deleted. `data.messageId` names the message and `data.text` is what it said."},{"type":"string","const":"linkedin_message_reaction_added","description":"A reaction was added to a LinkedIn message. `data.reaction` is the emoji, `data.reactedBy` says who reacted, `data.messageId` names the message and `data.text` is what it said. LinkedIn reports no removals."},{"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_follow_accepted","description":"An Instagram follow request was accepted."},{"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_message_edited","description":"An Instagram message was edited. `data.text` is the new text and `data.messageId` names the message; its sent or received event keeps the original text."},{"type":"string","const":"instagram_message_deleted","description":"An Instagram message was deleted. `data.messageId` names the message and `data.text` is what it said."},{"type":"string","const":"instagram_message_reaction_added","description":"A reaction was added to an Instagram message. `data.reaction` is the emoji, `data.reactedBy` says who reacted, `data.messageId` names the message and `data.text` is what it said. Instagram reports no removals."},{"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"}]},"leadEmail":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The lead's email. Null when the event has no lead."},"leadIdentities":{"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 @. The same value Get a lead returns."},"profileUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The profile link, for example https://www.linkedin.com/in/jane-doe. When only the LinkedIn member id is known, the link uses it and opens the same profile. Null for channels without a profile page, such as email. To match a person, use channelUserId."},"channelUserId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The person's user id on the channel, such as LinkedIn's ACoAAA… id. Null when not known yet."}},"required":["channel","channelIdentity","profileUrl","channelUserId"],"additionalProperties":false},"description":"The lead's profiles, one per channel, to match the person in your own system. Empty when the event has no lead."},"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_sales_navigator_message","linkedin_recruiter_message","linkedin_inmail","linkedin_recruiter_inmail","linkedin_profile_view","linkedin_search","linkedin_sales_navigator_search","linkedin_recruiter_search","linkedin_comment","linkedin_reaction","linkedin_post_view","linkedin_company_view","linkedin_job_view","linkedin_conversation_view","linkedin_network_view","linkedin_invitation_list","linkedin_invitation_response","linkedin_search_parameter","linkedin_inmail_balance","linkedin_own_profile","instagram_message","instagram_profile_view","instagram_follow","instagram_unfollow","instagram_comment","instagram_reaction","instagram_post","instagram_post_view","instagram_conversation_view","instagram_network_view","instagram_own_profile"]},{"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","step_removed"]},{"type":"null"}]},"text":{"anyOf":[{"type":"string"},{"type":"null"}]},"edited":{"description":"On `draft_approved`, whether the reviewer changed the draft before approving it.","anyOf":[{"type":"boolean"},{"type":"null"}]},"originalText":{"description":"On `draft_approved`, the drafted text before the reviewer edited it. Only set when `edited` is `true`.","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, who replied or accepted, 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"}]},"channelUserId":{"description":"The person's user id on the channel, such as LinkedIn's ACoAAA… id. Set on every reply and accepted connection request, whether or not the person is a lead.","anyOf":[{"type":"string"},{"type":"null"}]}},"required":["identity"],"additionalProperties":false},{"type":"null"}]},"approvedBy":{"description":"The workspace member who approved a draft or 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"}]},"draftId":{"description":"The draft the event is about, or the draft a message sent.","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"}]},"discardReason":{"description":"Why a draft will not be sent.","anyOf":[{"type":"string","enum":["rejected","superseded","withdrawn","enrollment_stopped","campaign_archived","task_cancelled"]},{"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"}]},"messageDirection":{"description":"On a message edit, deletion or reaction, `sent` when the account wrote the message and `received` when the other person did.","anyOf":[{"type":"string","enum":["sent","received"]},{"type":"null"}]},"attachments":{"description":"The files on a received message, or on one the account owner sent from the channel’s app. `durationMs` is set on audio and video; `unavailable` when the channel no longer serves the file.","anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["image","video","audio","file"]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"durationMs":{"anyOf":[{"type":"number"},{"type":"null"}]},"unavailable":{"type":"boolean"}},"required":["id","kind","name","durationMs","unavailable"],"additionalProperties":false}},{"type":"null"}]},"reaction":{"description":"On a message reaction, the emoji.","anyOf":[{"type":"string"},{"type":"null"}]},"reactedBy":{"description":"On a message reaction, `account` when the account reacted and `contact` when the other person did.","anyOf":[{"type":"string","enum":["account","contact"]},{"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"},"keyHint":{"description":"The masked key, such as `sk-ndl-019...k7mx`. Never the key itself.","anyOf":[{"type":"string"},{"type":"null"}]}},"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","leadEmail","leadIdentities","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_sales_navigator_message","linkedin_recruiter_message","linkedin_inmail","linkedin_recruiter_inmail","linkedin_profile_view","linkedin_search","linkedin_sales_navigator_search","linkedin_recruiter_search","linkedin_comment","linkedin_reaction","linkedin_post_view","linkedin_company_view","linkedin_job_view","linkedin_conversation_view","linkedin_network_view","linkedin_invitation_list","linkedin_invitation_response","linkedin_search_parameter","linkedin_inmail_balance","linkedin_own_profile","instagram_message","instagram_profile_view","instagram_follow","instagram_unfollow","instagram_comment","instagram_reaction","instagram_post","instagram_post_view","instagram_conversation_view","instagram_network_view","instagram_own_profile"]},"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}/steps/{nodeId}/message-preview":{"get":{"tags":["Campaigns"],"operationId":"getMessagePreviewForStep","summary":"Get the message preview for a step","description":"What a step would send to the lead of one of the campaign's enrollments, from the step's account. Nothing is sent or saved. AI steps write the message fresh on every call, from the lead's current profile, posts and conversation, so two calls can differ and each one reads the channel as the sending account.","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":"nodeId","schema":{"type":"string","minLength":1,"description":"Step id, the node id in the campaign graph"},"required":true,"description":"Step id, the node id in the campaign graph"},{"in":"query","name":"enrollmentId","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":"An enrollment in this campaign; its lead is the one written to. List them with GET /campaigns/{campaignId}/leads."},"required":true,"description":"An enrollment in this campaign; its lead is the one written to. List them with GET /campaigns/{campaignId}/leads."}],"responses":{"200":{"description":"The message, or status unavailable with the reason there is none.","content":{"application/json":{"schema":{"type":"object","properties":{"preview":{"oneOf":[{"type":"object","properties":{"status":{"type":"string","const":"ready"},"kind":{"type":"string","enum":["template","ai"],"description":"template fills the step text with the lead fields; ai writes it from the prompt and context."},"text":{"type":"string"},"subject":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"InMail subject, when the step has one."},"usedFallback":{"type":"boolean","description":"True when the AI couldn't write a message and the step's fallback text is shown instead."},"sender":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["name","imageUrl"],"additionalProperties":false},{"type":"null"}],"description":"The account the step sends from; null while the step has none."},"messagingChannel":{"type":"string","enum":["linkedin","instagram","linkedin_sales_navigator","linkedin_recruiter"]},"requiresApproval":{"type":"boolean","description":"Held as a draft until someone approves it."},"attachments":{"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},"description":"Files the step sends with the message. These are stored object URLs: to open one, get a short-lived link from POST /api/v1/files/access (needleCreateFileAccessUrl)."}},"required":["status","kind","text","subject","usedFallback","sender","messagingChannel","requiresApproval","attachments"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","const":"unavailable"},"reason":{"type":"string","description":"Why there is nothing to show, for example a missing lead field."}},"required":["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":["preview","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","step_removed"]},{"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/tasks/{taskId}/message-preview":{"get":{"tags":["Campaigns"],"operationId":"getMessagePreviewForTask","summary":"Get the message preview for a task","description":"What a queued task would send to its lead, from the step's current content and account. Nothing is sent or saved. AI steps write the message fresh on every call, from the lead's current profile, posts and conversation, so two calls can differ and each one reads the channel as the sending account.","parameters":[{"in":"path","name":"taskId","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":"Task id"},"required":true,"description":"Task id"}],"responses":{"200":{"description":"The message, or status unavailable with the reason there is none.","content":{"application/json":{"schema":{"type":"object","properties":{"preview":{"oneOf":[{"type":"object","properties":{"status":{"type":"string","const":"ready"},"kind":{"type":"string","enum":["template","ai"],"description":"template fills the step text with the lead fields; ai writes it from the prompt and context."},"text":{"type":"string"},"subject":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"InMail subject, when the step has one."},"usedFallback":{"type":"boolean","description":"True when the AI couldn't write a message and the step's fallback text is shown instead."},"sender":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["name","imageUrl"],"additionalProperties":false},{"type":"null"}],"description":"The account the step sends from; null while the step has none."},"messagingChannel":{"type":"string","enum":["linkedin","instagram","linkedin_sales_navigator","linkedin_recruiter"]},"requiresApproval":{"type":"boolean","description":"Held as a draft until someone approves it."},"attachments":{"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},"description":"Files the step sends with the message. These are stored object URLs: to open one, get a short-lived link from POST /api/v1/files/access (needleCreateFileAccessUrl)."}},"required":["status","kind","text","subject","usedFallback","sender","messagingChannel","requiresApproval","attachments"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","const":"unavailable"},"reason":{"type":"string","description":"Why there is nothing to show, for example a missing lead field."}},"required":["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":["preview","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, newest first. By default only the ones waiting for a member to 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":"status","schema":{"default":"awaiting_review","description":"Defaults to the drafts waiting for review.","type":"string","enum":["awaiting_review","sent","failed","discarded"]},"description":"Defaults to the drafts waiting for review."},{"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"},{"in":"query","name":"leadId","schema":{"description":"Only drafts to this lead","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-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 to this lead"},{"in":"query","name":"connectedAccountId","schema":{"description":"Only drafts sent from this account","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-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 sent from this account"}],"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","sent","failed","discarded"],"description":"`awaiting_review` until a member approves or discards it in the Needle inbox. Approving sends it right away: it becomes `sent`, or stays `awaiting_review` with `lastError` when the send fails. `failed` means it could not be sent and cannot be approved again; `discarded` means it will not be sent."},"channel":{"type":"string","enum":["linkedin","instagram"]},"messagingChannel":{"type":"string","enum":["linkedin","instagram","linkedin_sales_navigator","linkedin_recruiter"],"description":"The inbox it is sent from. The same as channel, except \"linkedin_sales_navigator\" for InMails and messages sent from Sales Navigator, and \"linkedin_recruiter\" for those sent from Recruiter."},"action":{"type":"string","enum":["linkedin_message","linkedin_inmail","linkedin_invitation","instagram_message"]},"text":{"type":"string","description":"What will be sent, or was sent. A member may edit it before approving."},"subject":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The InMail subject."},"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)$"},"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"}],"description":"Set when a campaign step drafted the message."},"taskId":{"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 campaign task the draft holds. Null for API drafts."},"discardReason":{"anyOf":[{"type":"string","enum":["rejected","superseded","withdrawn","enrollment_stopped","campaign_archived","task_cancelled"]},{"type":"null"}]},"lastError":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Why the last attempt to send it failed."},"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"}],"description":"The member who created it. Null when a campaign step did."},"reviewedBy":{"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 approved or discarded it."},"reviewedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","status","channel","messagingChannel","action","text","subject","lead","connectedAccountId","campaignId","taskId","discardReason","lastError","createdBy","reviewedBy","reviewedAt","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":["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"}}}}}},"post":{"tags":["Drafts"],"operationId":"createDraft","summary":"Create a draft","description":"Draft a message, InMail or connection request for a lead. Nothing is sent until a member approves it in the Needle inbox, where they can also edit or discard it. A conversation (account and lead) has one draft waiting at a time: creating another replaces a waiting draft created through the API, which is discarded as `superseded`. A draft a campaign step holds is never replaced; creating one then fails until it is reviewed.","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":"The account that sends it. Its channel must match `action`."},"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 it goes to."},"action":{"type":"string","enum":["linkedin_message","linkedin_inmail","linkedin_invitation","instagram_message"],"description":"`linkedin_invitation` sends a connection request with `text` as its note."},"text":{"type":"string","minLength":1,"maxLength":8000,"description":"Sent exactly as written, so {{variables}} are not allowed. Up to 300 characters for a connection note and 1900 for an InMail."},"subject":{"description":"Required for `linkedin_inmail`, not allowed otherwise.","type":"string","minLength":1,"maxLength":200},"messagingChannel":{"description":"Inbox it is sent from. Omit it for the default: linkedin_message sends from LinkedIn, linkedin_inmail from Sales Navigator. Set \"linkedin_sales_navigator\" on linkedin_message to send it from Sales Navigator, in its own chat apart from the LinkedIn one; the lead must be a connection, and the account needs Sales Navigator. Set \"linkedin_recruiter\" to send from Recruiter, in its own chat apart from the others: on linkedin_inmail it is a Recruiter InMail, paid with Recruiter credits; on linkedin_message it goes into the open Recruiter chat, or reaches a connection. The account needs a Recruiter seat.","type":"string","enum":["linkedin","instagram","linkedin_sales_navigator","linkedin_recruiter"]}},"required":["connectedAccountId","leadId","action","text"]}}}},"responses":{"201":{"description":"Draft created and waiting for review.","content":{"application/json":{"schema":{"type":"object","properties":{"draft":{"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","sent","failed","discarded"],"description":"`awaiting_review` until a member approves or discards it in the Needle inbox. Approving sends it right away: it becomes `sent`, or stays `awaiting_review` with `lastError` when the send fails. `failed` means it could not be sent and cannot be approved again; `discarded` means it will not be sent."},"channel":{"type":"string","enum":["linkedin","instagram"]},"messagingChannel":{"type":"string","enum":["linkedin","instagram","linkedin_sales_navigator","linkedin_recruiter"],"description":"The inbox it is sent from. The same as channel, except \"linkedin_sales_navigator\" for InMails and messages sent from Sales Navigator, and \"linkedin_recruiter\" for those sent from Recruiter."},"action":{"type":"string","enum":["linkedin_message","linkedin_inmail","linkedin_invitation","instagram_message"]},"text":{"type":"string","description":"What will be sent, or was sent. A member may edit it before approving."},"subject":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The InMail subject."},"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)$"},"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"}],"description":"Set when a campaign step drafted the message."},"taskId":{"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 campaign task the draft holds. Null for API drafts."},"discardReason":{"anyOf":[{"type":"string","enum":["rejected","superseded","withdrawn","enrollment_stopped","campaign_archived","task_cancelled"]},{"type":"null"}]},"lastError":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Why the last attempt to send it failed."},"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"}],"description":"The member who created it. Null when a campaign step did."},"reviewedBy":{"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 approved or discarded it."},"reviewedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","status","channel","messagingChannel","action","text","subject","lead","connectedAccountId","campaignId","taskId","discardReason","lastError","createdBy","reviewedBy","reviewedAt","createdAt","updatedAt"],"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":["draft","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 lead has no profile on the account’s channel, is on the do-not-contact list, or a campaign step already has a draft waiting in this conversation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Invalid request payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/drafts/{draftId}":{"get":{"tags":["Drafts"],"operationId":"getDraft","summary":"Get a draft","description":"One draft, with where it is in review.","parameters":[{"in":"path","name":"draftId","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":"Draft id"},"required":true,"description":"Draft id"}],"responses":{"200":{"description":"The draft.","content":{"application/json":{"schema":{"type":"object","properties":{"draft":{"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","sent","failed","discarded"],"description":"`awaiting_review` until a member approves or discards it in the Needle inbox. Approving sends it right away: it becomes `sent`, or stays `awaiting_review` with `lastError` when the send fails. `failed` means it could not be sent and cannot be approved again; `discarded` means it will not be sent."},"channel":{"type":"string","enum":["linkedin","instagram"]},"messagingChannel":{"type":"string","enum":["linkedin","instagram","linkedin_sales_navigator","linkedin_recruiter"],"description":"The inbox it is sent from. The same as channel, except \"linkedin_sales_navigator\" for InMails and messages sent from Sales Navigator, and \"linkedin_recruiter\" for those sent from Recruiter."},"action":{"type":"string","enum":["linkedin_message","linkedin_inmail","linkedin_invitation","instagram_message"]},"text":{"type":"string","description":"What will be sent, or was sent. A member may edit it before approving."},"subject":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The InMail subject."},"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)$"},"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"}],"description":"Set when a campaign step drafted the message."},"taskId":{"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 campaign task the draft holds. Null for API drafts."},"discardReason":{"anyOf":[{"type":"string","enum":["rejected","superseded","withdrawn","enrollment_stopped","campaign_archived","task_cancelled"]},{"type":"null"}]},"lastError":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Why the last attempt to send it failed."},"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"}],"description":"The member who created it. Null when a campaign step did."},"reviewedBy":{"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 approved or discarded it."},"reviewedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","status","channel","messagingChannel","action","text","subject","lead","connectedAccountId","campaignId","taskId","discardReason","lastError","createdBy","reviewedBy","reviewedAt","createdAt","updatedAt"],"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":["draft","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":["Drafts"],"operationId":"withdrawDraft","summary":"Withdraw a draft","description":"Takes back a draft created through the API before anyone reviewed it; it is discarded as `withdrawn`. Withdrawing it again succeeds without changing anything. Drafts held by a campaign step are withdrawn by stopping the lead in the campaign.","parameters":[{"in":"path","name":"draftId","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":"Draft id"},"required":true,"description":"Draft id"}],"responses":{"200":{"description":"Draft withdrawn.","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"}}}},"409":{"description":"The draft was already reviewed, or a campaign step holds it.","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. Deprecated: use `draft_created`, which is sent alongside it."},{"type":"string","const":"task_approved","description":"A held step was approved. Deprecated: use `draft_approved`, which is sent alongside it."},{"type":"string","const":"draft_created","description":"A drafted message is waiting for a member to review it, created through the API or held by a campaign step."},{"type":"string","const":"draft_approved","description":"A member approved a draft, possibly after editing it (`data.edited`). The message itself is the `linkedin_message_sent` (also for an InMail), `linkedin_invite_sent` or `instagram_message_sent` event that follows, with the same `data.draftId`. An approved InMail to someone out of network without Open Profile goes out as a connection request without a note instead."},{"type":"string","const":"draft_discarded","description":"A draft will not be sent; `data.discardReason` says why."},{"type":"string","const":"draft_failed","description":"An approved draft could not be sent; `data.message` says why."},{"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, after hitting a limit, or by Needle after 10 failures in a row on Instagram (`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, headers or event types changed, or it was turned on again; `data.changedFields` lists which (`url`, `headers`, `eventTypes`, `enabled`)."},{"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_message_edited","description":"A LinkedIn message was edited. `data.text` is the new text and `data.messageId` names the message; its sent or received event keeps the original text."},{"type":"string","const":"linkedin_message_deleted","description":"A LinkedIn message was deleted. `data.messageId` names the message and `data.text` is what it said."},{"type":"string","const":"linkedin_message_reaction_added","description":"A reaction was added to a LinkedIn message. `data.reaction` is the emoji, `data.reactedBy` says who reacted, `data.messageId` names the message and `data.text` is what it said. LinkedIn reports no removals."},{"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_follow_accepted","description":"An Instagram follow request was accepted."},{"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_message_edited","description":"An Instagram message was edited. `data.text` is the new text and `data.messageId` names the message; its sent or received event keeps the original text."},{"type":"string","const":"instagram_message_deleted","description":"An Instagram message was deleted. `data.messageId` names the message and `data.text` is what it said."},{"type":"string","const":"instagram_message_reaction_added","description":"A reaction was added to an Instagram message. `data.reaction` is the emoji, `data.reactedBy` says who reacted, `data.messageId` names the message and `data.text` is what it said. Instagram reports no removals."},{"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. Deprecated: use `draft_created`, which is sent alongside it."},{"type":"string","const":"task_approved","description":"A held step was approved. Deprecated: use `draft_approved`, which is sent alongside it."},{"type":"string","const":"draft_created","description":"A drafted message is waiting for a member to review it, created through the API or held by a campaign step."},{"type":"string","const":"draft_approved","description":"A member approved a draft, possibly after editing it (`data.edited`). The message itself is the `linkedin_message_sent` (also for an InMail), `linkedin_invite_sent` or `instagram_message_sent` event that follows, with the same `data.draftId`. An approved InMail to someone out of network without Open Profile goes out as a connection request without a note instead."},{"type":"string","const":"draft_discarded","description":"A draft will not be sent; `data.discardReason` says why."},{"type":"string","const":"draft_failed","description":"An approved draft could not be sent; `data.message` says why."},{"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, after hitting a limit, or by Needle after 10 failures in a row on Instagram (`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, headers or event types changed, or it was turned on again; `data.changedFields` lists which (`url`, `headers`, `eventTypes`, `enabled`)."},{"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_message_edited","description":"A LinkedIn message was edited. `data.text` is the new text and `data.messageId` names the message; its sent or received event keeps the original text."},{"type":"string","const":"linkedin_message_deleted","description":"A LinkedIn message was deleted. `data.messageId` names the message and `data.text` is what it said."},{"type":"string","const":"linkedin_message_reaction_added","description":"A reaction was added to a LinkedIn message. `data.reaction` is the emoji, `data.reactedBy` says who reacted, `data.messageId` names the message and `data.text` is what it said. LinkedIn reports no removals."},{"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_follow_accepted","description":"An Instagram follow request was accepted."},{"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_message_edited","description":"An Instagram message was edited. `data.text` is the new text and `data.messageId` names the message; its sent or received event keeps the original text."},{"type":"string","const":"instagram_message_deleted","description":"An Instagram message was deleted. `data.messageId` names the message and `data.text` is what it said."},{"type":"string","const":"instagram_message_reaction_added","description":"A reaction was added to an Instagram message. `data.reaction` is the emoji, `data.reactedBy` says who reacted, `data.messageId` names the message and `data.text` is what it said. Instagram reports no removals."},{"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":{"description":"When it happened, as LinkedIn or Instagram reports it. They can report some events, such as accepted connection requests, hours later, so this can be well before createdAt.","type":"string","format":"date-time"},"createdAt":{"description":"When Needle recorded it.","type":"string","format":"date-time"},"channel":{"anyOf":[{"type":"string","enum":["linkedin","instagram"]},{"type":"null"}]},"messagingChannel":{"anyOf":[{"type":"string","enum":["linkedin","instagram","linkedin_sales_navigator","linkedin_recruiter"]},{"type":"null"}],"description":"The inbox the event happened in. The same as channel, except \"linkedin_sales_navigator\" for the Sales Navigator inbox (InMails, and messages sent or received there) and \"linkedin_recruiter\" for the Recruiter inbox. Each keeps its own conversations, apart from LinkedIn ones. Null when channel is 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"}]},"leadEmail":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The lead's email. Null when the event has no lead."},"leadIdentities":{"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 @. The same value Get a lead returns."},"profileUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The profile link, for example https://www.linkedin.com/in/jane-doe. When only the LinkedIn member id is known, the link uses it and opens the same profile. Null for channels without a profile page, such as email. To match a person, use channelUserId."},"channelUserId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The person's user id on the channel, such as LinkedIn's ACoAAA… id. Null when not known yet."}},"required":["channel","channelIdentity","profileUrl","channelUserId"],"additionalProperties":false},"description":"The lead's profiles, one per channel, to match the person in your own system. Empty when the event has no lead."},"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_sales_navigator_message","linkedin_recruiter_message","linkedin_inmail","linkedin_recruiter_inmail","linkedin_profile_view","linkedin_search","linkedin_sales_navigator_search","linkedin_recruiter_search","linkedin_comment","linkedin_reaction","linkedin_post_view","linkedin_company_view","linkedin_job_view","linkedin_conversation_view","linkedin_network_view","linkedin_invitation_list","linkedin_invitation_response","linkedin_search_parameter","linkedin_inmail_balance","linkedin_own_profile","instagram_message","instagram_profile_view","instagram_follow","instagram_unfollow","instagram_comment","instagram_reaction","instagram_post","instagram_post_view","instagram_conversation_view","instagram_network_view","instagram_own_profile"]},{"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","step_removed"]},{"type":"null"}]},"text":{"anyOf":[{"type":"string"},{"type":"null"}]},"edited":{"description":"On `draft_approved`, whether the reviewer changed the draft before approving it.","anyOf":[{"type":"boolean"},{"type":"null"}]},"originalText":{"description":"On `draft_approved`, the drafted text before the reviewer edited it. Only set when `edited` is `true`.","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, who replied or accepted, 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"}]},"channelUserId":{"description":"The person's user id on the channel, such as LinkedIn's ACoAAA… id. Set on every reply and accepted connection request, whether or not the person is a lead.","anyOf":[{"type":"string"},{"type":"null"}]}},"required":["identity"],"additionalProperties":false},{"type":"null"}]},"approvedBy":{"description":"The workspace member who approved a draft or 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"}]},"draftId":{"description":"The draft the event is about, or the draft a message sent.","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"}]},"discardReason":{"description":"Why a draft will not be sent.","anyOf":[{"type":"string","enum":["rejected","superseded","withdrawn","enrollment_stopped","campaign_archived","task_cancelled"]},{"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"}]},"messageDirection":{"description":"On a message edit, deletion or reaction, `sent` when the account wrote the message and `received` when the other person did.","anyOf":[{"type":"string","enum":["sent","received"]},{"type":"null"}]},"attachments":{"description":"The files on a received message, or on one the account owner sent from the channel’s app. `durationMs` is set on audio and video; `unavailable` when the channel no longer serves the file.","anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["image","video","audio","file"]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"durationMs":{"anyOf":[{"type":"number"},{"type":"null"}]},"unavailable":{"type":"boolean"}},"required":["id","kind","name","durationMs","unavailable"],"additionalProperties":false}},{"type":"null"}]},"reaction":{"description":"On a message reaction, the emoji.","anyOf":[{"type":"string"},{"type":"null"}]},"reactedBy":{"description":"On a message reaction, `account` when the account reacted and `contact` when the other person did.","anyOf":[{"type":"string","enum":["account","contact"]},{"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"},"keyHint":{"description":"The masked key, such as `sk-ndl-019...k7mx`. Never the key itself.","anyOf":[{"type":"string"},{"type":"null"}]}},"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","createdAt","channel","messagingChannel","nodeId","leadId","leadName","leadImageUrl","leadEmail","leadIdentities","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/enrollments/search":{"post":{"tags":["Campaigns"],"operationId":"searchEnrollments","summary":"Search enrollments","description":"Find enrollments by the lead or the campaign name. Every word in query must appear. Enrollments whose lead name starts with the query come first, then by campaign name or email. Pass campaignId to search inside one campaign. Pass nextCursor as cursor, with the same query and campaignId, for the next page. Use enrollmentId and campaignId with the campaign lead endpoints.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"query":{"type":"string","minLength":1,"maxLength":200,"description":"Text to match. Every word must appear in the record."},"cursor":{"type":"string","minLength":1},"limit":{"type":"integer","minimum":1,"maximum":100},"campaignId":{"description":"Only enrollments in 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)$"}},"required":["query"]}}}},"responses":{"200":{"description":"Matching enrollments.","content":{"application/json":{"schema":{"type":"object","properties":{"enrollments":{"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","step_removed"]},{"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"},"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"}},"required":["leadId","enrollmentId","firstName","lastName","companyName","companyDomain","jobTitle","email","imageUrl","timezone","status","exitReason","currentNodeId","waitingFor","waitingUntil","lastEventAt","completedAt","createdAt","updatedAt","campaignId","campaignName"],"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":["enrollments","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."},"minWaitSeconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"The least time in seconds between two of this action on the account. Null when it has no minimum wait."}},"required":["hour","day","week","minWaitSeconds"],"additionalProperties":false,"description":"Remaining allowance for this action on the connected account across hourly, daily, and weekly windows, and its minimum wait. 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":{"memberUrn":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"urn:li:member:<number>, the same for this person across Classic, Sales Navigator and Recruiter."},"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"}]},"industry":{"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"},"isPremium":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"True when this person has LinkedIn Premium."},"isVerified":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"True when LinkedIn shows a verification badge."},"followerCount":{"anyOf":[{"type":"number"},{"type":"null"}]},"sharedConnectionCount":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Connections this person shares with the searching account."}},"required":["memberUrn","publicIdentifier","profileUrl","fullName","headline","location","industry","companyName","jobTitle","imageUrl","imageUrlLarge","degree","invitationPending","isPremium","isVerified","followerCount","sharedConnectionCount"],"additionalProperties":false}},"cursor":{"anyOf":[{"type":"string"},{"type":"null"}]},"totalCount":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"All matches across pages, when LinkedIn reports it. Sales Navigator does; Classic does not."},"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."},"minWaitSeconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"The least time in seconds between two of this action on the account. Null when it has no minimum wait."}},"required":["hour","day","week","minWaitSeconds"],"additionalProperties":false,"description":"Remaining allowance for this action on the connected account across hourly, daily, and weekly windows, and its minimum wait. 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":["hits","cursor","totalCount","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/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":{"memberUrn":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"urn:li:member:<number>, the same for this person across Classic, Sales Navigator and Recruiter."},"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"}]},"industry":{"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"},"salesNavigatorProfileUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The lead page in Sales Navigator. profileUrl falls back to this page when LinkedIn gives no public profile URL."},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The About section of the profile."},"isPremium":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"True when this person has LinkedIn Premium."},"sharedConnectionCount":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Connections this person shares with the searching account."},"recentPostCount":{"anyOf":[{"type":"number"},{"type":"null"}]},"recentlyHired":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"currentPositions":{"type":"array","items":{"type":"object","properties":{"companyName":{"anyOf":[{"type":"string"},{"type":"null"}]},"companyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"companyUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"jobTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"location":{"anyOf":[{"type":"string"},{"type":"null"}]},"industries":{"type":"array","items":{"type":"string"}},"start":{"anyOf":[{"type":"object","properties":{"year":{"anyOf":[{"type":"number"},{"type":"null"}]},"month":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["year","month"],"additionalProperties":false},{"type":"null"}]},"end":{"anyOf":[{"type":"object","properties":{"year":{"anyOf":[{"type":"number"},{"type":"null"}]},"month":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["year","month"],"additionalProperties":false},{"type":"null"}]},"tenureAtRole":{"anyOf":[{"type":"object","properties":{"years":{"anyOf":[{"type":"number"},{"type":"null"}]},"months":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["years","months"],"additionalProperties":false},{"type":"null"}]},"tenureAtCompany":{"anyOf":[{"type":"object","properties":{"years":{"anyOf":[{"type":"number"},{"type":"null"}]},"months":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["years","months"],"additionalProperties":false},{"type":"null"}]}},"required":["companyName","companyId","companyUrl","jobTitle","description","location","industries","start","end","tenureAtRole","tenureAtCompany"],"additionalProperties":false},"description":"In the order LinkedIn lists them, which is not guaranteed to be by date. companyName and jobTitle come from the first."}},"required":["memberUrn","publicIdentifier","profileUrl","fullName","headline","location","industry","companyName","jobTitle","imageUrl","imageUrlLarge","degree","invitationPending","salesNavigatorProfileUrl","firstName","lastName","summary","isPremium","sharedConnectionCount","recentPostCount","recentlyHired","currentPositions"],"additionalProperties":false}},"cursor":{"anyOf":[{"type":"string"},{"type":"null"}]},"totalCount":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"All matches across pages, when LinkedIn reports it. Sales Navigator does; Classic does not."},"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."},"minWaitSeconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"The least time in seconds between two of this action on the account. Null when it has no minimum wait."}},"required":["hour","day","week","minWaitSeconds"],"additionalProperties":false,"description":"Remaining allowance for this action on the connected account across hourly, daily, and weekly windows, and its minimum wait. 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":["hits","cursor","totalCount","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/recruiter/people/search":{"post":{"tags":["LinkedIn"],"operationId":"searchLinkedinRecruiterPeople","summary":"Search Recruiter people","description":"Search candidates in LinkedIn Recruiter with keywords and the filters Recruiter Lite supports. Resolve filter ids with GET /api/v1/linkedin/search/parameters and service=recruiter; Recruiter's ids are its own. Most filters take a priority: required, preferred or excluded. Up to 100 results a page. Requires a Recruiter seat. Counts against the linkedin_recruiter_search limits.","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":{"description":"Free text, with Boolean operators such as developers AND product NOT managers.","type":"string","minLength":1,"maxLength":512},"firstNames":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":512}},"lastNames":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":512}},"locations":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^\\d+$","description":"Id from the search parameters endpoint with type=LOCATION and service=recruiter."},"priority":{"description":"required (the default): results must match it. preferred: ranks matches higher without leaving others out. excluded: leaves matches out.","type":"string","enum":["required","preferred","excluded"]}},"required":["id"]}},"locationRadiusMiles":{"description":"How far around the locations to search, in miles.","type":"integer","minimum":0,"maximum":100},"jobTitles":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"object","properties":{"id":{"description":"Id from the search parameters endpoint with type=JOB_TITLE and service=recruiter.","type":"string","pattern":"^\\d+$"},"keywords":{"description":"Free text to match, when there is no id for it.","type":"string","minLength":1,"maxLength":256},"priority":{"description":"required (the default): results must match it. preferred: ranks matches higher without leaving others out. excluded: leaves matches out.","type":"string","enum":["required","preferred","excluded"]},"scope":{"description":"Which jobs count: current, past, either, past but not current, or titles they are open to.","type":"string","enum":["current_or_past","current","past","past_not_current","open_to_work"]}}}},"skills":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"object","properties":{"keywords":{"type":"string","minLength":1,"maxLength":256,"description":"Free text to match."},"priority":{"description":"required (the default): results must match it. preferred: ranks matches higher without leaving others out. excluded: leaves matches out.","type":"string","enum":["required","preferred","excluded"]}},"required":["keywords"]}},"companies":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"object","properties":{"keywords":{"type":"string","minLength":1,"maxLength":256,"description":"Company name to match."},"priority":{"description":"required (the default): results must match it. preferred: ranks matches higher without leaving others out. excluded: leaves matches out.","type":"string","enum":["required","preferred","excluded"]},"scope":{"description":"Which employers count: current, past, either, or past but not current.","type":"string","enum":["current_or_past","current","past","past_not_current"]}},"required":["keywords"]}},"schools":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^\\d+$","description":"Id from the search parameters endpoint with type=SCHOOL and service=recruiter."},"priority":{"description":"required (the default): results must match it. preferred: ranks matches higher without leaving others out. excluded: leaves matches out.","type":"string","enum":["required","preferred","excluded"]}},"required":["id"]}},"industries":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","pattern":"^\\d+$"},"description":"Ids from the search parameters endpoint with type=INDUSTRY and service=recruiter."},"excludedIndustries":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","pattern":"^\\d+$"},"description":"Ids from the search parameters endpoint with type=INDUSTRY and service=recruiter."},"functions":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","pattern":"^\\d+$"},"description":"Ids from the search parameters endpoint with type=DEPARTMENT and service=recruiter."},"seniorities":{"minItems":1,"maxItems":10,"type":"array","items":{"type":"string","enum":["owner","partner","cxo","vp","director","manager","senior","entry","training","unpaid"]}},"excludedSeniorities":{"minItems":1,"maxItems":10,"type":"array","items":{"type":"string","enum":["owner","partner","cxo","vp","director","manager","senior","entry","training","unpaid"]}},"yearsOfExperience":{"description":"Years of experience across their whole career, from min to max.","type":"object","properties":{"min":{"type":"integer","minimum":0,"maximum":60},"max":{"type":"integer","minimum":0,"maximum":60}},"required":["min","max"],"additionalProperties":false},"graduationYears":{"description":"Years they graduated in, from min to max.","type":"object","properties":{"min":{"type":"integer","minimum":1900,"maximum":2100},"max":{"type":"integer","minimum":1900,"maximum":2100}},"required":["min","max"],"additionalProperties":false},"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."},"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."},"groups":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","pattern":"^\\d+$"},"description":"Ids from the search parameters endpoint with type=GROUPS and service=recruiter."},"recentlyJoined":{"description":"How recently they joined LinkedIn.","minItems":1,"maxItems":5,"type":"array","items":{"type":"string","enum":["last_day","2_to_7_days","8_to_14_days","15_to_30_days","31_to_90_days"]}},"companySizes":{"description":"Employee-count bands of their 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"]}},"recruitingActivity":{"description":"People your Recruiter team messaged, tagged, noted, added to a project, got a resume from or reviewed. Use excluded to leave them out.","minItems":1,"maxItems":6,"type":"array","items":{"type":"object","properties":{"activity":{"type":"string","enum":["messages","tags","notes","projects","resumes","reviews"],"description":"What your Recruiter team did with them."},"withinDays":{"type":"integer","minimum":1,"maximum":3650,"description":"How many days back to look."},"priority":{"description":"required (the default): results must match it. preferred: ranks matches higher without leaving others out. excluded: leaves matches out.","type":"string","enum":["required","preferred","excluded"]}},"required":["activity","withinDays"]}},"notes":{"description":"Text in the notes your Recruiter team left on them.","minItems":1,"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":256,"description":"Free text to match."}},"hiringProjects":{"description":"Only people in these Recruiter projects. Ids with type=HIRING_PROJECTS and service=recruiter.","minItems":1,"maxItems":20,"type":"array","items":{"type":"string","pattern":"^\\d+$"}},"excludedHiringProjects":{"description":"Leave out people already in these Recruiter projects.","minItems":1,"maxItems":20,"type":"array","items":{"type":"string","pattern":"^\\d+$"}},"hidePreviouslyViewedDays":{"description":"Leave out people this seat viewed in the last so many days.","type":"integer","minimum":1,"maximum":365},"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":{"memberUrn":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"urn:li:member:<number>, the same for this person across Classic, Sales Navigator and Recruiter."},"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"}]},"industry":{"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"},"recruiterCandidateId":{"anyOf":[{"type":"string"},{"type":"null"}]},"canSendInMail":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"True when this Recruiter seat can InMail them."},"currentPositions":{"type":"array","items":{"type":"object","properties":{"companyName":{"anyOf":[{"type":"string"},{"type":"null"}]},"companyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"companyUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"jobTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"location":{"anyOf":[{"type":"string"},{"type":"null"}]},"industries":{"type":"array","items":{"type":"string"}},"start":{"anyOf":[{"type":"object","properties":{"year":{"anyOf":[{"type":"number"},{"type":"null"}]},"month":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["year","month"],"additionalProperties":false},{"type":"null"}]},"end":{"anyOf":[{"type":"object","properties":{"year":{"anyOf":[{"type":"number"},{"type":"null"}]},"month":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["year","month"],"additionalProperties":false},{"type":"null"}]},"tenureAtRole":{"anyOf":[{"type":"object","properties":{"years":{"anyOf":[{"type":"number"},{"type":"null"}]},"months":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["years","months"],"additionalProperties":false},{"type":"null"}]},"tenureAtCompany":{"anyOf":[{"type":"object","properties":{"years":{"anyOf":[{"type":"number"},{"type":"null"}]},"months":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["years","months"],"additionalProperties":false},{"type":"null"}]}},"required":["companyName","companyId","companyUrl","jobTitle","description","location","industries","start","end","tenureAtRole","tenureAtCompany"],"additionalProperties":false},"description":"In the order LinkedIn lists them, which is not guaranteed to be by date. companyName and jobTitle come from the first."},"workExperience":{"type":"array","items":{"type":"object","properties":{"companyName":{"anyOf":[{"type":"string"},{"type":"null"}]},"jobTitle":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["companyName","jobTitle"],"additionalProperties":false},"description":"Latest first."}},"required":["memberUrn","publicIdentifier","profileUrl","fullName","headline","location","industry","companyName","jobTitle","imageUrl","imageUrlLarge","degree","invitationPending","recruiterCandidateId","canSendInMail","currentPositions","workExperience"],"additionalProperties":false}},"cursor":{"anyOf":[{"type":"string"},{"type":"null"}]},"totalCount":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"All matches across pages, when LinkedIn reports it. Sales Navigator does; Classic does not."},"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."},"minWaitSeconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"The least time in seconds between two of this action on the account. Null when it has no minimum wait."}},"required":["hour","day","week","minWaitSeconds"],"additionalProperties":false,"description":"Remaining allowance for this action on the connected account across hourly, daily, and weekly windows, and its minimum wait. 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":["hits","cursor","totalCount","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/messages":{"post":{"tags":["LinkedIn"],"operationId":"sendLinkedinMessage","summary":"Send a LinkedIn message","description":"Sends a LinkedIn message. Pass identity to message a person in your LinkedIn conversation with them; only first-degree connections can receive one, so check isConnected on the profile first and send an InMail otherwise. Pass conversationId to send into a conversation in the account's LinkedIn inbox, including one another account started from Sales Navigator or Recruiter: answering it needs no seat, and it stays in that conversation. Counts against the linkedin_message limits. The messagingChannel field is deprecated: send from Sales Navigator with POST /api/v1/linkedin/sales-navigator/messages. 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"},"conversationId":{"type":"string","minLength":1,"description":"Send into this conversation: a conversationId from the conversations listing. Pass it or identity, not both."},"identity":{"description":"Send to this person, in your LinkedIn conversation with them: user id (ACoAAA…) or public identifier. Pass it or conversationId, not both.","type":"string","minLength":1},"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"]}},"messagingChannel":{"default":"linkedin","description":"Deprecated: send from Sales Navigator with POST /api/v1/linkedin/sales-navigator/messages instead. \"linkedin_sales_navigator\" sends from Sales Navigator, in the lead's chat there; the lead must be a connection, and the account needs Sales Navigator. It counts against the linkedin_sales_navigator_message limits. Works with identity only.","deprecated":true,"type":"string","enum":["linkedin","linkedin_sales_navigator"]}},"required":["connectedAccountId","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."},"minWaitSeconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"The least time in seconds between two of this action on the account. Null when it has no minimum wait."}},"required":["hour","day","week","minWaitSeconds"],"additionalProperties":false,"description":"Remaining allowance for this action on the connected account across hourly, daily, and weekly windows, and its minimum wait. 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 LinkedIn 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}},"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."},"minWaitSeconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"The least time in seconds between two of this action on the account. Null when it has no minimum wait."}},"required":["hour","day","week","minWaitSeconds"],"additionalProperties":false,"description":"Remaining allowance for this action on the connected account across hourly, daily, and weekly windows, and its minimum wait. 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":["messages","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":{"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"}]},"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."},"minWaitSeconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"The least time in seconds between two of this action on the account. Null when it has no minimum wait."}},"required":["hour","day","week","minWaitSeconds"],"additionalProperties":false,"description":"Remaining allowance for this action on the connected account across hourly, daily, and weekly windows, and its minimum wait. 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":["invitations","nextCursor","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"}}}}}},"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."},"minWaitSeconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"The least time in seconds between two of this action on the account. Null when it has no minimum wait."}},"required":["hour","day","week","minWaitSeconds"],"additionalProperties":false,"description":"Remaining allowance for this action on the connected account across hourly, daily, and weekly windows, and its minimum wait. 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."},"minWaitSeconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"The least time in seconds between two of this action on the account. Null when it has no minimum wait."}},"required":["hour","day","week","minWaitSeconds"],"additionalProperties":false,"description":"Remaining allowance for this action on the connected account across hourly, daily, and weekly windows, and its minimum wait. 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"}]},"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."},"minWaitSeconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"The least time in seconds between two of this action on the account. Null when it has no minimum wait."}},"required":["hour","day","week","minWaitSeconds"],"additionalProperties":false,"description":"Remaining allowance for this action on the connected account across hourly, daily, and weekly windows, and its minimum wait. 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":["relations","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/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},"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."},"minWaitSeconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"The least time in seconds between two of this action on the account. Null when it has no minimum wait."}},"required":["hour","day","week","minWaitSeconds"],"additionalProperties":false,"description":"Remaining allowance for this action on the connected account across hourly, daily, and weekly windows, and its minimum wait. 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":["company","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/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"}]},"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."},"minWaitSeconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"The least time in seconds between two of this action on the account. Null when it has no minimum wait."}},"required":["hour","day","week","minWaitSeconds"],"additionalProperties":false,"description":"Remaining allowance for this action on the connected account across hourly, daily, and weekly windows, and its minimum wait. 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":["jobs","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/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"}]},"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."},"minWaitSeconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"The least time in seconds between two of this action on the account. Null when it has no minimum wait."}},"required":["hour","day","week","minWaitSeconds"],"additionalProperties":false,"description":"Remaining allowance for this action on the connected account across hourly, daily, and weekly windows, and its minimum wait. 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":["jobs","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/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},"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."},"minWaitSeconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"The least time in seconds between two of this action on the account. Null when it has no minimum wait."}},"required":["hour","day","week","minWaitSeconds"],"additionalProperties":false,"description":"Remaining allowance for this action on the connected account across hourly, daily, and weekly windows, and its minimum wait. 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":["job","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/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"}]},"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."},"minWaitSeconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"The least time in seconds between two of this action on the account. Null when it has no minimum wait."}},"required":["hour","day","week","minWaitSeconds"],"additionalProperties":false,"description":"Remaining allowance for this action on the connected account across hourly, daily, and weekly windows, and its minimum wait. 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":["companies","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/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"}]},"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."},"minWaitSeconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"The least time in seconds between two of this action on the account. Null when it has no minimum wait."}},"required":["hour","day","week","minWaitSeconds"],"additionalProperties":false,"description":"Remaining allowance for this action on the connected account across hourly, daily, and weekly windows, and its minimum wait. 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":["posts","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/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"}]},"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."},"minWaitSeconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"The least time in seconds between two of this action on the account. Null when it has no minimum wait."}},"required":["hour","day","week","minWaitSeconds"],"additionalProperties":false,"description":"Remaining post-view allowance after this listing. Resolving a person or company handle also spends one profile-view or company-view unit, which is not reflected here."},"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","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}":{"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},"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."},"minWaitSeconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"The least time in seconds between two of this action on the account. Null when it has no minimum wait."}},"required":["hour","day","week","minWaitSeconds"],"additionalProperties":false,"description":"Remaining allowance for this action on the connected account across hourly, daily, and weekly windows, and its minimum wait. 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":["post","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}/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"}]},"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."},"minWaitSeconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"The least time in seconds between two of this action on the account. Null when it has no minimum wait."}},"required":["hour","day","week","minWaitSeconds"],"additionalProperties":false,"description":"Remaining allowance for this action on the connected account across hourly, daily, and weekly windows, and its minimum wait. 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":["comments","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"}}}}}},"post":{"tags":["LinkedIn"],"operationId":"commentOnLinkedinPost","summary":"Comment on a LinkedIn 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."},"minWaitSeconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"The least time in seconds between two of this action on the account. Null when it has no minimum wait."}},"required":["hour","day","week","minWaitSeconds"],"additionalProperties":false,"description":"Remaining allowance for this action on the connected account across hourly, daily, and weekly windows, and its minimum wait. 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"}]},"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."},"minWaitSeconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"The least time in seconds between two of this action on the account. Null when it has no minimum wait."}},"required":["hour","day","week","minWaitSeconds"],"additionalProperties":false,"description":"Remaining allowance for this action on the connected account across hourly, daily, and weekly windows, and its minimum wait. 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":["reactions","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"}}}}}},"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."},"minWaitSeconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"The least time in seconds between two of this action on the account. Null when it has no minimum wait."}},"required":["hour","day","week","minWaitSeconds"],"additionalProperties":false,"description":"Remaining allowance for this action on the connected account across hourly, daily, and weekly windows, and its minimum wait. 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/sales-navigator/messages":{"post":{"tags":["LinkedIn"],"operationId":"sendLinkedinSalesNavigatorMessage","summary":"Send a Sales Navigator message","description":"Sends a message from Sales Navigator. Pass conversationId to send into a conversation that is in the account's Sales Navigator inbox, or identity to send to a person in the account's Sales Navigator conversation with them, which opens one when there is none; opening one only reaches a connection, so send an InMail otherwise. Sales Navigator keeps its conversations apart from LinkedIn ones. Requires a Sales Navigator seat. Counts against the linkedin_sales_navigator_message limits. After an InMail, no follow-up is allowed until the person answers it.","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"},"conversationId":{"description":"Send into this Sales Navigator conversation of the account: a conversationId from the conversations listing. Pass it or identity, not both.","type":"string","minLength":1},"identity":{"description":"Send to this person, in the account's Sales Navigator conversation with them, or a new one: user id (ACoAAA…) or public identifier. Pass it or conversationId, not both.","type":"string","minLength":1},"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","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."},"minWaitSeconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"The least time in seconds between two of this action on the account. Null when it has no minimum wait."}},"required":["hour","day","week","minWaitSeconds"],"additionalProperties":false,"description":"Remaining allowance for this action on the connected account across hourly, daily, and weekly windows, and its minimum wait. 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/sales-navigator/inmails":{"post":{"tags":["LinkedIn"],"operationId":"sendLinkedinSalesNavigatorInMail","summary":"Send a Sales Navigator InMail","description":"Opens a Sales Navigator conversation with a person with an InMail. Does not require a connection. Reaches in-network recipients and out-of-network Open Profiles. Costs one Sales Navigator credit unless LinkedIn treats the recipient as Open Profile. Requires a Sales Navigator seat. Counts against the linkedin_inmail limits. Follow up with POST /api/v1/linkedin/sales-navigator/messages and the returned conversationId once the person answers. 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."},"minWaitSeconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"The least time in seconds between two of this action on the account. Null when it has no minimum wait."}},"required":["hour","day","week","minWaitSeconds"],"additionalProperties":false,"description":"Remaining allowance for this action on the connected account across hourly, daily, and weekly windows, and its minimum wait. 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/sales-navigator/inmails/balance":{"get":{"tags":["LinkedIn"],"operationId":"getLinkedinSalesNavigatorInMailBalance","summary":"Get remaining Sales Navigator InMail credits","description":"Sales Navigator InMail credits left on the connected account. They come with the Sales Navigator seat and renew monthly, separately from the daily action allowances. Requires a Sales Navigator seat.","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 Sales Navigator 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."},"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."},"minWaitSeconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"The least time in seconds between two of this action on the account. Null when it has no minimum wait."}},"required":["hour","day","week","minWaitSeconds"],"additionalProperties":false,"description":"Remaining allowance for this action on the connected account across hourly, daily, and weekly windows, and its minimum wait. 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":["balance","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/recruiter/messages":{"post":{"tags":["LinkedIn"],"operationId":"sendLinkedinRecruiterMessage","summary":"Send a Recruiter message","description":"Sends a message from LinkedIn Recruiter. Pass conversationId to send into a conversation that is in the account's Recruiter inbox, or identity to send to a person in the account's Recruiter conversation with them, which opens one when there is none; opening one only reaches a connection, so send a Recruiter InMail otherwise. Recruiter keeps its conversations apart from LinkedIn ones. Requires a Recruiter seat. Counts against the linkedin_recruiter_message limits. After an InMail, no follow-up is allowed until the person answers it.","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"},"conversationId":{"description":"Send into this Recruiter conversation of the account: a conversationId from the conversations listing. Pass it or identity, not both.","type":"string","minLength":1},"identity":{"description":"Send to this person, in the account's Recruiter conversation with them, or a new one: user id (ACoAAA…) or public identifier. Pass it or conversationId, not both.","type":"string","minLength":1},"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","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."},"minWaitSeconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"The least time in seconds between two of this action on the account. Null when it has no minimum wait."}},"required":["hour","day","week","minWaitSeconds"],"additionalProperties":false,"description":"Remaining allowance for this action on the connected account across hourly, daily, and weekly windows, and its minimum wait. 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/recruiter/inmails":{"post":{"tags":["LinkedIn"],"operationId":"sendLinkedinRecruiterInMail","summary":"Send a Recruiter InMail","description":"Opens a Recruiter conversation with a person with an InMail. Does not require a connection. Costs one Recruiter credit, which LinkedIn refunds when the person answers in time; a first-degree connection costs none. Requires a Recruiter seat. Counts against the linkedin_recruiter_inmail limits. Follow up with POST /api/v1/linkedin/recruiter/messages and the returned conversationId once the person answers. 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."},"minWaitSeconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"The least time in seconds between two of this action on the account. Null when it has no minimum wait."}},"required":["hour","day","week","minWaitSeconds"],"additionalProperties":false,"description":"Remaining allowance for this action on the connected account across hourly, daily, and weekly windows, and its minimum wait. 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/recruiter/inmails/balance":{"get":{"tags":["LinkedIn"],"operationId":"getLinkedinRecruiterInMailBalance","summary":"Get remaining Recruiter InMail credits","description":"Recruiter InMail credits left on the connected account. They come with the Recruiter seat, apart from Sales Navigator ones. Requires a Recruiter seat.","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 Recruiter InMail credits.","content":{"application/json":{"schema":{"type":"object","properties":{"balance":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Recruiter InMail credits left on this account."},"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."},"minWaitSeconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"The least time in seconds between two of this action on the account. Null when it has no minimum wait."}},"required":["hour","day","week","minWaitSeconds"],"additionalProperties":false,"description":"Remaining allowance for this action on the connected account across hourly, daily, and weekly windows, and its minimum wait. 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":["balance","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 (deprecated)","deprecated":true,"description":"Deprecated: use POST /api/v1/linkedin/sales-navigator/inmails, which does the same. Sends a Sales Navigator InMail: it always uses Sales Navigator and its credits, and requires a Sales Navigator seat. 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. For a Recruiter InMail, use POST /api/v1/linkedin/recruiter/inmails.","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."},"minWaitSeconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"The least time in seconds between two of this action on the account. Null when it has no minimum wait."}},"required":["hour","day","week","minWaitSeconds"],"additionalProperties":false,"description":"Remaining allowance for this action on the connected account across hourly, daily, and weekly windows, and its minimum wait. 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 Sales Navigator InMail credits (deprecated)","deprecated":true,"description":"Deprecated: use GET /api/v1/linkedin/sales-navigator/inmails/balance, which does the same. Returns the Sales Navigator InMail credits left on the connected account, and requires a Sales Navigator seat. For Recruiter credits, use GET /api/v1/linkedin/recruiter/inmails/balance.","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 Sales Navigator 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."},"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."},"minWaitSeconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"The least time in seconds between two of this action on the account. Null when it has no minimum wait."}},"required":["hour","day","week","minWaitSeconds"],"additionalProperties":false,"description":"Remaining allowance for this action on the connected account across hourly, daily, and weekly windows, and its minimum wait. 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":["balance","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":{"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"}]},"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."},"minWaitSeconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"The least time in seconds between two of this action on the account. Null when it has no minimum wait."}},"required":["hour","day","week","minWaitSeconds"],"additionalProperties":false,"description":"Remaining allowance for this action on the connected account across hourly, daily, and weekly windows, and its minimum wait. 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":["conversations","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/linkedin/followers":{"get":{"tags":["LinkedIn"],"operationId":"listLinkedinFollowers","summary":"List LinkedIn 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"}]},"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."},"minWaitSeconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"The least time in seconds between two of this action on the account. Null when it has no minimum wait."}},"required":["hour","day","week","minWaitSeconds"],"additionalProperties":false,"description":"Remaining allowance for this action on the connected account across hourly, daily, and weekly windows, and its minimum wait. 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":["users","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/linkedin/following":{"get":{"tags":["LinkedIn"],"operationId":"listLinkedinFollowing","summary":"List followed LinkedIn 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"}]},"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."},"minWaitSeconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"The least time in seconds between two of this action on the account. Null when it has no minimum wait."}},"required":["hour","day","week","minWaitSeconds"],"additionalProperties":false,"description":"Remaining allowance for this action on the connected account across hourly, daily, and weekly windows, and its minimum wait. 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":["users","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/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"}]},"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."},"minWaitSeconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"The least time in seconds between two of this action on the account. Null when it has no minimum wait."}},"required":["hour","day","week","minWaitSeconds"],"additionalProperties":false,"description":"Remaining allowance for this action on the connected account across hourly, daily, and weekly windows, and its minimum wait. 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":["invitations","nextCursor","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/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."},"minWaitSeconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"The least time in seconds between two of this action on the account. Null when it has no minimum wait."}},"required":["hour","day","week","minWaitSeconds"],"additionalProperties":false,"description":"Remaining allowance for this action on the connected account across hourly, daily, and weekly windows, and its minimum wait. 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","HIRING_PROJECTS"],"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. Recruiter takes LOCATION, INDUSTRY, SCHOOL, JOB_TITLE, DEPARTMENT, GROUPS, HIRING_PROJECTS, 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. Recruiter takes LOCATION, INDUSTRY, SCHOOL, JOB_TITLE, DEPARTMENT, GROUPS, HIRING_PROJECTS, 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, lists and hiring projects 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, lists and hiring projects 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","recruiter"]},"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"}]},"remainingUsage":{"description":"Remaining allowance for resolving search filters. Omitted when type is LANGUAGE, which is served locally and does not consume usage.","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."},"minWaitSeconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"The least time in seconds between two of this action on the account. Null when it has no minimum wait."}},"required":["hour","day","week","minWaitSeconds"],"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":["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."},"minWaitSeconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"The least time in seconds between two of this action on the account. Null when it has no minimum wait."}},"required":["hour","day","week","minWaitSeconds"],"additionalProperties":false,"description":"Remaining allowance for this action on the connected account across hourly, daily, and weekly windows, and its minimum wait. 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"}}}},"429":{"description":"The call came before the minimum wait for this action ended, or the account has reached its limit. For the minimum wait, `data.reason` is `min_wait`, `data.minWaitSeconds` is how long the wait is, and `data.retryAfterSeconds`, also sent as the Retry-After header, is how much of it is left. For a limit, `data.period` names the window: `hour`, `day` or `week`, and `data.retryAt` says when to try again.","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},"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."},"minWaitSeconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"The least time in seconds between two of this action on the account. Null when it has no minimum wait."}},"required":["hour","day","week","minWaitSeconds"],"additionalProperties":false,"description":"Remaining allowance for this action on the connected account across hourly, daily, and weekly windows, and its minimum wait. 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"}}}},"429":{"description":"The call came before the minimum wait for this action ended, or the account has reached its limit. For the minimum wait, `data.reason` is `min_wait`, `data.minWaitSeconds` is how long the wait is, and `data.retryAfterSeconds`, also sent as the Retry-After header, is how much of it is left. For a limit, `data.period` names the window: `hour`, `day` or `week`, and `data.retryAt` says when to try again.","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."},"minWaitSeconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"The least time in seconds between two of this action on the account. Null when it has no minimum wait."}},"required":["hour","day","week","minWaitSeconds"],"additionalProperties":false,"description":"Remaining allowance for this action on the connected account across hourly, daily, and weekly windows, and its minimum wait. 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"}}}},"429":{"description":"The call came before the minimum wait for this action ended, or the account has reached its limit. For the minimum wait, `data.reason` is `min_wait`, `data.minWaitSeconds` is how long the wait is, and `data.retryAfterSeconds`, also sent as the Retry-After header, is how much of it is left. For a limit, `data.period` names the window: `hour`, `day` or `week`, and `data.retryAt` says when to try again.","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."},"minWaitSeconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"The least time in seconds between two of this action on the account. Null when it has no minimum wait."}},"required":["hour","day","week","minWaitSeconds"],"additionalProperties":false,"description":"Remaining allowance for this action on the connected account across hourly, daily, and weekly windows, and its minimum wait. 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"}}}},"429":{"description":"The call came before the minimum wait for this action ended, or the account has reached its limit. For the minimum wait, `data.reason` is `min_wait`, `data.minWaitSeconds` is how long the wait is, and `data.retryAfterSeconds`, also sent as the Retry-After header, is how much of it is left. For a limit, `data.period` names the window: `hour`, `day` or `week`, and `data.retryAt` says when to try again.","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"}]},"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."},"minWaitSeconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"The least time in seconds between two of this action on the account. Null when it has no minimum wait."}},"required":["hour","day","week","minWaitSeconds"],"additionalProperties":false,"description":"Remaining allowance for this action on the connected account across hourly, daily, and weekly windows, and its minimum wait. 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":["conversations","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"}}}},"429":{"description":"The call came before the minimum wait for this action ended, or the account has reached its limit. For the minimum wait, `data.reason` is `min_wait`, `data.minWaitSeconds` is how long the wait is, and `data.retryAfterSeconds`, also sent as the Retry-After header, is how much of it is left. For a limit, `data.period` names the window: `hour`, `day` or `week`, and `data.retryAt` says when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/instagram/conversations/{conversationId}/messages":{"get":{"tags":["Instagram"],"operationId":"listInstagramConversationMessages","summary":"List messages in an Instagram 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}},"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."},"minWaitSeconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"The least time in seconds between two of this action on the account. Null when it has no minimum wait."}},"required":["hour","day","week","minWaitSeconds"],"additionalProperties":false,"description":"Remaining allowance for this action on the connected account across hourly, daily, and weekly windows, and its minimum wait. 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":["messages","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"}}}},"429":{"description":"The call came before the minimum wait for this action ended, or the account has reached its limit. For the minimum wait, `data.reason` is `min_wait`, `data.minWaitSeconds` is how long the wait is, and `data.retryAfterSeconds`, also sent as the Retry-After header, is how much of it is left. For a limit, `data.period` names the window: `hour`, `day` or `week`, and `data.retryAt` says when to try again.","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}},"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."},"minWaitSeconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"The least time in seconds between two of this action on the account. Null when it has no minimum wait."}},"required":["hour","day","week","minWaitSeconds"],"additionalProperties":false,"description":"Remaining allowance for this action on the connected account across hourly, daily, and weekly windows, and its minimum wait. 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":["participants","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"}}}},"429":{"description":"The call came before the minimum wait for this action ended, or the account has reached its limit. For the minimum wait, `data.reason` is `min_wait`, `data.minWaitSeconds` is how long the wait is, and `data.retryAfterSeconds`, also sent as the Retry-After header, is how much of it is left. For a limit, `data.period` names the window: `hour`, `day` or `week`, and `data.retryAt` says when to try again.","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"}]},"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."},"minWaitSeconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"The least time in seconds between two of this action on the account. Null when it has no minimum wait."}},"required":["hour","day","week","minWaitSeconds"],"additionalProperties":false,"description":"Remaining allowance for this action on the connected account across hourly, daily, and weekly windows, and its minimum wait. 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":["posts","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"}}}},"429":{"description":"The call came before the minimum wait for this action ended, or the account has reached its limit. For the minimum wait, `data.reason` is `min_wait`, `data.minWaitSeconds` is how long the wait is, and `data.retryAfterSeconds`, also sent as the Retry-After header, is how much of it is left. For a limit, `data.period` names the window: `hour`, `day` or `week`, and `data.retryAt` says when to try again.","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."},"minWaitSeconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"The least time in seconds between two of this action on the account. Null when it has no minimum wait."}},"required":["hour","day","week","minWaitSeconds"],"additionalProperties":false,"description":"Remaining allowance for this action on the connected account across hourly, daily, and weekly windows, and its minimum wait. 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"}}}},"429":{"description":"The call came before the minimum wait for this action ended, or the account has reached its limit. For the minimum wait, `data.reason` is `min_wait`, `data.minWaitSeconds` is how long the wait is, and `data.retryAfterSeconds`, also sent as the Retry-After header, is how much of it is left. For a limit, `data.period` names the window: `hour`, `day` or `week`, and `data.retryAt` says when to try again.","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},"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."},"minWaitSeconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"The least time in seconds between two of this action on the account. Null when it has no minimum wait."}},"required":["hour","day","week","minWaitSeconds"],"additionalProperties":false,"description":"Remaining allowance for this action on the connected account across hourly, daily, and weekly windows, and its minimum wait. 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":["post","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"}}}},"429":{"description":"The call came before the minimum wait for this action ended, or the account has reached its limit. For the minimum wait, `data.reason` is `min_wait`, `data.minWaitSeconds` is how long the wait is, and `data.retryAfterSeconds`, also sent as the Retry-After header, is how much of it is left. For a limit, `data.period` names the window: `hour`, `day` or `week`, and `data.retryAt` says when to try again.","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"}]},"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."},"minWaitSeconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"The least time in seconds between two of this action on the account. Null when it has no minimum wait."}},"required":["hour","day","week","minWaitSeconds"],"additionalProperties":false,"description":"Remaining allowance for this action on the connected account across hourly, daily, and weekly windows, and its minimum wait. 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":["comments","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"}}}},"429":{"description":"The call came before the minimum wait for this action ended, or the account has reached its limit. For the minimum wait, `data.reason` is `min_wait`, `data.minWaitSeconds` is how long the wait is, and `data.retryAfterSeconds`, also sent as the Retry-After header, is how much of it is left. For a limit, `data.period` names the window: `hour`, `day` or `week`, and `data.retryAt` says when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"post":{"tags":["Instagram"],"operationId":"commentOnInstagramPost","summary":"Comment on an Instagram 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."},"minWaitSeconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"The least time in seconds between two of this action on the account. Null when it has no minimum wait."}},"required":["hour","day","week","minWaitSeconds"],"additionalProperties":false,"description":"Remaining allowance for this action on the connected account across hourly, daily, and weekly windows, and its minimum wait. 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"}}}},"429":{"description":"The call came before the minimum wait for this action ended, or the account has reached its limit. For the minimum wait, `data.reason` is `min_wait`, `data.minWaitSeconds` is how long the wait is, and `data.retryAfterSeconds`, also sent as the Retry-After header, is how much of it is left. For a limit, `data.period` names the window: `hour`, `day` or `week`, and `data.retryAt` says when to try again.","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"}]},"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."},"minWaitSeconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"The least time in seconds between two of this action on the account. Null when it has no minimum wait."}},"required":["hour","day","week","minWaitSeconds"],"additionalProperties":false,"description":"Remaining allowance for this action on the connected account across hourly, daily, and weekly windows, and its minimum wait. 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":["users","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"}}}},"429":{"description":"The call came before the minimum wait for this action ended, or the account has reached its limit. For the minimum wait, `data.reason` is `min_wait`, `data.minWaitSeconds` is how long the wait is, and `data.retryAfterSeconds`, also sent as the Retry-After header, is how much of it is left. For a limit, `data.period` names the window: `hour`, `day` or `week`, and `data.retryAt` says when to try again.","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."},"minWaitSeconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"The least time in seconds between two of this action on the account. Null when it has no minimum wait."}},"required":["hour","day","week","minWaitSeconds"],"additionalProperties":false,"description":"Remaining allowance for this action on the connected account across hourly, daily, and weekly windows, and its minimum wait. 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"}}}},"429":{"description":"The call came before the minimum wait for this action ended, or the account has reached its limit. For the minimum wait, `data.reason` is `min_wait`, `data.minWaitSeconds` is how long the wait is, and `data.retryAfterSeconds`, also sent as the Retry-After header, is how much of it is left. For a limit, `data.period` names the window: `hour`, `day` or `week`, and `data.retryAt` says when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/instagram/followers":{"get":{"tags":["Instagram"],"operationId":"listInstagramFollowers","summary":"List Instagram 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"}]},"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."},"minWaitSeconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"The least time in seconds between two of this action on the account. Null when it has no minimum wait."}},"required":["hour","day","week","minWaitSeconds"],"additionalProperties":false,"description":"Remaining allowance for this action on the connected account across hourly, daily, and weekly windows, and its minimum wait. 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":["users","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"}}}},"429":{"description":"The call came before the minimum wait for this action ended, or the account has reached its limit. For the minimum wait, `data.reason` is `min_wait`, `data.minWaitSeconds` is how long the wait is, and `data.retryAfterSeconds`, also sent as the Retry-After header, is how much of it is left. For a limit, `data.period` names the window: `hour`, `day` or `week`, and `data.retryAt` says when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/instagram/following":{"get":{"tags":["Instagram"],"operationId":"listInstagramFollowing","summary":"List followed Instagram 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"}]},"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."},"minWaitSeconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"The least time in seconds between two of this action on the account. Null when it has no minimum wait."}},"required":["hour","day","week","minWaitSeconds"],"additionalProperties":false,"description":"Remaining allowance for this action on the connected account across hourly, daily, and weekly windows, and its minimum wait. 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":["users","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"}}}},"429":{"description":"The call came before the minimum wait for this action ended, or the account has reached its limit. For the minimum wait, `data.reason` is `min_wait`, `data.minWaitSeconds` is how long the wait is, and `data.retryAfterSeconds`, also sent as the Retry-After header, is how much of it is left. For a limit, `data.period` names the window: `hour`, `day` or `week`, and `data.retryAt` says when to try again.","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."},"minWaitSeconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"The least time in seconds between two of this action on the account. Null when it has no minimum wait."}},"required":["hour","day","week","minWaitSeconds"],"additionalProperties":false,"description":"Remaining allowance for this action on the connected account across hourly, daily, and weekly windows, and its minimum wait. 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"}}}},"429":{"description":"The call came before the minimum wait for this action ended, or the account has reached its limit. For the minimum wait, `data.reason` is `min_wait`, `data.minWaitSeconds` is how long the wait is, and `data.retryAfterSeconds`, also sent as the Retry-After header, is how much of it is left. For a limit, `data.period` names the window: `hour`, `day` or `week`, and `data.retryAt` says when to try again.","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},"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."},"minWaitSeconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"The least time in seconds between two of this action on the account. Null when it has no minimum wait."}},"required":["hour","day","week","minWaitSeconds"],"additionalProperties":false,"description":"Remaining allowance for this action on the connected account across hourly, daily, and weekly windows, and its minimum wait. 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":["unfollowed","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"}}}},"429":{"description":"The call came before the minimum wait for this action ended, or the account has reached its limit. For the minimum wait, `data.reason` is `min_wait`, `data.minWaitSeconds` is how long the wait is, and `data.retryAfterSeconds`, also sent as the Retry-After header, is how much of it is left. For a limit, `data.period` names the window: `hour`, `day` or `week`, and `data.retryAt` says when to try again.","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, with the same hour, day and week 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, with the same hour, day and week 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 workspace files shared with this organization, then your private files. Each item includes scope. A user file can be attached on your own LinkedIn send. Campaign steps can attach workspace files only. 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."},"scope":{"type":"string","enum":["workspace","user"],"description":"workspace files are shared with the organization. user files are visible only to the person who uploaded them."},"filename":{"type":"string"},"contentType":{"type":"string"},"size":{"type":"integer","minimum":0,"maximum":9007199254740991},"createdAt":{"type":"string","format":"date-time"}},"required":["url","scope","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 file 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. Omit scope for a workspace file that teammates and campaigns can attach. Pass scope \"user\" to keep it visible only to you. Then pass the returned url when sending a LinkedIn message or InMail. Campaign steps can attach workspace files only. downloadUrl is a preview link; do not pass it to LinkedIn.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"scope":{"description":"workspace shares the file with the organization. user keeps it visible only to you. Omit for a workspace file. Campaign steps can attach workspace files only.","type":"string","enum":["workspace","user"]},"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"}]},"lead":{"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)$"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"companyName":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"identities":{"type":"array","items":{"type":"object","properties":{"channel":{"type":"string","enum":["linkedin","instagram"]},"channelIdentity":{"type":"string"}},"required":["channel","channelIdentity"],"additionalProperties":false}}},"required":["id","firstName","lastName","email","companyName","imageUrl","identities"],"additionalProperties":false},{"type":"null"}],"description":"The suppressed lead. Null for company suppressions."},"createdByUser":{"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"}},"required":["id","name","email"],"additionalProperties":false,"description":"A member of this workspace"},{"type":"null"}]}},"required":["id","ownerOrgId","scope","leadId","companyDomain","reason","note","expiresAt","createdBy","createdAt","deletedAt","deletedBy","lead","createdByUser"],"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/search":{"post":{"tags":["Suppressions"],"operationId":"searchSuppressions","summary":"Search suppressions","description":"Find suppressions by person, company domain, note, or reason. Every word in query must appear. Suppressions whose person or domain starts with the query come first, then by email. Pass nextCursor as cursor, with the same query, for the next page. Use the id with Delete a suppression.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"query":{"type":"string","minLength":1,"maxLength":200,"description":"Text to match. Every word must appear in the record."},"cursor":{"type":"string","minLength":1},"limit":{"type":"integer","minimum":1,"maximum":100}},"required":["query"]}}}},"responses":{"200":{"description":"Matching suppressions.","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"}]},"lead":{"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)$"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"companyName":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"identities":{"type":"array","items":{"type":"object","properties":{"channel":{"type":"string","enum":["linkedin","instagram"]},"channelIdentity":{"type":"string"}},"required":["channel","channelIdentity"],"additionalProperties":false}}},"required":["id","firstName","lastName","email","companyName","imageUrl","identities"],"additionalProperties":false},{"type":"null"}],"description":"The suppressed lead. Null for company suppressions."},"createdByUser":{"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"}},"required":["id","name","email"],"additionalProperties":false,"description":"A member of this workspace"},{"type":"null"}]}},"required":["id","ownerOrgId","scope","leadId","companyDomain","reason","note","expiresAt","createdBy","createdAt","deletedAt","deletedBy","lead","createdByUser"],"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"}}}}}}},"/api/v1/suppressions/check":{"post":{"tags":["Suppressions"],"operationId":"checkSuppressions","summary":"Check people and companies against suppressions","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."},"eventTypes":{"anyOf":[{"type":"string","const":"all"},{"minItems":1,"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. Deprecated: use `draft_created`, which is sent alongside it."},{"type":"string","const":"task_approved","description":"A held step was approved. Deprecated: use `draft_approved`, which is sent alongside it."},{"type":"string","const":"draft_created","description":"A drafted message is waiting for a member to review it, created through the API or held by a campaign step."},{"type":"string","const":"draft_approved","description":"A member approved a draft, possibly after editing it (`data.edited`). The message itself is the `linkedin_message_sent` (also for an InMail), `linkedin_invite_sent` or `instagram_message_sent` event that follows, with the same `data.draftId`. An approved InMail to someone out of network without Open Profile goes out as a connection request without a note instead."},{"type":"string","const":"draft_discarded","description":"A draft will not be sent; `data.discardReason` says why."},{"type":"string","const":"draft_failed","description":"An approved draft could not be sent; `data.message` says why."},{"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, after hitting a limit, or by Needle after 10 failures in a row on Instagram (`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, headers or event types changed, or it was turned on again; `data.changedFields` lists which (`url`, `headers`, `eventTypes`, `enabled`)."},{"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_message_edited","description":"A LinkedIn message was edited. `data.text` is the new text and `data.messageId` names the message; its sent or received event keeps the original text."},{"type":"string","const":"linkedin_message_deleted","description":"A LinkedIn message was deleted. `data.messageId` names the message and `data.text` is what it said."},{"type":"string","const":"linkedin_message_reaction_added","description":"A reaction was added to a LinkedIn message. `data.reaction` is the emoji, `data.reactedBy` says who reacted, `data.messageId` names the message and `data.text` is what it said. LinkedIn reports no removals."},{"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_follow_accepted","description":"An Instagram follow request was accepted."},{"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_message_edited","description":"An Instagram message was edited. `data.text` is the new text and `data.messageId` names the message; its sent or received event keeps the original text."},{"type":"string","const":"instagram_message_deleted","description":"An Instagram message was deleted. `data.messageId` names the message and `data.text` is what it said."},{"type":"string","const":"instagram_message_reaction_added","description":"A reaction was added to an Instagram message. `data.reaction` is the emoji, `data.reactedBy` says who reacted, `data.messageId` names the message and `data.text` is what it said. Instagram reports no removals."},{"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."}]}}],"description":"The [event types](https://needle.app/docs/webhooks#event-types) this webhook gets. \"all\" means every type, also types added later. A list stays as it is: types added later are not sent until you add them."},"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."},"disabledAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When the webhook was turned off because your URL gave no 2xx answer for 3 days. Nothing is sent while it is off; turn it on with enabled: true. Null while it is on."},"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","eventTypes","lastAttemptAt","lastError","disabledAt","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":"Each webhook gets the event types it asks for, every type by default, 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"}},"eventTypes":{"description":"The event types this webhook gets: \"all\" (every type, also types added later) or a list. Left out, it is \"all\".","anyOf":[{"type":"string","const":"all"},{"minItems":1,"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. Deprecated: use `draft_created`, which is sent alongside it."},{"type":"string","const":"task_approved","description":"A held step was approved. Deprecated: use `draft_approved`, which is sent alongside it."},{"type":"string","const":"draft_created","description":"A drafted message is waiting for a member to review it, created through the API or held by a campaign step."},{"type":"string","const":"draft_approved","description":"A member approved a draft, possibly after editing it (`data.edited`). The message itself is the `linkedin_message_sent` (also for an InMail), `linkedin_invite_sent` or `instagram_message_sent` event that follows, with the same `data.draftId`. An approved InMail to someone out of network without Open Profile goes out as a connection request without a note instead."},{"type":"string","const":"draft_discarded","description":"A draft will not be sent; `data.discardReason` says why."},{"type":"string","const":"draft_failed","description":"An approved draft could not be sent; `data.message` says why."},{"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, after hitting a limit, or by Needle after 10 failures in a row on Instagram (`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, headers or event types changed, or it was turned on again; `data.changedFields` lists which (`url`, `headers`, `eventTypes`, `enabled`)."},{"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_message_edited","description":"A LinkedIn message was edited. `data.text` is the new text and `data.messageId` names the message; its sent or received event keeps the original text."},{"type":"string","const":"linkedin_message_deleted","description":"A LinkedIn message was deleted. `data.messageId` names the message and `data.text` is what it said."},{"type":"string","const":"linkedin_message_reaction_added","description":"A reaction was added to a LinkedIn message. `data.reaction` is the emoji, `data.reactedBy` says who reacted, `data.messageId` names the message and `data.text` is what it said. LinkedIn reports no removals."},{"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_follow_accepted","description":"An Instagram follow request was accepted."},{"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_message_edited","description":"An Instagram message was edited. `data.text` is the new text and `data.messageId` names the message; its sent or received event keeps the original text."},{"type":"string","const":"instagram_message_deleted","description":"An Instagram message was deleted. `data.messageId` names the message and `data.text` is what it said."},{"type":"string","const":"instagram_message_reaction_added","description":"A reaction was added to an Instagram message. `data.reaction` is the emoji, `data.reactedBy` says who reacted, `data.messageId` names the message and `data.text` is what it said. Instagram reports no removals."},{"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."}]}}]}},"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."},"eventTypes":{"anyOf":[{"type":"string","const":"all"},{"minItems":1,"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. Deprecated: use `draft_created`, which is sent alongside it."},{"type":"string","const":"task_approved","description":"A held step was approved. Deprecated: use `draft_approved`, which is sent alongside it."},{"type":"string","const":"draft_created","description":"A drafted message is waiting for a member to review it, created through the API or held by a campaign step."},{"type":"string","const":"draft_approved","description":"A member approved a draft, possibly after editing it (`data.edited`). The message itself is the `linkedin_message_sent` (also for an InMail), `linkedin_invite_sent` or `instagram_message_sent` event that follows, with the same `data.draftId`. An approved InMail to someone out of network without Open Profile goes out as a connection request without a note instead."},{"type":"string","const":"draft_discarded","description":"A draft will not be sent; `data.discardReason` says why."},{"type":"string","const":"draft_failed","description":"An approved draft could not be sent; `data.message` says why."},{"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, after hitting a limit, or by Needle after 10 failures in a row on Instagram (`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, headers or event types changed, or it was turned on again; `data.changedFields` lists which (`url`, `headers`, `eventTypes`, `enabled`)."},{"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_message_edited","description":"A LinkedIn message was edited. `data.text` is the new text and `data.messageId` names the message; its sent or received event keeps the original text."},{"type":"string","const":"linkedin_message_deleted","description":"A LinkedIn message was deleted. `data.messageId` names the message and `data.text` is what it said."},{"type":"string","const":"linkedin_message_reaction_added","description":"A reaction was added to a LinkedIn message. `data.reaction` is the emoji, `data.reactedBy` says who reacted, `data.messageId` names the message and `data.text` is what it said. LinkedIn reports no removals."},{"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_follow_accepted","description":"An Instagram follow request was accepted."},{"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_message_edited","description":"An Instagram message was edited. `data.text` is the new text and `data.messageId` names the message; its sent or received event keeps the original text."},{"type":"string","const":"instagram_message_deleted","description":"An Instagram message was deleted. `data.messageId` names the message and `data.text` is what it said."},{"type":"string","const":"instagram_message_reaction_added","description":"A reaction was added to an Instagram message. `data.reaction` is the emoji, `data.reactedBy` says who reacted, `data.messageId` names the message and `data.text` is what it said. Instagram reports no removals."},{"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."}]}}],"description":"The [event types](https://needle.app/docs/webhooks#event-types) this webhook gets. \"all\" means every type, also types added later. A list stays as it is: types added later are not sent until you add them."},"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."},"disabledAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When the webhook was turned off because your URL gave no 2xx answer for 3 days. Nothing is sent while it is off; turn it on with enabled: true. Null while it is on."},"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","eventTypes","lastAttemptAt","lastError","disabledAt","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."},"eventTypes":{"anyOf":[{"type":"string","const":"all"},{"minItems":1,"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. Deprecated: use `draft_created`, which is sent alongside it."},{"type":"string","const":"task_approved","description":"A held step was approved. Deprecated: use `draft_approved`, which is sent alongside it."},{"type":"string","const":"draft_created","description":"A drafted message is waiting for a member to review it, created through the API or held by a campaign step."},{"type":"string","const":"draft_approved","description":"A member approved a draft, possibly after editing it (`data.edited`). The message itself is the `linkedin_message_sent` (also for an InMail), `linkedin_invite_sent` or `instagram_message_sent` event that follows, with the same `data.draftId`. An approved InMail to someone out of network without Open Profile goes out as a connection request without a note instead."},{"type":"string","const":"draft_discarded","description":"A draft will not be sent; `data.discardReason` says why."},{"type":"string","const":"draft_failed","description":"An approved draft could not be sent; `data.message` says why."},{"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, after hitting a limit, or by Needle after 10 failures in a row on Instagram (`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, headers or event types changed, or it was turned on again; `data.changedFields` lists which (`url`, `headers`, `eventTypes`, `enabled`)."},{"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_message_edited","description":"A LinkedIn message was edited. `data.text` is the new text and `data.messageId` names the message; its sent or received event keeps the original text."},{"type":"string","const":"linkedin_message_deleted","description":"A LinkedIn message was deleted. `data.messageId` names the message and `data.text` is what it said."},{"type":"string","const":"linkedin_message_reaction_added","description":"A reaction was added to a LinkedIn message. `data.reaction` is the emoji, `data.reactedBy` says who reacted, `data.messageId` names the message and `data.text` is what it said. LinkedIn reports no removals."},{"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_follow_accepted","description":"An Instagram follow request was accepted."},{"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_message_edited","description":"An Instagram message was edited. `data.text` is the new text and `data.messageId` names the message; its sent or received event keeps the original text."},{"type":"string","const":"instagram_message_deleted","description":"An Instagram message was deleted. `data.messageId` names the message and `data.text` is what it said."},{"type":"string","const":"instagram_message_reaction_added","description":"A reaction was added to an Instagram message. `data.reaction` is the emoji, `data.reactedBy` says who reacted, `data.messageId` names the message and `data.text` is what it said. Instagram reports no removals."},{"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."}]}}],"description":"The [event types](https://needle.app/docs/webhooks#event-types) this webhook gets. \"all\" means every type, also types added later. A list stays as it is: types added later are not sent until you add them."},"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."},"disabledAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When the webhook was turned off because your URL gave no 2xx answer for 3 days. Nothing is sent while it is off; turn it on with enabled: true. Null while it is on."},"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","eventTypes","lastAttemptAt","lastError","disabledAt","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, the event types, or several at once. 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"}]}},"eventTypes":{"description":"The new event types: \"all\" or a list. Pending deliveries of types no longer in the list are dropped; added types only get events from now on.","anyOf":[{"type":"string","const":"all"},{"minItems":1,"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. Deprecated: use `draft_created`, which is sent alongside it."},{"type":"string","const":"task_approved","description":"A held step was approved. Deprecated: use `draft_approved`, which is sent alongside it."},{"type":"string","const":"draft_created","description":"A drafted message is waiting for a member to review it, created through the API or held by a campaign step."},{"type":"string","const":"draft_approved","description":"A member approved a draft, possibly after editing it (`data.edited`). The message itself is the `linkedin_message_sent` (also for an InMail), `linkedin_invite_sent` or `instagram_message_sent` event that follows, with the same `data.draftId`. An approved InMail to someone out of network without Open Profile goes out as a connection request without a note instead."},{"type":"string","const":"draft_discarded","description":"A draft will not be sent; `data.discardReason` says why."},{"type":"string","const":"draft_failed","description":"An approved draft could not be sent; `data.message` says why."},{"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, after hitting a limit, or by Needle after 10 failures in a row on Instagram (`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, headers or event types changed, or it was turned on again; `data.changedFields` lists which (`url`, `headers`, `eventTypes`, `enabled`)."},{"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_message_edited","description":"A LinkedIn message was edited. `data.text` is the new text and `data.messageId` names the message; its sent or received event keeps the original text."},{"type":"string","const":"linkedin_message_deleted","description":"A LinkedIn message was deleted. `data.messageId` names the message and `data.text` is what it said."},{"type":"string","const":"linkedin_message_reaction_added","description":"A reaction was added to a LinkedIn message. `data.reaction` is the emoji, `data.reactedBy` says who reacted, `data.messageId` names the message and `data.text` is what it said. LinkedIn reports no removals."},{"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_follow_accepted","description":"An Instagram follow request was accepted."},{"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_message_edited","description":"An Instagram message was edited. `data.text` is the new text and `data.messageId` names the message; its sent or received event keeps the original text."},{"type":"string","const":"instagram_message_deleted","description":"An Instagram message was deleted. `data.messageId` names the message and `data.text` is what it said."},{"type":"string","const":"instagram_message_reaction_added","description":"A reaction was added to an Instagram message. `data.reaction` is the emoji, `data.reactedBy` says who reacted, `data.messageId` names the message and `data.text` is what it said. Instagram reports no removals."},{"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."}]}}]},"enabled":{"description":"Turns on a webhook that was turned off. Events from while it was off are not sent. Any other change turns it on too.","type":"boolean","const":true}}}}}},"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."},"eventTypes":{"anyOf":[{"type":"string","const":"all"},{"minItems":1,"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. Deprecated: use `draft_created`, which is sent alongside it."},{"type":"string","const":"task_approved","description":"A held step was approved. Deprecated: use `draft_approved`, which is sent alongside it."},{"type":"string","const":"draft_created","description":"A drafted message is waiting for a member to review it, created through the API or held by a campaign step."},{"type":"string","const":"draft_approved","description":"A member approved a draft, possibly after editing it (`data.edited`). The message itself is the `linkedin_message_sent` (also for an InMail), `linkedin_invite_sent` or `instagram_message_sent` event that follows, with the same `data.draftId`. An approved InMail to someone out of network without Open Profile goes out as a connection request without a note instead."},{"type":"string","const":"draft_discarded","description":"A draft will not be sent; `data.discardReason` says why."},{"type":"string","const":"draft_failed","description":"An approved draft could not be sent; `data.message` says why."},{"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, after hitting a limit, or by Needle after 10 failures in a row on Instagram (`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, headers or event types changed, or it was turned on again; `data.changedFields` lists which (`url`, `headers`, `eventTypes`, `enabled`)."},{"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_message_edited","description":"A LinkedIn message was edited. `data.text` is the new text and `data.messageId` names the message; its sent or received event keeps the original text."},{"type":"string","const":"linkedin_message_deleted","description":"A LinkedIn message was deleted. `data.messageId` names the message and `data.text` is what it said."},{"type":"string","const":"linkedin_message_reaction_added","description":"A reaction was added to a LinkedIn message. `data.reaction` is the emoji, `data.reactedBy` says who reacted, `data.messageId` names the message and `data.text` is what it said. LinkedIn reports no removals."},{"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_follow_accepted","description":"An Instagram follow request was accepted."},{"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_message_edited","description":"An Instagram message was edited. `data.text` is the new text and `data.messageId` names the message; its sent or received event keeps the original text."},{"type":"string","const":"instagram_message_deleted","description":"An Instagram message was deleted. `data.messageId` names the message and `data.text` is what it said."},{"type":"string","const":"instagram_message_reaction_added","description":"A reaction was added to an Instagram message. `data.reaction` is the emoji, `data.reactedBy` says who reacted, `data.messageId` names the message and `data.text` is what it said. Instagram reports no removals."},{"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."}]}}],"description":"The [event types](https://needle.app/docs/webhooks#event-types) this webhook gets. \"all\" means every type, also types added later. A list stays as it is: types added later are not sent until you add them."},"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."},"disabledAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When the webhook was turned off because your URL gave no 2xx answer for 3 days. Nothing is sent while it is off; turn it on with enabled: true. Null while it is on."},"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","eventTypes","lastAttemptAt","lastError","disabledAt","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"}}}}}}},"/api/v1/onboarding":{"get":{"tags":["Onboarding"],"operationId":"getOnboarding","summary":"Get onboarding info","description":"Returns what the user told Needle during onboarding and what it produced: the use case, website, notes, attached documents, the ideal customer profile, the ids of the leads found, the onboarding campaign id, and when onboarding was completed. Fields the user has not reached yet are null or empty.","responses":{"200":{"description":"The onboarding info.","content":{"application/json":{"schema":{"type":"object","properties":{"intent":{"anyOf":[{"type":"string","enum":["sales","hiring","fundraising","partnerships","events","other"]},{"type":"null"}],"description":"Why the user is reaching out. Null until they choose one."},"websiteUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The website the user gave. Null until they give one."},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Notes the user wrote. Null until they write any."},"attachments":{"type":"array","items":{"type":"object","properties":{"filename":{"type":"string"},"contentType":{"type":"string","enum":["text/plain","text/html","text/csv","text/calendar","text/markdown","text/x-markdown","text/yaml","text/xml","image/png","image/jpeg","image/gif","image/webp","application/pdf","application/json","application/yaml","application/x-yaml","application/xml","application/rtf","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/vnd.ms-powerpoint","application/vnd.openxmlformats-officedocument.presentationml.presentation","application/zip","application/x-zip-compressed"]},"url":{"type":"string","description":"Where the attached document is stored."}},"required":["filename","contentType","url"],"additionalProperties":false},"description":"Documents the user attached. Empty until they attach any."},"icp":{"anyOf":[{"oneOf":[{"type":"object","properties":{"version":{"type":"string","const":"v1"},"intent":{"type":"string","const":"sales"},"description":{"type":"string","description":"Who the user wants to reach, in a sentence or two."},"roleTitles":{"type":"array","items":{"type":"string"},"description":"Job titles of the people to reach."},"segments":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"A short label for this group."},"roleTitles":{"type":"array","items":{"type":"string"},"description":"Job titles in this group."},"companyDescription":{"type":"string","description":"What companies in this group do. Empty when the company does not matter."},"companyKeywords":{"type":"array","items":{"type":"string"},"description":"Phrases that appear in these companies. Empty when the company does not matter."}},"required":["name","roleTitles","companyDescription","companyKeywords"],"additionalProperties":false},"description":"Distinct groups inside the profile. Empty on profiles saved before segments existed."},"companySizes":{"type":"array","items":{"type":"string","enum":["1-50","51-200","201-500","501-1000","1001-5000","5001-10000","10001+"]},"description":"Employee bands of the buyers' companies. Empty when unknown."},"countries":{"type":"array","items":{"type":"string"},"description":"ISO 3166-1 alpha-2 codes of where those people are, for example \"US\"."},"existingCustomers":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"domain":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Company website domain, for example \"acme.com\". Null when unknown."}},"required":["name","domain"],"additionalProperties":false},"description":"Companies that already buy from the user. Empty when none are public."},"competitors":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"domain":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Competitor website domain, for example \"acme.com\". Null when unknown."},"differentiation":{"type":"string","description":"Why buyers pick the user over this competitor. Empty when unknown."}},"required":["name","domain","differentiation"],"additionalProperties":false},"description":"Companies selling the same thing to the same buyers. Empty when unknown."},"voices":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"linkedinUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Their LinkedIn profile URL. Null when unknown."},"reason":{"type":"string","description":"Why the buyers follow them. Empty when unknown."}},"required":["name","linkedinUrl","reason"],"additionalProperties":false},"description":"People the buyers follow and engage with on LinkedIn. Empty when none are found."},"partners":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"domain":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Partner website domain, for example \"acme.com\". Null when unknown."},"reason":{"type":"string","description":"How they serve the same buyers without competing. Empty when unknown."}},"required":["name","domain","reason"],"additionalProperties":false},"description":"Companies that sell to the same buyers without competing. Empty when none are found."}},"required":["version","intent","description","roleTitles","segments","companySizes","countries","existingCustomers","competitors","voices","partners"],"additionalProperties":false},{"type":"object","properties":{"version":{"type":"string","const":"v1"},"intent":{"type":"string","const":"hiring"},"description":{"type":"string","description":"Who the user wants to reach, in a sentence or two."},"roleTitles":{"type":"array","items":{"type":"string"},"description":"Job titles of the people to reach."},"segments":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"A short label for this group."},"roleTitles":{"type":"array","items":{"type":"string"},"description":"Job titles in this group."},"companyDescription":{"type":"string","description":"What companies in this group do. Empty when the company does not matter."},"companyKeywords":{"type":"array","items":{"type":"string"},"description":"Phrases that appear in these companies. Empty when the company does not matter."}},"required":["name","roleTitles","companyDescription","companyKeywords"],"additionalProperties":false},"description":"Distinct groups inside the profile. Empty on profiles saved before segments existed."},"experience":{"type":"array","items":{"type":"string","enum":["0-2","3-5","6-10","10+"]},"description":"Years of experience the candidates have."},"languages":{"type":"array","items":{"type":"string"},"description":"Languages the candidates speak, for example \"English\"."},"countries":{"type":"array","items":{"type":"string"},"description":"ISO 3166-1 alpha-2 codes of where those people are, for example \"US\"."}},"required":["version","intent","description","roleTitles","segments","experience","languages","countries"],"additionalProperties":false},{"type":"object","properties":{"version":{"type":"string","const":"v1"},"intent":{"type":"string","const":"fundraising"},"description":{"type":"string","description":"Who the user wants to reach, in a sentence or two."},"roleTitles":{"type":"array","items":{"type":"string"},"description":"Job titles of the people to reach."},"segments":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"A short label for this group."},"roleTitles":{"type":"array","items":{"type":"string"},"description":"Job titles in this group."},"companyDescription":{"type":"string","description":"What companies in this group do. Empty when the company does not matter."},"companyKeywords":{"type":"array","items":{"type":"string"},"description":"Phrases that appear in these companies. Empty when the company does not matter."}},"required":["name","roleTitles","companyDescription","companyKeywords"],"additionalProperties":false},"description":"Distinct groups inside the profile. Empty on profiles saved before segments existed."},"stages":{"type":"array","items":{"type":"string","enum":["pre-seed","seed","series-a","series-b","growth"]},"description":"Rounds these investors fund."},"countries":{"type":"array","items":{"type":"string"},"description":"ISO 3166-1 alpha-2 codes of where those people are, for example \"US\"."}},"required":["version","intent","description","roleTitles","segments","stages","countries"],"additionalProperties":false},{"type":"object","properties":{"version":{"type":"string","const":"v1"},"intent":{"type":"string","const":"partnerships"},"description":{"type":"string","description":"Who the user wants to reach, in a sentence or two."},"roleTitles":{"type":"array","items":{"type":"string"},"description":"Job titles of the people to reach."},"segments":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"A short label for this group."},"roleTitles":{"type":"array","items":{"type":"string"},"description":"Job titles in this group."},"companyDescription":{"type":"string","description":"What companies in this group do. Empty when the company does not matter."},"companyKeywords":{"type":"array","items":{"type":"string"},"description":"Phrases that appear in these companies. Empty when the company does not matter."}},"required":["name","roleTitles","companyDescription","companyKeywords"],"additionalProperties":false},"description":"Distinct groups inside the profile. Empty on profiles saved before segments existed."},"partnerTypes":{"type":"array","items":{"type":"string","enum":["agency","technology","reseller","affiliate","strategic"]},"description":"Kinds of partner."},"companySizes":{"type":"array","items":{"type":"string","enum":["1-50","51-200","201-500","501-1000","1001-5000","5001-10000","10001+"]},"description":"Employee bands of the partners' companies. Empty when unknown."},"countries":{"type":"array","items":{"type":"string"},"description":"ISO 3166-1 alpha-2 codes of where those people are, for example \"US\"."},"existingPartners":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"domain":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Company website domain, for example \"acme.com\". Null when unknown."}},"required":["name","domain"],"additionalProperties":false},"description":"Companies the user already partners with. Empty when none are public."}},"required":["version","intent","description","roleTitles","segments","partnerTypes","companySizes","countries","existingPartners"],"additionalProperties":false},{"type":"object","properties":{"version":{"type":"string","const":"v1"},"intent":{"type":"string","const":"events"},"description":{"type":"string","description":"Who the user wants to reach, in a sentence or two."},"event":{"type":"object","properties":{"name":{"type":"string","description":"Event name. Empty when unknown."},"date":{"type":"string","description":"When it happens. Empty when unknown."},"location":{"type":"string","description":"City and venue, or \"Online\". Empty when unknown."}},"required":["name","date","location"],"additionalProperties":false},"roleTitles":{"type":"array","items":{"type":"string"},"description":"Job titles of the people to reach."},"segments":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"A short label for this group."},"roleTitles":{"type":"array","items":{"type":"string"},"description":"Job titles in this group."},"companyDescription":{"type":"string","description":"What companies in this group do. Empty when the company does not matter."},"companyKeywords":{"type":"array","items":{"type":"string"},"description":"Phrases that appear in these companies. Empty when the company does not matter."}},"required":["name","roleTitles","companyDescription","companyKeywords"],"additionalProperties":false},"description":"Distinct groups inside the profile. Empty on profiles saved before segments existed."},"companySizes":{"type":"array","items":{"type":"string","enum":["1-50","51-200","201-500","501-1000","1001-5000","5001-10000","10001+"]},"description":"Employee bands of the invitees' companies. Empty when unknown."},"countries":{"type":"array","items":{"type":"string"},"description":"ISO 3166-1 alpha-2 codes of where those people are, for example \"US\"."}},"required":["version","intent","description","event","roleTitles","segments","companySizes","countries"],"additionalProperties":false},{"type":"object","properties":{"version":{"type":"string","const":"v1"},"intent":{"type":"string","const":"other"},"description":{"type":"string","description":"Who the user wants to reach, in a sentence or two."},"roleTitles":{"type":"array","items":{"type":"string"},"description":"Job titles of the people to reach."},"segments":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"A short label for this group."},"roleTitles":{"type":"array","items":{"type":"string"},"description":"Job titles in this group."},"companyDescription":{"type":"string","description":"What companies in this group do. Empty when the company does not matter."},"companyKeywords":{"type":"array","items":{"type":"string"},"description":"Phrases that appear in these companies. Empty when the company does not matter."}},"required":["name","roleTitles","companyDescription","companyKeywords"],"additionalProperties":false},"description":"Distinct groups inside the profile. Empty on profiles saved before segments existed."},"companySizes":{"type":"array","items":{"type":"string","enum":["1-50","51-200","201-500","501-1000","1001-5000","5001-10000","10001+"]},"description":"Employee bands of their companies. Empty when unknown."},"countries":{"type":"array","items":{"type":"string"},"description":"ISO 3166-1 alpha-2 codes of where those people are, for example \"US\"."}},"required":["version","intent","description","roleTitles","segments","companySizes","countries"],"additionalProperties":false}],"type":"object"},{"type":"null"}],"description":"The ideal customer profile. Null until one is saved."},"leadIds":{"type":"array","items":{"type":"string"},"description":"Ids of the leads found during onboarding. Empty until any are found."},"campaignId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The onboarding campaign. Null until it is created."},"completedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When onboarding was completed. Null until then."},"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":["intent","websiteUrl","notes","attachments","icp","leadIds","campaignId","completedAt","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/assistant-chats/{assistantChatId}":{"get":{"tags":["Assistant chats"],"operationId":"getAssistantChat","summary":"Get an assistant chat","description":"A chat the user had with the assistant inside the Needle web app, to continue it elsewhere. When `handoff` is set, the assistant passed the task on: its `brief` holds the goal, the ids involved, what was already found, and what is left. Messages hold each turn’s text and the tools it called. Calls since the last user message keep their results; earlier ones do not. Only the user who had the chat can read it.","parameters":[{"in":"path","name":"assistantChatId","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":"Assistant chat id"},"required":true,"description":"Assistant chat id"}],"responses":{"200":{"description":"The chat.","content":{"application/json":{"schema":{"type":"object","properties":{"assistantChat":{"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)$"},"title":{"type":"string"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"handoff":{"anyOf":[{"type":"object","properties":{"task":{"type":"string","description":"One line naming the task for the agent that picks this chat up."},"brief":{"type":"string","description":"Everything the next agent needs to continue: the goal, the ids involved, what was already found, and what is left."}},"required":["task","brief"],"additionalProperties":false},{"type":"null"}],"description":"Set when the assistant passed the task on. Null when the chat was not handed off."},"messages":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["user","assistant","system"]},"text":{"type":"string"},"tools":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"input":{"description":"The call input as JSON, shortened before the last user message.","type":"string"},"output":{"description":"The result as JSON, only for calls since the last user message. The newest calls keep theirs when the results run long.","type":"string"},"error":{"description":"Why the call failed, since the last user message.","type":"string"}},"required":["name"],"additionalProperties":false}}},"required":["role","text","tools"],"additionalProperties":false}}},"required":["id","title","createdAt","updatedAt","handoff","messages"],"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":["assistantChat","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/docs/search":{"post":{"tags":["Docs"],"operationId":"searchDocs","summary":"Search the docs","description":"Finds Needle documentation pages: guides, concepts, every endpoint, and every MCP tool. Pages that match more of the words come first. Pass a pageId to Get a docs page to read it.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"query":{"type":"string","minLength":1,"maxLength":200,"description":"Words to look for. Pages that match more of them come first."},"limit":{"description":"Most pages to return. Default 10.","type":"integer","minimum":1,"maximum":20}},"required":["query"]}}}},"responses":{"200":{"description":"Matching docs pages, best match first.","content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"type":"object","properties":{"pageId":{"type":"string","description":"Pass it to Get a docs page."},"title":{"type":"string"},"breadcrumbs":{"type":"array","items":{"type":"string"},"description":"Where the page sits in the docs, for example Documentation, Webhooks."},"url":{"type":"string","description":"The page on needle.app."}},"required":["pageId","title","breadcrumbs","url"],"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/docs/{pageId}":{"get":{"tags":["Docs"],"operationId":"getDocsPage","summary":"Get a docs page","description":"Returns one page of the Needle documentation as markdown, for example the introduction, agent onboarding, a concept such as attio, an API endpoint, or an MCP tool.","parameters":[{"in":"path","name":"pageId","schema":{"type":"string","minLength":1,"maxLength":500,"description":"The page's path after /docs/, for example `attio` or `mcp/needle-create-lead`. A full docs URL works too."},"required":true,"description":"The page's path after /docs/, for example `attio` or `mcp/needle-create-lead`. A full docs URL works too."}],"responses":{"200":{"description":"The docs page.","content":{"application/json":{"schema":{"type":"object","properties":{"markdown":{"type":"string","description":"The page as markdown."},"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":["markdown","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>"}}}}