{"openapi":"3.1.0","info":{"version":"1.0.0","title":""},"components":{"schemas":{}},"paths":{"/v2/":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/v2/auth/checkpoint":{"post":{"operationId":"solveCheckpoint","summary":"Solve a Checkpoint","tags":["Custom Auth"],"description":"Solve the current checkpoint for the given authentication intent.","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["code","intent_id"],"properties":{"code":{"description":"The code to solve the checkpoint. Check the AuthenticationCheckpoint response you have already obtained to see what type of code is expected.","type":"string"},"credential":{"description":"The secret that goes with the chosen option, when the checkpoint asks for one. On ENCRYPTED_HISTORY, `code` names the option and this carries the PIN or the recovery code; it is left out when the option needs no secret.","type":"string"},"intent_id":{"description":"The ID of the intent for which a checkpoint must be solved.","type":"string","pattern":"^acc_(.*)$"}}}}},"required":true},"x-samples-languages":["node","python","curl"],"x-code-samples":[{"name":"Solve checkpoint","language":"node","install":"npm install unipile","code":"import { UnipileCustomAuth } from 'unipile';\n\nconst ACCOUNT_ID = 'acc_123456789';\n\nconst unipileCustomAuth = new UnipileCustomAuth({ key: 'YOUR_API_KEY' });\n\nconst { data } = await unipileCustomAuth.solveCheckpoint(\n  {\n    body: {\n      code: '123456',\n      intent_id: 'intent_id',\n    },\n  }\n);"},{"name":"Solve checkpoint","language":"python","install":"pip install git+https://github.com/unipile/unipile-python.git","code":"import unipile\n\nACCOUNT_ID = \"acc_123456789\"\n\nconfiguration = unipile.Configuration()\nconfiguration.api_key[\"apiKey\"] = \"YOUR_API_KEY\"\n\nwith unipile.ApiClient(configuration) as api_client:\n    custom_auth_api = unipile.CustomAuthApi(api_client)\n\nresponse = custom_auth_api.solve_checkpoint(\n    {\n    'code': '123456',\n    'intent_id': 'intent_id',\n  }\n)"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"anyOf":[{"title":"Checkpoint","description":"Authentication requires another step or has stopped and cannot continue.","type":"object","required":["object","checkpoint","intent_id"],"properties":{"object":{"type":"string","enum":["AuthenticationCheckpoint"]},"checkpoint":{"description":"The next authentication step, or a notice that the current attempt cannot continue.","anyOf":[{"title":"One-Time Password","description":"A one-time password was sent to the user's phone or email address. The user needs to enter the code in the next checkpoint.","type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["OTP"]},"channel":{"description":"The channel the one-time password was sent through, when known.","type":"string","enum":["EMAIL","SMS","WHATSAPP"]}}},{"title":"In App Validation","description":"A notification was sent to the user's phone. The user needs to validate the notification by clicking on the link in the notification.","type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["IN_APP_VALIDATION"]},"code":{"description":"For number-matching approvals: the digits shown here that the user must select among the choices in their notification.","type":"string"}}},{"title":"Pairing Code","description":"A pairing code must be entered in the provider app to complete authentication.","type":"object","required":["type","code"],"properties":{"type":{"type":"string","enum":["PAIRING_CODE"]},"code":{"description":"The pairing code to enter on the phone to link the device.","type":"string"}}},{"title":"Phone Register","description":"The user needs to register their phone number so an OTP can be sent.","type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["PHONE_REGISTER"]}}},{"title":"Two Factor Authentication","description":"The user needs to enter the code generated by the Authenticator App used to setup 2FA or received by SMS.","type":"object","required":["type","platform"],"properties":{"type":{"type":"string","enum":["2FA"]},"platform":{"description":"The platform of the 2FA.\n          - `SMS` means the code was sent in a SMS.\n          - `APP` means the user must enter the code generated by the Authenticator App used to setup 2FA.\n          - `WHATSAPP` means the code was sent via WhatsApp.","type":"string","enum":["SMS","APP","WHATSAPP"]}}},{"title":"Captcha","description":"The user needs to solve a captcha checkpoint.","type":"object","required":["type","public_key","data"],"properties":{"type":{"type":"string","enum":["CAPTCHA"]},"public_key":{"description":"The public key of the CAPTCHA. This is used to verify the CAPTCHA.","anyOf":[{"type":"string"},{"type":"null"}]},"data":{"description":"The data of the CAPTCHA. This is used to verify the CAPTCHA.","anyOf":[{"type":"string"},{"type":"null"}]}}},{"title":"OTP or In App Validation","description":"The user can either enter a one-time password sent to their phone/email or validate a notification sent to their phone.","type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["OTP_OR_IN_APP_VALIDATION"]},"channel":{"description":"The channel the one-time password was sent through, when known.","type":"string","enum":["EMAIL","SMS","WHATSAPP"]}}},{"title":"Contract Selection","description":"The user must pick a contract from a list to activate the correct features and complete authentication.","type":"object","required":["type","contracts"],"properties":{"type":{"type":"string","enum":["CONTRACT_SELECTION"]},"contracts":{"description":"A list of contracts to choose from.","type":"array","items":{"type":"object","required":["id","name"],"properties":{"id":{"description":"The ID of the contract.","type":"string"},"name":{"description":"The name of the contract.","type":"string"}}}}}},{"title":"Consent Screen","description":"The user must select the products that will be activated on the account.","type":"object","required":["type","products"],"properties":{"type":{"type":"string","enum":["CONSENT_SCREEN"]},"products":{"description":"A list of products to choose from.","type":"array","items":{"type":"object","required":["id","display_name"],"properties":{"id":{"description":"The ID of the product.","type":"string"},"display_name":{"description":"The display name of the product.","type":"string"},"description":{"description":"What the product gives access to, shown under its name.","type":"string"},"icon_url":{"description":"An image of the product's own (e.g. a Page's picture), shown instead of the provider icon.","type":"string"}}}}}},{"title":"Challenge Selection","description":"The user must pick which alternative verification method to use to receive their code.","type":"object","required":["type","challenges"],"properties":{"type":{"type":"string","enum":["CHALLENGE_SELECTION"]},"challenges":{"description":"A list of alternative verification methods to choose from.","type":"array","items":{"type":"object","required":["id","label"],"properties":{"id":{"description":"Identifier of the method (EMAIL, SMS, WHATSAPP or any agnostic ID). Send it back as the `challenge` field of Request Checkpoint to switch to this method.","type":"string"},"label":{"description":"Human-readable name of the method (e.g. \"WhatsApp\", \"Text message\", \"Email\").","type":"string"},"description":{"description":"Extra detail about the method, e.g. the masked destination the code will be sent to.","type":"string"}}}}}},{"title":"Loading","description":"The authentication is continuing in the background and requires no user input.","type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["LOADING"]}}},{"title":"Passkey","description":"An additional passkey verification required to finish linking this account. Poll the checkpoint with an empty code; confirm only with CONFIRM followed by a colon and the exact displayed comparison code. CANCEL abandons this attempt.","type":"object","required":["type","stage","request_id","expires_at"],"properties":{"type":{"description":"An owner-authorized browser verification is required.","type":"string","enum":["PASSKEY"]},"stage":{"description":"Whether to verify in the browser or compare and approve the mobile confirmation.","type":"string","enum":["SIGN","CONFIRM"]},"request_id":{"description":"Opaque identifier of this single-use verification step.","type":"string"},"expires_at":{"description":"Expiry of this verification attempt, in ISO 8601 format.","type":"string"},"comparison_code":{"description":"Compare this code with the code on your phone before approving.","type":"string"},"handoff":{"description":"Install or update UniLogin, then authorize this browser verification. No provider session is exported.","type":"object","required":["request_id","handoff_token","extension_code","expires_at","extension_bridge_url","extension_store_urls","extension_download_urls"],"properties":{"request_id":{"description":"Identifier used by the extension bridge.","type":"string"},"handoff_token":{"description":"Short-lived capability for this verification; pass only to the trusted extension bridge.","type":"string"},"extension_code":{"description":"Code to enter in UniLogin when automatic extension detection is unavailable.","type":"string"},"expires_at":{"description":"Expiry of the extension handoff, in ISO 8601 format.","type":"string"},"extension_bridge_url":{"description":"Trusted UniLogin bridge URL for this attempt.","type":"string"},"extension_store_urls":{"additionalProperties":false,"description":"Official extension store links.","type":"object","properties":{"chrome":{"format":"uri","description":"Chrome extension store URL.","type":"string"},"edge":{"format":"uri","description":"Edge extension store URL.","type":"string"},"firefox":{"format":"uri","description":"Firefox extension store URL.","type":"string"},"safari":{"format":"uri","description":"Safari extension store URL.","type":"string"}}},"extension_download_urls":{"additionalProperties":false,"description":"Official extension download links, for browsers without a store listing.","type":"object","properties":{"edge":{"format":"uri","description":"Edge extension download URL.","type":"string"},"safari":{"format":"uri","description":"Safari extension download URL.","type":"string"}}}}},"unavailable":{"description":"The verification service is not ready; retry after its update. Ordinary authentication methods remain available.","type":"string","enum":["UPDATE_REQUIRED"]}}},{"title":"UniLogin","description":"Complete authentication in the browser extension, then poll the connection using intent_id as the account identifier.","type":"object","required":["type","extension_code","extension_code_expires_at","expires_at","extension_store_urls","extension_download_urls"],"properties":{"type":{"description":"Authentication must be completed through the browser extension.","type":"string","enum":["UNILOGIN"]},"extension_code":{"pattern":"^[23456789ABCDEFGHJKMNPQRSTVWXYZ]{4}(?:-[23456789ABCDEFGHJKMNPQRSTVWXYZ]{4}){2}$","description":"Temporary code to enter in the browser extension to authorize this connection.","type":"string"},"extension_code_expires_at":{"format":"date-time","description":"Expiry of the extension code, in ISO 8601 format.","type":"string"},"expires_at":{"format":"date-time","description":"Expiry of this connection attempt, in ISO 8601 format.","type":"string"},"extension_store_urls":{"additionalProperties":false,"description":"Official extension store links.","type":"object","properties":{"chrome":{"format":"uri","description":"Chrome extension store URL.","type":"string"},"edge":{"format":"uri","description":"Edge extension store URL.","type":"string"},"firefox":{"format":"uri","description":"Firefox extension store URL.","type":"string"},"safari":{"format":"uri","description":"Safari extension store URL.","type":"string"}}},"extension_download_urls":{"additionalProperties":false,"description":"Official extension download links, for browsers without a store listing.","type":"object","properties":{"edge":{"format":"uri","description":"Edge extension download URL.","type":"string"},"safari":{"format":"uri","description":"Safari extension download URL.","type":"string"}}}}},{"title":"Encrypted History","description":"The user must choose whether to unlock the end-to-end encrypted message history, and with which credential.","type":"object","required":["type","options","attempts_remaining"],"properties":{"type":{"type":"string","enum":["ENCRYPTED_HISTORY"]},"options":{"description":"The ways the user can answer. Send the chosen `id` as the `code` of Solve Checkpoint.","type":"array","items":{"type":"object","required":["id","label"],"properties":{"id":{"description":"PIN and RECOVERY_CODE unlock the end-to-end encrypted message history; SKIP leaves it off, and the account then only reports new messages as they arrive.","type":"string","enum":["PIN","RECOVERY_CODE","SKIP"]},"label":{"description":"Human-readable name of the option.","type":"string"},"description":{"description":"Extra detail about what the option entails.","type":"string"},"attempts_remaining":{"description":"How many more times this credential may be submitted. Each credential has a budget of its own, starting at 3, so running one out leaves the others open. A PIN is further capped at half of what the provider still allows, so the user can be wrong here without ever being the reason the backup locks. `0` means the option cannot be used any more; absent on options that take no credential.","type":"integer"}}}},"attempts_remaining":{"description":"The most submissions any credential still has — what the user has left overall. `0` means every credential is spent and only skipping remains. The detail per credential is in `options[].attempts_remaining`; a credential the provider refuses to even try does not consume one.","type":"integer"},"provider_attempts_remaining":{"description":"For a PIN, how many attempts the provider itself still allows before it locks the backup. This budget is the provider's own and is never spent on the user's behalf: when it is unknown or too low, the PIN is refused rather than tried.","type":"integer"},"last_attempt":{"description":"Why the previous submission did not unlock the history. Absent the first time this checkpoint is served, so its presence is what tells the user their last answer failed.","type":"object","required":["option","error"],"properties":{"option":{"description":"PIN and RECOVERY_CODE unlock the end-to-end encrypted message history; SKIP leaves it off, and the account then only reports new messages as they arrive.","type":"string","enum":["PIN","RECOVERY_CODE","SKIP"]},"error":{"description":"INVALID_CREDENTIAL: the PIN or recovery code was wrong, and one attempt was spent. REFUSED_TO_PROTECT_BACKUP: the PIN was not even submitted, because the provider had too few attempts left to risk one — no attempt was spent, and only the recovery code can unlock the history now.","type":"string","enum":["INVALID_CREDENTIAL","REFUSED_TO_PROTECT_BACKUP"]}}}}},{"title":"Process Stopped","description":"A terminal outcome for the current authentication attempt. No checkpoint resolution is expected: stop polling and do not call Solve Checkpoint, Request Checkpoint or Resend Checkpoint for this attempt. Use message, description and link to inform the account owner. To retry authentication, start a new authentication attempt rather than continuing the existing intent.","type":"object","required":["type","message"],"properties":{"type":{"description":"The current authentication attempt has stopped and cannot be continued or resolved.","type":"string","enum":["PROCESS_STOPPED"]},"message":{"description":"The reason why the authentication attempt cannot continue.","type":"string"},"description":{"description":"Additional context or instructions for the account owner, supplementing the main message.","type":"string"},"link":{"description":"An optional resource or action to present to the account owner alongside the message.","type":"object","required":["url","label"],"properties":{"url":{"format":"uri","description":"An absolute HTTP or HTTPS URL providing information or actions relevant to the stopped attempt.","type":"string"},"label":{"description":"The label describing the linked resource or action.","type":"string"}}}}}]},"intent_id":{"description":"The ID of the authentication intent. Use it for the next step required by the checkpoint. For PROCESS_STOPPED, it only identifies the stopped attempt and must not be used to resume or resolve it.","type":"string","pattern":"^acc_(.*)$"}}},{"title":"QR Code","description":"The authentication was started for a QR Code.","type":"object","required":["object","qrcode","intent_id"],"properties":{"object":{"type":"string","enum":["AuthenticationQrCode"]},"qrcode":{"description":"The QR Code to scan.","type":"string"},"intent_id":{"description":"The ID of the auth intent. This should be used to listen for the QR Code scan with Solve Checkpoint.","type":"string","pattern":"^acc_(.*)$"}}},{"title":"Oauth URL","description":"For Oauth providers (Outlook, Google)","type":"object","required":["object","url"],"properties":{"object":{"type":"string","enum":["OauthUrl"]},"url":{"description":"The URL to redirect to start the oauth flow of the provider.","type":"string"}}},{"title":"Account","type":"object","required":["object","user_id","created_at","id","application_id","status","is_locked","provider","metadata"],"properties":{"object":{"description":"The type of the returned object.","type":"string","enum":["Account"]},"user_id":{"description":"The ID of the user that owns the account for the provider.","type":"string"},"name":{"description":"The name of the account. This is usually the display name or public identifier (phone number, email address, etc.) of the user that owns the account.","type":"string"},"created_at":{"description":"The date and time the account was linked with Unipile.","type":"string"},"id":{"description":"ID of the account.","type":"string","pattern":"^acc_(.*)$"},"application_id":{"description":"ID of the parent application.","type":"string","pattern":"^app_(.*)$"},"account_scope_id":{"description":"ID of the Scope assigned to the Account. Once assigned, the Scope cannot be removed or replaced.","anyOf":[{"type":"string","pattern":"^scope_(.*)$"},{"type":"null"}]},"status":{"description":"The current status of the account.\n    - `running` is Operational.\n    - `errored` is Service Interuption.\n    - `disconnected` requires authentication.\n    - `degraded` means at least one product is running while another is errored; inspect `metadata.products_connection_status`.\n    - `partial` means at least one product is running while another requires authentication; inspect `metadata.products_connection_status`.\n    Learn more about [Status & Lifecycle](https://developer.unipile.com/v2.0/docs/status-lifecycle).","type":"string","enum":["running","errored","disconnected","degraded","partial"]},"is_locked":{"description":"Whether API access to the account is locked.","type":"boolean"},"provider":{"description":"The provider's of the Account.\n    - `mock` is mock.\n    - `whatsapp` is WhatsApp.\n    - `linkedin` is LinkedIn.\n    - `instagram` is Instagram.\n    - `facebook` is Facebook.\n    - `google` is Google.\n    - `outlook` is Outlook.\n    - `telegram` is Telegram.\n    - `imap` is IMAP.","type":"string","enum":["mock","whatsapp","linkedin","google","outlook","imap","telegram","instagram","facebook"]},"oauth_scope":{"description":"If the provider is OAuth, this is the scope of comma-separated permissions granted to the account.","type":"string"},"metadata":{"description":"Metadata associated with the Account.","type":"object","properties":{"auto_proxy_country":{"description":"The preferred country for automatic proxy selection. A country inferred from an IP may be outside Unipile’s proxy offering. The current proxy may be in another country when fallback is allowed and no proxy is available in the preferred country.","type":"string"},"allow_country_fallback":{"description":"Whether an available proxy from another country may be used when none is available in the rotation country, during authentication and throughout the account lifetime. Defaults to true. A country included in Unipile’s proxy offering may still have no proxy currently available. If false, authentication fails when no proxy is available in the rotation country. If the selected proxy later fails and no replacement is available there, the account enters Service interruption. Rotation to another available proxy in that country remains allowed.","type":"boolean"},"connection_method":{"description":"The authentication method that currently owns the account session lifecycle.","type":"string","enum":["credentials","cookies","unilogin"]},"v1_account_id":{"description":"The ID of the account in the v1 if the account is migrated from v1.","type":"string"},"v1_instance_port":{"description":"The port of the v1 instance from which the account was migrated.","type":"number"},"products_connection_status":{"description":"The status of the connection to a product, if the account is connected to multiple products.","type":"object","additionalProperties":{"type":"string","enum":["running","disconnected","errored"]}},"products_display_names":{"description":"The human-readable name of a product, keyed like products_connection_status, when the product has one (e.g. the name of a Facebook Page).","type":"object","additionalProperties":{"type":"string"}},"custom_data":{"description":"Custom data of the account. This is where you can store custom data using \"Update an account\" method.","type":"object","additionalProperties":{"type":"string"}}}},"initial_sync":{"description":"Sync details if the account has initial sync enabled.","type":"object","required":["status"],"properties":{"status":{"description":"The state of an account’s initial provider sync.\n  - `pending`sync hasn’t started yet.\n  - `running` sync is currently in progress.\n  - `failed` sync could not be completed due to an error.\n  - `completed` sync finished successfully.\n  .","type":"string","enum":["pending","running","failed","completed"]},"started_at":{"description":"The date and time the initial sync started.","type":"string"}}},"proxy":{"description":"The proxy used for the account.","type":"object","required":["country","auto_proxy"],"properties":{"country":{"description":"The country of the proxy. If null, the proxy has no defined country.","anyOf":[{"type":"string"},{"type":"null"}]},"auto_proxy":{"description":"Whether the proxy was set automatically by Unipile.","type":"boolean"},"host":{"description":"The host of the custom proxy.","type":"string"},"port":{"description":"The port of the custom proxy.","type":"number"},"username":{"description":"The username used to authenticate to the custom proxy.","type":"string"},"protocol":{"description":"The protocol of the custom proxy.","type":"string"}}}}}]}}}}}}},"/v2/auth/checkpoint/request":{"post":{"operationId":"requestCheckpoint","summary":"Request Checkpoint","tags":["Custom Auth"],"description":"Request a checkpoint for the given authentication intent. This can be used to request a different type of checkpoint if the first one was not successful.","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["intent_id"],"properties":{"intent_id":{"description":"The ID of the intent for which a checkpoint must be requested.","type":"string","pattern":"^acc_(.*)$"},"challenge":{"description":"The alternative verification method to switch to. Must be one of the `id`s listed in the CHALLENGE_SELECTION checkpoint.","type":"string"}}}}},"required":true},"x-samples-languages":["node","python","curl"],"x-code-samples":[{"name":"Request checkpoint","language":"node","install":"npm install unipile","code":"import { UnipileCustomAuth } from 'unipile';\n\nconst ACCOUNT_ID = 'acc_123456789';\n\nconst unipileCustomAuth = new UnipileCustomAuth({ key: 'YOUR_API_KEY' });\n\nconst { data } = await unipileCustomAuth.requestCheckpoint(\n  {\n    body: {\n      intent_id: 'intent_id',\n    },\n  }\n);"},{"name":"Request checkpoint","language":"python","install":"pip install git+https://github.com/unipile/unipile-python.git","code":"import unipile\n\nACCOUNT_ID = \"acc_123456789\"\n\nconfiguration = unipile.Configuration()\nconfiguration.api_key[\"apiKey\"] = \"YOUR_API_KEY\"\n\nwith unipile.ApiClient(configuration) as api_client:\n    custom_auth_api = unipile.CustomAuthApi(api_client)\n\nresponse = custom_auth_api.request_checkpoint(\n    {\n    'intent_id': 'intent_id',\n  }\n)"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"anyOf":[{"title":"Checkpoint","description":"Authentication requires another step or has stopped and cannot continue.","type":"object","required":["object","checkpoint","intent_id"],"properties":{"object":{"type":"string","enum":["AuthenticationCheckpoint"]},"checkpoint":{"description":"The next authentication step, or a notice that the current attempt cannot continue.","anyOf":[{"title":"One-Time Password","description":"A one-time password was sent to the user's phone or email address. The user needs to enter the code in the next checkpoint.","type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["OTP"]},"channel":{"description":"The channel the one-time password was sent through, when known.","type":"string","enum":["EMAIL","SMS","WHATSAPP"]}}},{"title":"In App Validation","description":"A notification was sent to the user's phone. The user needs to validate the notification by clicking on the link in the notification.","type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["IN_APP_VALIDATION"]},"code":{"description":"For number-matching approvals: the digits shown here that the user must select among the choices in their notification.","type":"string"}}},{"title":"Pairing Code","description":"A pairing code must be entered in the provider app to complete authentication.","type":"object","required":["type","code"],"properties":{"type":{"type":"string","enum":["PAIRING_CODE"]},"code":{"description":"The pairing code to enter on the phone to link the device.","type":"string"}}},{"title":"Phone Register","description":"The user needs to register their phone number so an OTP can be sent.","type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["PHONE_REGISTER"]}}},{"title":"Two Factor Authentication","description":"The user needs to enter the code generated by the Authenticator App used to setup 2FA or received by SMS.","type":"object","required":["type","platform"],"properties":{"type":{"type":"string","enum":["2FA"]},"platform":{"description":"The platform of the 2FA.\n          - `SMS` means the code was sent in a SMS.\n          - `APP` means the user must enter the code generated by the Authenticator App used to setup 2FA.\n          - `WHATSAPP` means the code was sent via WhatsApp.","type":"string","enum":["SMS","APP","WHATSAPP"]}}},{"title":"Captcha","description":"The user needs to solve a captcha checkpoint.","type":"object","required":["type","public_key","data"],"properties":{"type":{"type":"string","enum":["CAPTCHA"]},"public_key":{"description":"The public key of the CAPTCHA. This is used to verify the CAPTCHA.","anyOf":[{"type":"string"},{"type":"null"}]},"data":{"description":"The data of the CAPTCHA. This is used to verify the CAPTCHA.","anyOf":[{"type":"string"},{"type":"null"}]}}},{"title":"OTP or In App Validation","description":"The user can either enter a one-time password sent to their phone/email or validate a notification sent to their phone.","type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["OTP_OR_IN_APP_VALIDATION"]},"channel":{"description":"The channel the one-time password was sent through, when known.","type":"string","enum":["EMAIL","SMS","WHATSAPP"]}}},{"title":"Contract Selection","description":"The user must pick a contract from a list to activate the correct features and complete authentication.","type":"object","required":["type","contracts"],"properties":{"type":{"type":"string","enum":["CONTRACT_SELECTION"]},"contracts":{"description":"A list of contracts to choose from.","type":"array","items":{"type":"object","required":["id","name"],"properties":{"id":{"description":"The ID of the contract.","type":"string"},"name":{"description":"The name of the contract.","type":"string"}}}}}},{"title":"Consent Screen","description":"The user must select the products that will be activated on the account.","type":"object","required":["type","products"],"properties":{"type":{"type":"string","enum":["CONSENT_SCREEN"]},"products":{"description":"A list of products to choose from.","type":"array","items":{"type":"object","required":["id","display_name"],"properties":{"id":{"description":"The ID of the product.","type":"string"},"display_name":{"description":"The display name of the product.","type":"string"},"description":{"description":"What the product gives access to, shown under its name.","type":"string"},"icon_url":{"description":"An image of the product's own (e.g. a Page's picture), shown instead of the provider icon.","type":"string"}}}}}},{"title":"Challenge Selection","description":"The user must pick which alternative verification method to use to receive their code.","type":"object","required":["type","challenges"],"properties":{"type":{"type":"string","enum":["CHALLENGE_SELECTION"]},"challenges":{"description":"A list of alternative verification methods to choose from.","type":"array","items":{"type":"object","required":["id","label"],"properties":{"id":{"description":"Identifier of the method (EMAIL, SMS, WHATSAPP or any agnostic ID). Send it back as the `challenge` field of Request Checkpoint to switch to this method.","type":"string"},"label":{"description":"Human-readable name of the method (e.g. \"WhatsApp\", \"Text message\", \"Email\").","type":"string"},"description":{"description":"Extra detail about the method, e.g. the masked destination the code will be sent to.","type":"string"}}}}}},{"title":"Loading","description":"The authentication is continuing in the background and requires no user input.","type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["LOADING"]}}},{"title":"Passkey","description":"An additional passkey verification required to finish linking this account. Poll the checkpoint with an empty code; confirm only with CONFIRM followed by a colon and the exact displayed comparison code. CANCEL abandons this attempt.","type":"object","required":["type","stage","request_id","expires_at"],"properties":{"type":{"description":"An owner-authorized browser verification is required.","type":"string","enum":["PASSKEY"]},"stage":{"description":"Whether to verify in the browser or compare and approve the mobile confirmation.","type":"string","enum":["SIGN","CONFIRM"]},"request_id":{"description":"Opaque identifier of this single-use verification step.","type":"string"},"expires_at":{"description":"Expiry of this verification attempt, in ISO 8601 format.","type":"string"},"comparison_code":{"description":"Compare this code with the code on your phone before approving.","type":"string"},"handoff":{"description":"Install or update UniLogin, then authorize this browser verification. No provider session is exported.","type":"object","required":["request_id","handoff_token","extension_code","expires_at","extension_bridge_url","extension_store_urls","extension_download_urls"],"properties":{"request_id":{"description":"Identifier used by the extension bridge.","type":"string"},"handoff_token":{"description":"Short-lived capability for this verification; pass only to the trusted extension bridge.","type":"string"},"extension_code":{"description":"Code to enter in UniLogin when automatic extension detection is unavailable.","type":"string"},"expires_at":{"description":"Expiry of the extension handoff, in ISO 8601 format.","type":"string"},"extension_bridge_url":{"description":"Trusted UniLogin bridge URL for this attempt.","type":"string"},"extension_store_urls":{"additionalProperties":false,"description":"Official extension store links.","type":"object","properties":{"chrome":{"format":"uri","description":"Chrome extension store URL.","type":"string"},"edge":{"format":"uri","description":"Edge extension store URL.","type":"string"},"firefox":{"format":"uri","description":"Firefox extension store URL.","type":"string"},"safari":{"format":"uri","description":"Safari extension store URL.","type":"string"}}},"extension_download_urls":{"additionalProperties":false,"description":"Official extension download links, for browsers without a store listing.","type":"object","properties":{"edge":{"format":"uri","description":"Edge extension download URL.","type":"string"},"safari":{"format":"uri","description":"Safari extension download URL.","type":"string"}}}}},"unavailable":{"description":"The verification service is not ready; retry after its update. Ordinary authentication methods remain available.","type":"string","enum":["UPDATE_REQUIRED"]}}},{"title":"UniLogin","description":"Complete authentication in the browser extension, then poll the connection using intent_id as the account identifier.","type":"object","required":["type","extension_code","extension_code_expires_at","expires_at","extension_store_urls","extension_download_urls"],"properties":{"type":{"description":"Authentication must be completed through the browser extension.","type":"string","enum":["UNILOGIN"]},"extension_code":{"pattern":"^[23456789ABCDEFGHJKMNPQRSTVWXYZ]{4}(?:-[23456789ABCDEFGHJKMNPQRSTVWXYZ]{4}){2}$","description":"Temporary code to enter in the browser extension to authorize this connection.","type":"string"},"extension_code_expires_at":{"format":"date-time","description":"Expiry of the extension code, in ISO 8601 format.","type":"string"},"expires_at":{"format":"date-time","description":"Expiry of this connection attempt, in ISO 8601 format.","type":"string"},"extension_store_urls":{"additionalProperties":false,"description":"Official extension store links.","type":"object","properties":{"chrome":{"format":"uri","description":"Chrome extension store URL.","type":"string"},"edge":{"format":"uri","description":"Edge extension store URL.","type":"string"},"firefox":{"format":"uri","description":"Firefox extension store URL.","type":"string"},"safari":{"format":"uri","description":"Safari extension store URL.","type":"string"}}},"extension_download_urls":{"additionalProperties":false,"description":"Official extension download links, for browsers without a store listing.","type":"object","properties":{"edge":{"format":"uri","description":"Edge extension download URL.","type":"string"},"safari":{"format":"uri","description":"Safari extension download URL.","type":"string"}}}}},{"title":"Encrypted History","description":"The user must choose whether to unlock the end-to-end encrypted message history, and with which credential.","type":"object","required":["type","options","attempts_remaining"],"properties":{"type":{"type":"string","enum":["ENCRYPTED_HISTORY"]},"options":{"description":"The ways the user can answer. Send the chosen `id` as the `code` of Solve Checkpoint.","type":"array","items":{"type":"object","required":["id","label"],"properties":{"id":{"description":"PIN and RECOVERY_CODE unlock the end-to-end encrypted message history; SKIP leaves it off, and the account then only reports new messages as they arrive.","type":"string","enum":["PIN","RECOVERY_CODE","SKIP"]},"label":{"description":"Human-readable name of the option.","type":"string"},"description":{"description":"Extra detail about what the option entails.","type":"string"},"attempts_remaining":{"description":"How many more times this credential may be submitted. Each credential has a budget of its own, starting at 3, so running one out leaves the others open. A PIN is further capped at half of what the provider still allows, so the user can be wrong here without ever being the reason the backup locks. `0` means the option cannot be used any more; absent on options that take no credential.","type":"integer"}}}},"attempts_remaining":{"description":"The most submissions any credential still has — what the user has left overall. `0` means every credential is spent and only skipping remains. The detail per credential is in `options[].attempts_remaining`; a credential the provider refuses to even try does not consume one.","type":"integer"},"provider_attempts_remaining":{"description":"For a PIN, how many attempts the provider itself still allows before it locks the backup. This budget is the provider's own and is never spent on the user's behalf: when it is unknown or too low, the PIN is refused rather than tried.","type":"integer"},"last_attempt":{"description":"Why the previous submission did not unlock the history. Absent the first time this checkpoint is served, so its presence is what tells the user their last answer failed.","type":"object","required":["option","error"],"properties":{"option":{"description":"PIN and RECOVERY_CODE unlock the end-to-end encrypted message history; SKIP leaves it off, and the account then only reports new messages as they arrive.","type":"string","enum":["PIN","RECOVERY_CODE","SKIP"]},"error":{"description":"INVALID_CREDENTIAL: the PIN or recovery code was wrong, and one attempt was spent. REFUSED_TO_PROTECT_BACKUP: the PIN was not even submitted, because the provider had too few attempts left to risk one — no attempt was spent, and only the recovery code can unlock the history now.","type":"string","enum":["INVALID_CREDENTIAL","REFUSED_TO_PROTECT_BACKUP"]}}}}},{"title":"Process Stopped","description":"A terminal outcome for the current authentication attempt. No checkpoint resolution is expected: stop polling and do not call Solve Checkpoint, Request Checkpoint or Resend Checkpoint for this attempt. Use message, description and link to inform the account owner. To retry authentication, start a new authentication attempt rather than continuing the existing intent.","type":"object","required":["type","message"],"properties":{"type":{"description":"The current authentication attempt has stopped and cannot be continued or resolved.","type":"string","enum":["PROCESS_STOPPED"]},"message":{"description":"The reason why the authentication attempt cannot continue.","type":"string"},"description":{"description":"Additional context or instructions for the account owner, supplementing the main message.","type":"string"},"link":{"description":"An optional resource or action to present to the account owner alongside the message.","type":"object","required":["url","label"],"properties":{"url":{"format":"uri","description":"An absolute HTTP or HTTPS URL providing information or actions relevant to the stopped attempt.","type":"string"},"label":{"description":"The label describing the linked resource or action.","type":"string"}}}}}]},"intent_id":{"description":"The ID of the authentication intent. Use it for the next step required by the checkpoint. For PROCESS_STOPPED, it only identifies the stopped attempt and must not be used to resume or resolve it.","type":"string","pattern":"^acc_(.*)$"}}},{"title":"QR Code","description":"The authentication was started for a QR Code.","type":"object","required":["object","qrcode","intent_id"],"properties":{"object":{"type":"string","enum":["AuthenticationQrCode"]},"qrcode":{"description":"The QR Code to scan.","type":"string"},"intent_id":{"description":"The ID of the auth intent. This should be used to listen for the QR Code scan with Solve Checkpoint.","type":"string","pattern":"^acc_(.*)$"}}}]}}}}}}},"/v2/auth/checkpoint/resend":{"post":{"operationId":"resendCheckpoint","summary":"Resend Checkpoint Notification or Code","tags":["Custom Auth"],"description":"Resend the notification or code for the current checkpoint of the given authentication intent. Use Request Checkpoint to request a different checkpoint.","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["intent_id"],"properties":{"intent_id":{"description":"The ID of the intent for which a checkpoint must be resent.","type":"string","pattern":"^acc_(.*)$"}}}}},"required":true},"x-samples-languages":["node","python","curl"],"x-code-samples":[{"name":"Resend checkpoint","language":"node","install":"npm install unipile","code":"import { UnipileCustomAuth } from 'unipile';\n\nconst ACCOUNT_ID = 'acc_123456789';\n\nconst unipileCustomAuth = new UnipileCustomAuth({ key: 'YOUR_API_KEY' });\n\nconst { data } = await unipileCustomAuth.resendCheckpoint(\n  {\n    body: {\n      intent_id: 'intent_id',\n    },\n  }\n);"},{"name":"Resend checkpoint","language":"python","install":"pip install git+https://github.com/unipile/unipile-python.git","code":"import unipile\n\nACCOUNT_ID = \"acc_123456789\"\n\nconfiguration = unipile.Configuration()\nconfiguration.api_key[\"apiKey\"] = \"YOUR_API_KEY\"\n\nwith unipile.ApiClient(configuration) as api_client:\n    custom_auth_api = unipile.CustomAuthApi(api_client)\n\nresponse = custom_auth_api.resend_checkpoint(\n    {\n    'intent_id': 'intent_id',\n  }\n)"}],"responses":{"204":{"description":"Default Response"}}}},"/v2/auth/intent":{"post":{"operationId":"startAuthIntent","summary":"Start Auth Intent","tags":["Custom Auth"],"description":"Start an auth intent for a provider. This might require handling of checkpoints and oauth flows depending on the provider. Use <a href=\"https://developer.unipile.com/v2.0/reference/createauthlink\">Create Auth Link</a> to let Unipile handle everything for you.","requestBody":{"content":{"application/json":{"schema":{"description":"Start provider authentication or connect an active browser session with UniLogin.","anyOf":[{"title":"Provider authentication","description":"Choose a provider, then its supported authentication method: password, cookies, OAuth, QR code or pairing code. OAuth starts a browser authorization flow without submitting credentials. Omit unilogin for this flow.","allOf":[{"allOf":[{"anyOf":[{"title":"IMAP","description":"Start the authentication intent with IMAP provider.","type":"object","required":["provider","credentials"],"properties":{"provider":{"description":"The provider to authenticate with.","type":"string","enum":["imap"]},"credentials":{"anyOf":[{"title":"Password authentication (automatic server settings)","description":"Basic authentication, our servers will try to guess the correct IMAP/SMTP connection parameters for your IMAP provider. If this fails, an error will be returned and you should use the full authentication method.","type":"object","required":["user","password"],"properties":{"user":{"description":"Username","type":"string"},"password":{"description":"Password","type":"string"}}},{"title":"Password authentication (manual server settings)","description":"Full authentication, you can manually specify the IMAP/SMTP connection parameters. This is useful if the basic authentication method fails.","type":"object","required":["imap","smtp"],"properties":{"imap":{"title":"IMAP connections parameters","type":"object","allOf":[{"title":"Password authentication (automatic server settings)","description":"Basic authentication, our servers will try to guess the correct IMAP/SMTP connection parameters for your IMAP provider. If this fails, an error will be returned and you should use the full authentication method.","type":"object","required":["user","password"],"properties":{"user":{"description":"Username","type":"string"},"password":{"description":"Password","type":"string"}}},{"type":"object","required":["host","port"],"properties":{"host":{"description":"Server url/ip","type":"string"},"encryption":{"default":"default","description":"The encryption method to use for the connection.\n              - `tls` will use the TLS encryption method.\n              - `ssl` will use the SSL encryption method.\n              - `starttls` will use the STARTTLS encryption method.\n              - `default` will use the default encryption method for the server.","type":"string","enum":["tls","ssl","starttls","default"]},"port":{"description":"Server port","type":"number"}}}]},"smtp":{"title":"SMTP connections parameters","type":"object","allOf":[{"title":"Password authentication (automatic server settings)","description":"Basic authentication, our servers will try to guess the correct IMAP/SMTP connection parameters for your IMAP provider. If this fails, an error will be returned and you should use the full authentication method.","type":"object","required":["user","password"],"properties":{"user":{"description":"Username","type":"string"},"password":{"description":"Password","type":"string"}}},{"type":"object","required":["host","port"],"properties":{"host":{"description":"Server url/ip","type":"string"},"encryption":{"default":"default","description":"The encryption method to use for the connection.\n              - `tls` will use the TLS encryption method.\n              - `ssl` will use the SSL encryption method.\n              - `starttls` will use the STARTTLS encryption method.\n              - `default` will use the default encryption method for the server.","type":"string","enum":["tls","ssl","starttls","default"]},"port":{"description":"Server port","type":"number"}}}]}}}]},"config":{"additionalProperties":true,"description":"IMAP specific configuration.","type":"object","properties":{"custom_proxy":{"title":"Custom proxy","description":"A custom proxy used to connect to the account provider. When Automatic Proxy Protection applies to the provider, Unipile manages the proxy by default. A custom proxy overrides Automatic Proxy Protection. Read more in the Proxy documentation.","type":"object","required":["host","port"],"properties":{"host":{"minLength":1,"maxLength":255,"description":"The hostname or IP address of the proxy, without a scheme, port, path or credentials. Enclose IPv6 addresses in brackets.","type":"string"},"port":{"minimum":1,"maximum":65535,"description":"The port of the proxy, between 1 and 65535.","type":"integer"},"username":{"description":"The username to connect to the proxy. Omitted, null or empty credentials select unauthenticated access when both credentials are absent. SOCKS5 requires both a non-empty username and password for authentication, each at most 255 bytes.","anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}]},"password":{"description":"The password to connect to the proxy. Omitted, null or empty credentials select unauthenticated access when both credentials are absent. SOCKS5 requires both a non-empty username and password for authentication, each at most 255 bytes. HTTP Basic authentication permits an empty username or password.","anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}]},"protocol":{"default":"https","description":"The protocol of the proxy. Defaults to `https`.\n        - `https` is HTTPS.\n        - `http` is HTTP.\n          - `socks5` is SOCKS5.\n          - `socks4` is SOCKS4.","type":"string","enum":["https","http","socks5","socks4"]}}},"initial_sync_enable":{"description":"Whether initial sync is enabled. Defaults to false for new accounts. When reconnecting, omitting this field preserves the current setting. Re-enabling starts a fresh initial sync. Initial sync is required for advanced search. Read more in the Synced Accounts guide.","type":"boolean"}}}}},{"title":"WhatsApp","description":"Start the authentication intent with WhatsApp provider.","type":"object","required":["provider","credentials"],"properties":{"provider":{"description":"The provider to authenticate with.","type":"string","enum":["whatsapp"]},"credentials":{"description":"Choose QR code or pairing code authentication.","anyOf":[{"title":"QR code","description":"Authenticate by scanning a QR code with the WhatsApp mobile app.","type":"object","required":["qrcode"],"properties":{"qrcode":{"description":"This must be set to `true`","type":"boolean"}}},{"title":"Pairing code","description":"Authenticate by entering a pairing code on the WhatsApp mobile app.","type":"object","required":["phone_number"],"properties":{"phone_number":{"description":"Phone number to link, in international format with digits only (no `+`, spaces or separators), e.g. `33612345678`. A pairing code will be returned to enter on this phone.","type":"string"}}}]},"config":{"additionalProperties":true,"description":"WhatsApp specific configuration.","type":"object","properties":{"custom_proxy":{"title":"Custom proxy","description":"A custom proxy used to connect to the account provider. When Automatic Proxy Protection applies to the provider, Unipile manages the proxy by default. A custom proxy overrides Automatic Proxy Protection. Read more in the Proxy documentation.","type":"object","required":["host","port"],"properties":{"host":{"minLength":1,"maxLength":255,"description":"The hostname or IP address of the proxy, without a scheme, port, path or credentials. Enclose IPv6 addresses in brackets.","type":"string"},"port":{"minimum":1,"maximum":65535,"description":"The port of the proxy, between 1 and 65535.","type":"integer"},"username":{"description":"The username to connect to the proxy. Omitted, null or empty credentials select unauthenticated access when both credentials are absent. SOCKS5 requires both a non-empty username and password for authentication, each at most 255 bytes.","anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}]},"password":{"description":"The password to connect to the proxy. Omitted, null or empty credentials select unauthenticated access when both credentials are absent. SOCKS5 requires both a non-empty username and password for authentication, each at most 255 bytes. HTTP Basic authentication permits an empty username or password.","anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}]},"protocol":{"default":"https","description":"The protocol of the proxy. Defaults to `https`.\n        - `https` is HTTPS.\n        - `http` is HTTP.\n          - `socks5` is SOCKS5.\n          - `socks4` is SOCKS4.","type":"string","enum":["https","http","socks5","socks4"]}}},"auto_proxy_config":{"description":"Country preferences for automatic proxy assignment. Explicitly selected countries must be part of Unipile’s proxy offering for the provider. If omitted, Unipile determines the preferred country automatically. The fallback setting determines whether an available proxy from another country may be used when no proxy is available in the preferred country.","title":"Automatic proxy configuration","type":"object","properties":{"country":{"description":"An ISO 3166-1 alpha-2 country code for the automatic proxy location, normalized to uppercase. Choose from the <a href=\"https://developer.unipile.com/v2.0/docs/proxys#countries\">countries where Unipile offers automatic proxies</a>. A proxy may be temporarily unavailable even in a country included in the offering.","type":"string"},"ip":{"description":"An IPv4 address used to infer the automatic proxy location. If Unipile does not offer proxies in the inferred country, or no proxy is currently available there, allow_country_fallback controls whether an available proxy from another country may be used.","type":"string"},"allow_country_fallback":{"default":true,"description":"Whether an available proxy from another country may be used when none is available in the rotation country, during authentication and throughout the account lifetime. Defaults to true. An explicitly selected country must be part of Unipile’s proxy offering for the provider, even when fallback is allowed. A proxy may be temporarily unavailable in a country included in the offering. Authentication fails if no proxy is available in any allowed country. If false, authentication fails when no proxy is available in the rotation country. If the selected proxy later fails and no replacement is available there, the account enters Service interruption. Rotation to another available proxy in that country remains allowed.","type":"boolean"}}}}}}},{"title":"LinkedIn","description":"Start the authentication intent with LinkedIn provider.","type":"object","required":["provider","credentials"],"properties":{"provider":{"description":"The provider to authenticate with.","type":"string","enum":["linkedin"]},"user_timezone":{"description":"The time zone of the current user can be used on a few specific features (e.g. scheduled actions). Setting it at authentication avoids having to do it on a case-by-case basis later on.","type":"string"},"user_language":{"maxLength":64,"pattern":"^[A-Za-z]{1,8}(?:-[A-Za-z0-9]{1,8})*$","description":"Primary browser language captured with the session cookies.","type":"string"},"user_languages":{"maxItems":10,"uniqueItems":true,"description":"Ordered browser language preferences captured with the session cookies.","type":"array","items":{"maxLength":64,"pattern":"^[A-Za-z]{1,8}(?:-[A-Za-z0-9]{1,8})*$","type":"string"}},"credentials":{"description":"The user credentials required by the provider to authenticate with.","anyOf":[{"title":"Password authentication","description":"Use email and password to authenticate with LinkedIn.","type":"object","required":["username","password"],"properties":{"username":{"description":"Email or phone of the LinkedIn account.","type":"string"},"password":{"description":"Password of the LinkedIn account.","type":"string"},"user_agent":{"description":"A custom user agent if you need the session to be started from a specific browser. You can easily get it in the browser's console with this command : `console.log(navigator.userAgent)`","type":"string"}}},{"title":"Cookie authentication","description":"Use the `li_at` and `li_a` cookies to authenticate with LinkedIn.","type":"object","required":["access_token","user_agent"],"properties":{"access_token":{"description":"The access token to authenticate with. This is the `li_at` cookie value.","type":"string"},"premium_access_token":{"description":"The access token to authenticate Recruiter or Sales Navigator with. This is the `li_a` cookie value.","type":"string"},"user_agent":{"description":"The exact user agent of the browser on which the session has been started. You can easily get it in the browser's console with this command : `console.log(navigator.userAgent)`","type":"string"}}}]},"config":{"additionalProperties":true,"description":"LinkedIn specific configuration.","type":"object","properties":{"custom_proxy":{"title":"Custom proxy","description":"A custom proxy used to connect to the account provider. When Automatic Proxy Protection applies to the provider, Unipile manages the proxy by default. A custom proxy overrides Automatic Proxy Protection. Read more in the Proxy documentation.","type":"object","required":["host","port"],"properties":{"host":{"minLength":1,"maxLength":255,"description":"The hostname or IP address of the proxy, without a scheme, port, path or credentials. Enclose IPv6 addresses in brackets.","type":"string"},"port":{"minimum":1,"maximum":65535,"description":"The port of the proxy, between 1 and 65535.","type":"integer"},"username":{"description":"The username to connect to the proxy. Omitted, null or empty credentials select unauthenticated access when both credentials are absent. SOCKS5 requires both a non-empty username and password for authentication, each at most 255 bytes.","anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}]},"password":{"description":"The password to connect to the proxy. Omitted, null or empty credentials select unauthenticated access when both credentials are absent. SOCKS5 requires both a non-empty username and password for authentication, each at most 255 bytes. HTTP Basic authentication permits an empty username or password.","anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}]},"protocol":{"default":"https","description":"The protocol of the proxy. Defaults to `https`.\n        - `https` is HTTPS.\n        - `http` is HTTP.\n          - `socks5` is SOCKS5.\n          - `socks4` is SOCKS4.","type":"string","enum":["https","http","socks5","socks4"]}}},"auto_proxy_config":{"description":"Country preferences for automatic proxy assignment. Explicitly selected countries must be part of Unipile’s proxy offering for the provider. If omitted, Unipile determines the preferred country automatically. The fallback setting determines whether an available proxy from another country may be used when no proxy is available in the preferred country.","title":"Automatic proxy configuration","type":"object","properties":{"country":{"description":"An ISO 3166-1 alpha-2 country code for the automatic proxy location, normalized to uppercase. Choose from the <a href=\"https://developer.unipile.com/v2.0/docs/proxys#countries\">countries where Unipile offers automatic proxies</a>. A proxy may be temporarily unavailable even in a country included in the offering.","type":"string"},"ip":{"description":"An IPv4 address used to infer the automatic proxy location. If Unipile does not offer proxies in the inferred country, or no proxy is currently available there, allow_country_fallback controls whether an available proxy from another country may be used.","type":"string"},"allow_country_fallback":{"default":true,"description":"Whether an available proxy from another country may be used when none is available in the rotation country, during authentication and throughout the account lifetime. Defaults to true. An explicitly selected country must be part of Unipile’s proxy offering for the provider, even when fallback is allowed. A proxy may be temporarily unavailable in a country included in the offering. Authentication fails if no proxy is available in any allowed country. If false, authentication fails when no proxy is available in the rotation country. If the selected proxy later fails and no replacement is available there, the account enters Service interruption. Rotation to another available proxy in that country remains allowed.","type":"boolean"}}},"products":{"default":["classic","company","recruiter","sales_navigator"],"minItems":1,"uniqueItems":true,"description":"Specifies which LinkedIn products are allowed to be activated (as long as the account actually has the relevant subscriptions). By default, all products are made available.<br>When reconnecting an account, just omit this field to keep allowing access to the same products, or provide new values to expand or narrow the scope. <a href=\"https://developer.unipile.com/v2.0/docs/linkedin-link-accounts\">Learn more about Linkedin products</a>\n      `classic` : Personnal Social network<br>\n      `recruiter` : Recruiter<br>\n      `sales_navigator` : Sales Navigator<br>\n      `company` : Company Pages\n      ","type":"array","items":{"type":"string","enum":["classic","company","recruiter","sales_navigator"]}},"allow_product_selection":{"default":false,"description":"When true, return a product selection checkpoint after authentication, even when only one LinkedIn product is available. When false, all available products are selected automatically, except Recruiter when Sales Navigator is also available.","type":"boolean"}}}}},{"title":"Mock","description":"Start the authentication intent with Mock provider.","type":"object","required":["provider","credentials"],"properties":{"provider":{"description":"The provider to authenticate with.","type":"string","enum":["mock"]},"credentials":{"description":"Test accounts do not have credentials, leave this as empty object.","type":"object","properties":{}}}},{"title":"OAuth (Google, Outlook)","description":"Start browser-based authorization with Google or Outlook. No credentials are submitted in this request; the user authenticates on the provider authorization page.","type":"object","required":["provider","oauth_callback_redirect_uri"],"properties":{"provider":{"description":"The provider that use Oauth as authentication method.\n    - `google` is Google.\n    - `outlook` is Outlook.","type":"string","enum":["google","outlook"]},"oauth_callback_redirect_uri":{"description":"The URL to redirect to after the user has authenticated using the Provider's oAuth screen.","type":"string"},"login_hint":{"description":"Uses the hint to simplify the login flow either by prefilling the email / username / phone number field in the authentication form.","type":"string"},"config":{"additionalProperties":true,"description":"Oauth authentication configuration.","type":"object","properties":{"custom_proxy":{"title":"Custom proxy","description":"A custom proxy used to connect to the account provider. When Automatic Proxy Protection applies to the provider, Unipile manages the proxy by default. A custom proxy overrides Automatic Proxy Protection. Read more in the Proxy documentation.","type":"object","required":["host","port"],"properties":{"host":{"minLength":1,"maxLength":255,"description":"The hostname or IP address of the proxy, without a scheme, port, path or credentials. Enclose IPv6 addresses in brackets.","type":"string"},"port":{"minimum":1,"maximum":65535,"description":"The port of the proxy, between 1 and 65535.","type":"integer"},"username":{"description":"The username to connect to the proxy. Omitted, null or empty credentials select unauthenticated access when both credentials are absent. SOCKS5 requires both a non-empty username and password for authentication, each at most 255 bytes.","anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}]},"password":{"description":"The password to connect to the proxy. Omitted, null or empty credentials select unauthenticated access when both credentials are absent. SOCKS5 requires both a non-empty username and password for authentication, each at most 255 bytes. HTTP Basic authentication permits an empty username or password.","anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}]},"protocol":{"default":"https","description":"The protocol of the proxy. Defaults to `https`.\n        - `https` is HTTPS.\n        - `http` is HTTP.\n          - `socks5` is SOCKS5.\n          - `socks4` is SOCKS4.","type":"string","enum":["https","http","socks5","socks4"]}}},"oauth_scope":{"minItems":1,"description":"The final list of authorizations to request from the Provider. Use this field to expand or narrow the scope of API access. For example, if your application only uses the Calendar API, you may request authorization solely for the calendar, excluding email access for providers like Google. Make sure to give only authorizations accepted by your registered provider application. For a new account, omitting this field requests the authorizations defined in the Provider OAuth settings. For a reconnect, omitting it preserves already granted authorizations and adds the authorizations currently defined in the Provider OAuth settings.","type":"array","items":{"minLength":1,"type":"string"}}}}}},{"title":"Telegram","description":"Start the authentication intent with Telegram provider.","type":"object","required":["provider","credentials"],"properties":{"provider":{"description":"The provider to authenticate with.","type":"string","enum":["telegram"]},"credentials":{"title":"QR code","description":"Start authentication by scanning a QR code with the Telegram mobile app.","type":"object","required":["qrcode"],"properties":{"qrcode":{"description":"This must be set to `true`","type":"boolean"},"twofa":{"description":"The 2FA code to authenticate with.","type":"string"}}},"config":{"additionalProperties":true,"description":"Telegram specific configuration.","type":"object","properties":{"custom_proxy":{"title":"Custom proxy","description":"A custom proxy used to connect to the account provider. When Automatic Proxy Protection applies to the provider, Unipile manages the proxy by default. A custom proxy overrides Automatic Proxy Protection. Read more in the Proxy documentation.","type":"object","required":["host","port"],"properties":{"host":{"minLength":1,"maxLength":255,"description":"The hostname or IP address of the proxy, without a scheme, port, path or credentials. Enclose IPv6 addresses in brackets.","type":"string"},"port":{"minimum":1,"maximum":65535,"description":"The port of the proxy, between 1 and 65535.","type":"integer"},"username":{"description":"The username to connect to the proxy. Omitted, null or empty credentials select unauthenticated access when both credentials are absent. SOCKS5 requires both a non-empty username and password for authentication, each at most 255 bytes.","anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}]},"password":{"description":"The password to connect to the proxy. Omitted, null or empty credentials select unauthenticated access when both credentials are absent. SOCKS5 requires both a non-empty username and password for authentication, each at most 255 bytes. HTTP Basic authentication permits an empty username or password.","anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}]},"protocol":{"default":"https","description":"The protocol of the proxy. Defaults to `https`.\n        - `https` is HTTPS.\n        - `http` is HTTP.\n          - `socks5` is SOCKS5.\n          - `socks4` is SOCKS4.","type":"string","enum":["https","http","socks5","socks4"]}}}}}}},{"title":"Instagram","description":"Start the authentication intent with Instagram provider.","type":"object","required":["provider","credentials"],"properties":{"provider":{"description":"The provider to authenticate with.","type":"string","enum":["instagram"]},"credentials":{"description":"The user credentials required by the provider to authenticate with.","anyOf":[{"title":"Password authentication","description":"Use username and password to authenticate with Instagram.","type":"object","required":["username","password"],"properties":{"username":{"description":"The username of the Instagram account.","type":"string"},"password":{"description":"The password of the Instagram account.","type":"string"},"user_agent":{"description":"A custom user agent if you need the session to be started from a specific desktop browser. You can get it in the browser's console with `console.log(navigator.userAgent)`. In Hosted Auth, this is collected automatically from the user's browser. When reconnecting an Account, the user agent it already uses is kept.","type":"string"}}},{"title":"Cookie authentication","description":"Use the `sessionid` cookie to authenticate with Instagram.","type":"object","required":["sessionid"],"properties":{"sessionid":{"description":"The sessionid cookie value.","type":"string"},"user_agent":{"description":"The exact user agent of the browser on which the session has been started. You can get it in the browser's console with `console.log(navigator.userAgent)`. In Hosted Auth, this is collected automatically from the user's browser. When reconnecting an Account, the user agent it already uses is kept.","type":"string"}}}]},"config":{"additionalProperties":true,"description":"Instagram specific configuration.","type":"object","properties":{"custom_proxy":{"title":"Custom proxy","description":"A custom proxy used to connect to the account provider. When Automatic Proxy Protection applies to the provider, Unipile manages the proxy by default. A custom proxy overrides Automatic Proxy Protection. Read more in the Proxy documentation.","type":"object","required":["host","port"],"properties":{"host":{"minLength":1,"maxLength":255,"description":"The hostname or IP address of the proxy, without a scheme, port, path or credentials. Enclose IPv6 addresses in brackets.","type":"string"},"port":{"minimum":1,"maximum":65535,"description":"The port of the proxy, between 1 and 65535.","type":"integer"},"username":{"description":"The username to connect to the proxy. Omitted, null or empty credentials select unauthenticated access when both credentials are absent. SOCKS5 requires both a non-empty username and password for authentication, each at most 255 bytes.","anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}]},"password":{"description":"The password to connect to the proxy. Omitted, null or empty credentials select unauthenticated access when both credentials are absent. SOCKS5 requires both a non-empty username and password for authentication, each at most 255 bytes. HTTP Basic authentication permits an empty username or password.","anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}]},"protocol":{"default":"https","description":"The protocol of the proxy. Defaults to `https`.\n        - `https` is HTTPS.\n        - `http` is HTTP.\n          - `socks5` is SOCKS5.\n          - `socks4` is SOCKS4.","type":"string","enum":["https","http","socks5","socks4"]}}},"auto_proxy_config":{"description":"Country preferences for automatic proxy assignment. Explicitly selected countries must be part of Unipile’s proxy offering for the provider. If omitted, Unipile determines the preferred country automatically. The fallback setting determines whether an available proxy from another country may be used when no proxy is available in the preferred country.","title":"Automatic proxy configuration","type":"object","properties":{"country":{"description":"An ISO 3166-1 alpha-2 country code for the automatic proxy location, normalized to uppercase. Choose from the <a href=\"https://developer.unipile.com/v2.0/docs/proxys#countries\">countries where Unipile offers automatic proxies</a>. A proxy may be temporarily unavailable even in a country included in the offering.","type":"string"},"ip":{"description":"An IPv4 address used to infer the automatic proxy location. If Unipile does not offer proxies in the inferred country, or no proxy is currently available there, allow_country_fallback controls whether an available proxy from another country may be used.","type":"string"},"allow_country_fallback":{"default":true,"description":"Whether an available proxy from another country may be used when none is available in the rotation country, during authentication and throughout the account lifetime. Defaults to true. An explicitly selected country must be part of Unipile’s proxy offering for the provider, even when fallback is allowed. A proxy may be temporarily unavailable in a country included in the offering. Authentication fails if no proxy is available in any allowed country. If false, authentication fails when no proxy is available in the rotation country. If the selected proxy later fails and no replacement is available there, the account enters Service interruption. Rotation to another available proxy in that country remains allowed.","type":"boolean"}}},"allow_methods":{"minItems":1,"uniqueItems":true,"description":"The authentication methods to show in the hosted auth.\n          `credentials` : Credentials Authentication\n          `cookies` : Cookies Authentication\n          `unilogin` : Connect the active browser session through the UniLogin extension\n        ","default":["credentials","unilogin"],"type":"array","items":{"type":"string","enum":["credentials","cookies","unilogin"]}}}}}},{"title":"Facebook","description":"Start the authentication intent with the Facebook provider.","type":"object","required":["provider","credentials"],"properties":{"provider":{"description":"The provider to authenticate with.","type":"string","enum":["facebook"]},"user_agent":{"description":"The exact user agent of the browser used to retrieve the cookies. You can get it in the browser's console with `console.log(navigator.userAgent)`. In Hosted Auth, this is collected automatically from the user's browser. When reconnecting an Account, the user agent it already uses is kept.","type":"string"},"credentials":{"description":"The user credentials required by the provider to authenticate with.","anyOf":[{"title":"Password authentication","description":"Use Facebook credentials to authenticate with Meta messaging.","additionalProperties":false,"type":"object","required":["username","password"],"properties":{"username":{"description":"Email or username of the Facebook account.","type":"string"},"password":{"description":"Password of the Facebook account.","type":"string"}}},{"title":"Cookie authentication","description":"Use Facebook or Messenger cookies to authenticate with Meta messaging.","additionalProperties":false,"type":"object","required":["xs","c_user","datr"],"properties":{"xs":{"description":"The `xs` cookie value.","type":"string"},"c_user":{"description":"The `c_user` cookie value.","type":"string"},"datr":{"description":"The `datr` cookie value.","type":"string"},"sb":{"description":"Optional `sb` cookie value.","type":"string"},"fr":{"description":"Optional `fr` cookie value.","type":"string"},"wd":{"description":"Optional `wd` cookie value.","type":"string"},"presence":{"description":"Optional `presence` cookie value.","type":"string"},"oo":{"description":"Optional `oo` cookie value.","type":"string"}}}]},"config":{"additionalProperties":true,"description":"Facebook provider specific configuration.","type":"object","properties":{"custom_proxy":{"title":"Custom proxy","description":"A custom proxy used to connect to the account provider. When Automatic Proxy Protection applies to the provider, Unipile manages the proxy by default. A custom proxy overrides Automatic Proxy Protection. Read more in the Proxy documentation.","type":"object","required":["host","port"],"properties":{"host":{"minLength":1,"maxLength":255,"description":"The hostname or IP address of the proxy, without a scheme, port, path or credentials. Enclose IPv6 addresses in brackets.","type":"string"},"port":{"minimum":1,"maximum":65535,"description":"The port of the proxy, between 1 and 65535.","type":"integer"},"username":{"description":"The username to connect to the proxy. Omitted, null or empty credentials select unauthenticated access when both credentials are absent. SOCKS5 requires both a non-empty username and password for authentication, each at most 255 bytes.","anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}]},"password":{"description":"The password to connect to the proxy. Omitted, null or empty credentials select unauthenticated access when both credentials are absent. SOCKS5 requires both a non-empty username and password for authentication, each at most 255 bytes. HTTP Basic authentication permits an empty username or password.","anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}]},"protocol":{"default":"https","description":"The protocol of the proxy. Defaults to `https`.\n        - `https` is HTTPS.\n        - `http` is HTTP.\n          - `socks5` is SOCKS5.\n          - `socks4` is SOCKS4.","type":"string","enum":["https","http","socks5","socks4"]}}},"auto_proxy_config":{"description":"Country preferences for automatic proxy assignment. Explicitly selected countries must be part of Unipile’s proxy offering for the provider. If omitted, Unipile determines the preferred country automatically. The fallback setting determines whether an available proxy from another country may be used when no proxy is available in the preferred country.","title":"Automatic proxy configuration","type":"object","properties":{"country":{"description":"An ISO 3166-1 alpha-2 country code for the automatic proxy location, normalized to uppercase. Choose from the <a href=\"https://developer.unipile.com/v2.0/docs/proxys#countries\">countries where Unipile offers automatic proxies</a>. A proxy may be temporarily unavailable even in a country included in the offering.","type":"string"},"ip":{"description":"An IPv4 address used to infer the automatic proxy location. If Unipile does not offer proxies in the inferred country, or no proxy is currently available there, allow_country_fallback controls whether an available proxy from another country may be used.","type":"string"},"allow_country_fallback":{"default":true,"description":"Whether an available proxy from another country may be used when none is available in the rotation country, during authentication and throughout the account lifetime. Defaults to true. An explicitly selected country must be part of Unipile’s proxy offering for the provider, even when fallback is allowed. A proxy may be temporarily unavailable in a country included in the offering. Authentication fails if no proxy is available in any allowed country. If false, authentication fails when no proxy is available in the rotation country. If the selected proxy later fails and no replacement is available there, the account enters Service interruption. Rotation to another available proxy in that country remains allowed.","type":"boolean"}}},"surface":{"description":"Meta web surface used to bootstrap the session. `facebook` uses facebook.com/messages (default), `messenger` uses messenger.com.","default":"facebook","anyOf":[{"type":"string","enum":["facebook"]},{"type":"string","enum":["messenger"]}]},"products":{"default":["messaging","page"],"minItems":1,"uniqueItems":true,"description":"Specifies which Facebook products are allowed to be activated (as long as the account actually has access to them). By default, all products are made available. `messaging` is always activated.\n      `messaging` : Messenger inbox of the account<br>\n      `page` : Facebook Pages administered by the account — each Page is an inbox (`PAGE_<page_id>_INBOX`) whose chats are answered as the Page\n      ","type":"array","items":{"type":"string","enum":["messaging","page"]}},"page_ids":{"uniqueItems":true,"description":"With the `page` product: the Facebook Pages that can be activated, by id (the Page messaging id, as in `PAGE_<page_id>_INBOX`). By default, every Page the account administers. Without `allow_product_selection` they are all activated; with it, they are the ones offered for selection. Each activated Page runs as its own product `page_<page_id>`, with its own connection status.","type":"array","items":{"type":"string"}},"allow_product_selection":{"default":false,"description":"When true, return a product selection checkpoint after authentication, even when the account administers no Facebook Page. When false, all available products are selected automatically.","type":"boolean"},"allow_methods":{"description":"The authentication methods to show in Hosted Auth.\n          `credentials`: Credentials authentication\n          `cookies`: Cookie authentication\n          `unilogin`: Connect the active browser session through the UniLogin extension\n        ","default":["credentials","cookies","unilogin"],"type":"array","items":{"type":"string","enum":["credentials","cookies","unilogin"]}}}}}}]},{"type":"object","properties":{"account_scope_id":{"description":"The Scope assigned to a newly linked account. Cannot be specified when reconnecting an existing account.","type":"string","pattern":"^scope_(.*)$"},"state":{"description":"State data sent in the `account.add` / `account.reconnect` webhook payload after the authentication process.","type":"string"},"account_id":{"description":"The ID of the Account to re-authenticate or reconfigure. The account may be running, partially connected, or disconnected, and `provider` must match its provider. Reconnecting always refreshes the entire account and restarts all configured products. If not specified, a new account is linked.","type":"string","pattern":"^acc_(.*)$"}}}]},{"type":"object","not":{"required":["unilogin"]}}]},{"additionalProperties":false,"title":"UniLogin (browser extension)","description":"Connect the active LinkedIn, Instagram or Facebook browser session through the UniLogin extension. No credentials are submitted in this request.","type":"object","required":["provider","unilogin"],"properties":{"provider":{"description":"The provider to connect with UniLogin.","type":"string","enum":["linkedin","instagram","facebook"]},"account_id":{"description":"The existing LinkedIn, Instagram or Facebook Account to reconnect. Omit it to link a new Account.","type":"string","pattern":"^acc_(.*)$"},"account_scope_id":{"description":"The Scope assigned to a newly linked account. Cannot be specified when reconnecting an existing account.","type":"string","pattern":"^scope_(.*)$"},"state":{"maxLength":4096,"description":"State data sent in the account.add or account.reconnect webhook after completion.","type":"string"},"config":{"additionalProperties":false,"description":"LinkedIn products and managed proxy selection. Credential-bearing custom_proxy configuration is not accepted in this asynchronous flow.","type":"object","properties":{"products":{"minItems":1,"uniqueItems":true,"type":"array","items":{"type":"string","enum":["classic","company","recruiter","sales_navigator"]}},"auto_proxy_config":{"description":"Country preferences for automatic proxy assignment. Explicitly selected countries must be part of Unipile’s proxy offering for the provider. If omitted, Unipile determines the preferred country automatically. The fallback setting determines whether an available proxy from another country may be used when no proxy is available in the preferred country.","title":"Automatic proxy configuration","type":"object","properties":{"country":{"description":"An ISO 3166-1 alpha-2 country code for the automatic proxy location, normalized to uppercase. Choose from the <a href=\"https://developer.unipile.com/v2.0/docs/proxys#countries\">countries where Unipile offers automatic proxies</a>. A proxy may be temporarily unavailable even in a country included in the offering.","type":"string"},"ip":{"description":"An IPv4 address used to infer the automatic proxy location. If Unipile does not offer proxies in the inferred country, or no proxy is currently available there, allow_country_fallback controls whether an available proxy from another country may be used.","type":"string"},"allow_country_fallback":{"default":true,"description":"Whether an available proxy from another country may be used when none is available in the rotation country, during authentication and throughout the account lifetime. Defaults to true. An explicitly selected country must be part of Unipile’s proxy offering for the provider, even when fallback is allowed. A proxy may be temporarily unavailable in a country included in the offering. Authentication fails if no proxy is available in any allowed country. If false, authentication fails when no proxy is available in the rotation country. If the selected proxy later fails and no replacement is available there, the account enters Service interruption. Rotation to another available proxy in that country remains allowed.","type":"boolean"}}}}},"unilogin":{"description":"Use the UniLogin extension instead of submitting credentials.","type":"boolean","enum":[true]}}}]}}},"description":"Start provider authentication or connect an active browser session with UniLogin."},"x-samples-languages":["node","python","curl"],"x-code-samples":[{"name":"Start auth intent","language":"node","install":"npm install unipile","code":"import { UnipileCustomAuth } from 'unipile';\n\nconst ACCOUNT_ID = 'acc_123456789';\n\nconst unipileCustomAuth = new UnipileCustomAuth({ key: 'YOUR_API_KEY' });\n\nconst { data } = await unipileCustomAuth.startAuthIntent(\n  {\n    body: {\n      provider: 'imap',\n      credentials: {\n        user: 'value',\n        password: 'value',\n      },\n    },\n  }\n);"},{"name":"Start auth intent","language":"python","install":"pip install git+https://github.com/unipile/unipile-python.git","code":"import unipile\n\nACCOUNT_ID = \"acc_123456789\"\n\nconfiguration = unipile.Configuration()\nconfiguration.api_key[\"apiKey\"] = \"YOUR_API_KEY\"\n\nwith unipile.ApiClient(configuration) as api_client:\n    custom_auth_api = unipile.CustomAuthApi(api_client)\n\nresponse = custom_auth_api.start_auth_intent(\n    {\n    'provider': 'imap',\n    'credentials': {\n      'user': 'value',\n      'password': 'value',\n    },\n  }\n)"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"anyOf":[{"title":"Checkpoint","description":"Authentication requires another step or has stopped and cannot continue.","type":"object","required":["object","checkpoint","intent_id"],"properties":{"object":{"type":"string","enum":["AuthenticationCheckpoint"]},"checkpoint":{"description":"The next authentication step, or a notice that the current attempt cannot continue.","anyOf":[{"title":"One-Time Password","description":"A one-time password was sent to the user's phone or email address. The user needs to enter the code in the next checkpoint.","type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["OTP"]},"channel":{"description":"The channel the one-time password was sent through, when known.","type":"string","enum":["EMAIL","SMS","WHATSAPP"]}}},{"title":"In App Validation","description":"A notification was sent to the user's phone. The user needs to validate the notification by clicking on the link in the notification.","type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["IN_APP_VALIDATION"]},"code":{"description":"For number-matching approvals: the digits shown here that the user must select among the choices in their notification.","type":"string"}}},{"title":"Pairing Code","description":"A pairing code must be entered in the provider app to complete authentication.","type":"object","required":["type","code"],"properties":{"type":{"type":"string","enum":["PAIRING_CODE"]},"code":{"description":"The pairing code to enter on the phone to link the device.","type":"string"}}},{"title":"Phone Register","description":"The user needs to register their phone number so an OTP can be sent.","type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["PHONE_REGISTER"]}}},{"title":"Two Factor Authentication","description":"The user needs to enter the code generated by the Authenticator App used to setup 2FA or received by SMS.","type":"object","required":["type","platform"],"properties":{"type":{"type":"string","enum":["2FA"]},"platform":{"description":"The platform of the 2FA.\n          - `SMS` means the code was sent in a SMS.\n          - `APP` means the user must enter the code generated by the Authenticator App used to setup 2FA.\n          - `WHATSAPP` means the code was sent via WhatsApp.","type":"string","enum":["SMS","APP","WHATSAPP"]}}},{"title":"Captcha","description":"The user needs to solve a captcha checkpoint.","type":"object","required":["type","public_key","data"],"properties":{"type":{"type":"string","enum":["CAPTCHA"]},"public_key":{"description":"The public key of the CAPTCHA. This is used to verify the CAPTCHA.","anyOf":[{"type":"string"},{"type":"null"}]},"data":{"description":"The data of the CAPTCHA. This is used to verify the CAPTCHA.","anyOf":[{"type":"string"},{"type":"null"}]}}},{"title":"OTP or In App Validation","description":"The user can either enter a one-time password sent to their phone/email or validate a notification sent to their phone.","type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["OTP_OR_IN_APP_VALIDATION"]},"channel":{"description":"The channel the one-time password was sent through, when known.","type":"string","enum":["EMAIL","SMS","WHATSAPP"]}}},{"title":"Contract Selection","description":"The user must pick a contract from a list to activate the correct features and complete authentication.","type":"object","required":["type","contracts"],"properties":{"type":{"type":"string","enum":["CONTRACT_SELECTION"]},"contracts":{"description":"A list of contracts to choose from.","type":"array","items":{"type":"object","required":["id","name"],"properties":{"id":{"description":"The ID of the contract.","type":"string"},"name":{"description":"The name of the contract.","type":"string"}}}}}},{"title":"Consent Screen","description":"The user must select the products that will be activated on the account.","type":"object","required":["type","products"],"properties":{"type":{"type":"string","enum":["CONSENT_SCREEN"]},"products":{"description":"A list of products to choose from.","type":"array","items":{"type":"object","required":["id","display_name"],"properties":{"id":{"description":"The ID of the product.","type":"string"},"display_name":{"description":"The display name of the product.","type":"string"},"description":{"description":"What the product gives access to, shown under its name.","type":"string"},"icon_url":{"description":"An image of the product's own (e.g. a Page's picture), shown instead of the provider icon.","type":"string"}}}}}},{"title":"Challenge Selection","description":"The user must pick which alternative verification method to use to receive their code.","type":"object","required":["type","challenges"],"properties":{"type":{"type":"string","enum":["CHALLENGE_SELECTION"]},"challenges":{"description":"A list of alternative verification methods to choose from.","type":"array","items":{"type":"object","required":["id","label"],"properties":{"id":{"description":"Identifier of the method (EMAIL, SMS, WHATSAPP or any agnostic ID). Send it back as the `challenge` field of Request Checkpoint to switch to this method.","type":"string"},"label":{"description":"Human-readable name of the method (e.g. \"WhatsApp\", \"Text message\", \"Email\").","type":"string"},"description":{"description":"Extra detail about the method, e.g. the masked destination the code will be sent to.","type":"string"}}}}}},{"title":"Loading","description":"The authentication is continuing in the background and requires no user input.","type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["LOADING"]}}},{"title":"Passkey","description":"An additional passkey verification required to finish linking this account. Poll the checkpoint with an empty code; confirm only with CONFIRM followed by a colon and the exact displayed comparison code. CANCEL abandons this attempt.","type":"object","required":["type","stage","request_id","expires_at"],"properties":{"type":{"description":"An owner-authorized browser verification is required.","type":"string","enum":["PASSKEY"]},"stage":{"description":"Whether to verify in the browser or compare and approve the mobile confirmation.","type":"string","enum":["SIGN","CONFIRM"]},"request_id":{"description":"Opaque identifier of this single-use verification step.","type":"string"},"expires_at":{"description":"Expiry of this verification attempt, in ISO 8601 format.","type":"string"},"comparison_code":{"description":"Compare this code with the code on your phone before approving.","type":"string"},"handoff":{"description":"Install or update UniLogin, then authorize this browser verification. No provider session is exported.","type":"object","required":["request_id","handoff_token","extension_code","expires_at","extension_bridge_url","extension_store_urls","extension_download_urls"],"properties":{"request_id":{"description":"Identifier used by the extension bridge.","type":"string"},"handoff_token":{"description":"Short-lived capability for this verification; pass only to the trusted extension bridge.","type":"string"},"extension_code":{"description":"Code to enter in UniLogin when automatic extension detection is unavailable.","type":"string"},"expires_at":{"description":"Expiry of the extension handoff, in ISO 8601 format.","type":"string"},"extension_bridge_url":{"description":"Trusted UniLogin bridge URL for this attempt.","type":"string"},"extension_store_urls":{"additionalProperties":false,"description":"Official extension store links.","type":"object","properties":{"chrome":{"format":"uri","description":"Chrome extension store URL.","type":"string"},"edge":{"format":"uri","description":"Edge extension store URL.","type":"string"},"firefox":{"format":"uri","description":"Firefox extension store URL.","type":"string"},"safari":{"format":"uri","description":"Safari extension store URL.","type":"string"}}},"extension_download_urls":{"additionalProperties":false,"description":"Official extension download links, for browsers without a store listing.","type":"object","properties":{"edge":{"format":"uri","description":"Edge extension download URL.","type":"string"},"safari":{"format":"uri","description":"Safari extension download URL.","type":"string"}}}}},"unavailable":{"description":"The verification service is not ready; retry after its update. Ordinary authentication methods remain available.","type":"string","enum":["UPDATE_REQUIRED"]}}},{"title":"UniLogin","description":"Complete authentication in the browser extension, then poll the connection using intent_id as the account identifier.","type":"object","required":["type","extension_code","extension_code_expires_at","expires_at","extension_store_urls","extension_download_urls"],"properties":{"type":{"description":"Authentication must be completed through the browser extension.","type":"string","enum":["UNILOGIN"]},"extension_code":{"pattern":"^[23456789ABCDEFGHJKMNPQRSTVWXYZ]{4}(?:-[23456789ABCDEFGHJKMNPQRSTVWXYZ]{4}){2}$","description":"Temporary code to enter in the browser extension to authorize this connection.","type":"string"},"extension_code_expires_at":{"format":"date-time","description":"Expiry of the extension code, in ISO 8601 format.","type":"string"},"expires_at":{"format":"date-time","description":"Expiry of this connection attempt, in ISO 8601 format.","type":"string"},"extension_store_urls":{"additionalProperties":false,"description":"Official extension store links.","type":"object","properties":{"chrome":{"format":"uri","description":"Chrome extension store URL.","type":"string"},"edge":{"format":"uri","description":"Edge extension store URL.","type":"string"},"firefox":{"format":"uri","description":"Firefox extension store URL.","type":"string"},"safari":{"format":"uri","description":"Safari extension store URL.","type":"string"}}},"extension_download_urls":{"additionalProperties":false,"description":"Official extension download links, for browsers without a store listing.","type":"object","properties":{"edge":{"format":"uri","description":"Edge extension download URL.","type":"string"},"safari":{"format":"uri","description":"Safari extension download URL.","type":"string"}}}}},{"title":"Encrypted History","description":"The user must choose whether to unlock the end-to-end encrypted message history, and with which credential.","type":"object","required":["type","options","attempts_remaining"],"properties":{"type":{"type":"string","enum":["ENCRYPTED_HISTORY"]},"options":{"description":"The ways the user can answer. Send the chosen `id` as the `code` of Solve Checkpoint.","type":"array","items":{"type":"object","required":["id","label"],"properties":{"id":{"description":"PIN and RECOVERY_CODE unlock the end-to-end encrypted message history; SKIP leaves it off, and the account then only reports new messages as they arrive.","type":"string","enum":["PIN","RECOVERY_CODE","SKIP"]},"label":{"description":"Human-readable name of the option.","type":"string"},"description":{"description":"Extra detail about what the option entails.","type":"string"},"attempts_remaining":{"description":"How many more times this credential may be submitted. Each credential has a budget of its own, starting at 3, so running one out leaves the others open. A PIN is further capped at half of what the provider still allows, so the user can be wrong here without ever being the reason the backup locks. `0` means the option cannot be used any more; absent on options that take no credential.","type":"integer"}}}},"attempts_remaining":{"description":"The most submissions any credential still has — what the user has left overall. `0` means every credential is spent and only skipping remains. The detail per credential is in `options[].attempts_remaining`; a credential the provider refuses to even try does not consume one.","type":"integer"},"provider_attempts_remaining":{"description":"For a PIN, how many attempts the provider itself still allows before it locks the backup. This budget is the provider's own and is never spent on the user's behalf: when it is unknown or too low, the PIN is refused rather than tried.","type":"integer"},"last_attempt":{"description":"Why the previous submission did not unlock the history. Absent the first time this checkpoint is served, so its presence is what tells the user their last answer failed.","type":"object","required":["option","error"],"properties":{"option":{"description":"PIN and RECOVERY_CODE unlock the end-to-end encrypted message history; SKIP leaves it off, and the account then only reports new messages as they arrive.","type":"string","enum":["PIN","RECOVERY_CODE","SKIP"]},"error":{"description":"INVALID_CREDENTIAL: the PIN or recovery code was wrong, and one attempt was spent. REFUSED_TO_PROTECT_BACKUP: the PIN was not even submitted, because the provider had too few attempts left to risk one — no attempt was spent, and only the recovery code can unlock the history now.","type":"string","enum":["INVALID_CREDENTIAL","REFUSED_TO_PROTECT_BACKUP"]}}}}},{"title":"Process Stopped","description":"A terminal outcome for the current authentication attempt. No checkpoint resolution is expected: stop polling and do not call Solve Checkpoint, Request Checkpoint or Resend Checkpoint for this attempt. Use message, description and link to inform the account owner. To retry authentication, start a new authentication attempt rather than continuing the existing intent.","type":"object","required":["type","message"],"properties":{"type":{"description":"The current authentication attempt has stopped and cannot be continued or resolved.","type":"string","enum":["PROCESS_STOPPED"]},"message":{"description":"The reason why the authentication attempt cannot continue.","type":"string"},"description":{"description":"Additional context or instructions for the account owner, supplementing the main message.","type":"string"},"link":{"description":"An optional resource or action to present to the account owner alongside the message.","type":"object","required":["url","label"],"properties":{"url":{"format":"uri","description":"An absolute HTTP or HTTPS URL providing information or actions relevant to the stopped attempt.","type":"string"},"label":{"description":"The label describing the linked resource or action.","type":"string"}}}}}]},"intent_id":{"description":"The ID of the authentication intent. Use it for the next step required by the checkpoint. For PROCESS_STOPPED, it only identifies the stopped attempt and must not be used to resume or resolve it.","type":"string","pattern":"^acc_(.*)$"}}},{"title":"QR Code","description":"The authentication was started for a QR Code.","type":"object","required":["object","qrcode","intent_id"],"properties":{"object":{"type":"string","enum":["AuthenticationQrCode"]},"qrcode":{"description":"The QR Code to scan.","type":"string"},"intent_id":{"description":"The ID of the auth intent. This should be used to listen for the QR Code scan with Solve Checkpoint.","type":"string","pattern":"^acc_(.*)$"}}},{"title":"Oauth URL","description":"For Oauth providers (Outlook, Google)","type":"object","required":["object","url"],"properties":{"object":{"type":"string","enum":["OauthUrl"]},"url":{"description":"The URL to redirect to start the oauth flow of the provider.","type":"string"}}},{"title":"Account","type":"object","required":["object","user_id","created_at","id","application_id","status","is_locked","provider","metadata"],"properties":{"object":{"description":"The type of the returned object.","type":"string","enum":["Account"]},"user_id":{"description":"The ID of the user that owns the account for the provider.","type":"string"},"name":{"description":"The name of the account. This is usually the display name or public identifier (phone number, email address, etc.) of the user that owns the account.","type":"string"},"created_at":{"description":"The date and time the account was linked with Unipile.","type":"string"},"id":{"description":"ID of the account.","type":"string","pattern":"^acc_(.*)$"},"application_id":{"description":"ID of the parent application.","type":"string","pattern":"^app_(.*)$"},"account_scope_id":{"description":"ID of the Scope assigned to the Account. Once assigned, the Scope cannot be removed or replaced.","anyOf":[{"type":"string","pattern":"^scope_(.*)$"},{"type":"null"}]},"status":{"description":"The current status of the account.\n    - `running` is Operational.\n    - `errored` is Service Interuption.\n    - `disconnected` requires authentication.\n    - `degraded` means at least one product is running while another is errored; inspect `metadata.products_connection_status`.\n    - `partial` means at least one product is running while another requires authentication; inspect `metadata.products_connection_status`.\n    Learn more about [Status & Lifecycle](https://developer.unipile.com/v2.0/docs/status-lifecycle).","type":"string","enum":["running","errored","disconnected","degraded","partial"]},"is_locked":{"description":"Whether API access to the account is locked.","type":"boolean"},"provider":{"description":"The provider's of the Account.\n    - `mock` is mock.\n    - `whatsapp` is WhatsApp.\n    - `linkedin` is LinkedIn.\n    - `instagram` is Instagram.\n    - `facebook` is Facebook.\n    - `google` is Google.\n    - `outlook` is Outlook.\n    - `telegram` is Telegram.\n    - `imap` is IMAP.","type":"string","enum":["mock","whatsapp","linkedin","google","outlook","imap","telegram","instagram","facebook"]},"oauth_scope":{"description":"If the provider is OAuth, this is the scope of comma-separated permissions granted to the account.","type":"string"},"metadata":{"description":"Metadata associated with the Account.","type":"object","properties":{"auto_proxy_country":{"description":"The preferred country for automatic proxy selection. A country inferred from an IP may be outside Unipile’s proxy offering. The current proxy may be in another country when fallback is allowed and no proxy is available in the preferred country.","type":"string"},"allow_country_fallback":{"description":"Whether an available proxy from another country may be used when none is available in the rotation country, during authentication and throughout the account lifetime. Defaults to true. A country included in Unipile’s proxy offering may still have no proxy currently available. If false, authentication fails when no proxy is available in the rotation country. If the selected proxy later fails and no replacement is available there, the account enters Service interruption. Rotation to another available proxy in that country remains allowed.","type":"boolean"},"connection_method":{"description":"The authentication method that currently owns the account session lifecycle.","type":"string","enum":["credentials","cookies","unilogin"]},"v1_account_id":{"description":"The ID of the account in the v1 if the account is migrated from v1.","type":"string"},"v1_instance_port":{"description":"The port of the v1 instance from which the account was migrated.","type":"number"},"products_connection_status":{"description":"The status of the connection to a product, if the account is connected to multiple products.","type":"object","additionalProperties":{"type":"string","enum":["running","disconnected","errored"]}},"products_display_names":{"description":"The human-readable name of a product, keyed like products_connection_status, when the product has one (e.g. the name of a Facebook Page).","type":"object","additionalProperties":{"type":"string"}},"custom_data":{"description":"Custom data of the account. This is where you can store custom data using \"Update an account\" method.","type":"object","additionalProperties":{"type":"string"}}}},"initial_sync":{"description":"Sync details if the account has initial sync enabled.","type":"object","required":["status"],"properties":{"status":{"description":"The state of an account’s initial provider sync.\n  - `pending`sync hasn’t started yet.\n  - `running` sync is currently in progress.\n  - `failed` sync could not be completed due to an error.\n  - `completed` sync finished successfully.\n  .","type":"string","enum":["pending","running","failed","completed"]},"started_at":{"description":"The date and time the initial sync started.","type":"string"}}},"proxy":{"description":"The proxy used for the account.","type":"object","required":["country","auto_proxy"],"properties":{"country":{"description":"The country of the proxy. If null, the proxy has no defined country.","anyOf":[{"type":"string"},{"type":"null"}]},"auto_proxy":{"description":"Whether the proxy was set automatically by Unipile.","type":"boolean"},"host":{"description":"The host of the custom proxy.","type":"string"},"port":{"description":"The port of the custom proxy.","type":"number"},"username":{"description":"The username used to authenticate to the custom proxy.","type":"string"},"protocol":{"description":"The protocol of the custom proxy.","type":"string"}}}}}]}}}}}}},"/v2/auth/link":{"post":{"operationId":"createAuthLink","summary":"Create Auth Link","tags":["Hosted Auth"],"description":"Create a link to the hosted authentication wizard for the user to authenticate with the provider.","requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"title":"Link new account","description":"Generate a link to authenticate and link a new account with Unipile.","additionalProperties":false,"type":"object","required":["expires_on","redirect_uri","providers"],"properties":{"expires_on":{"format":"date-time","description":"The expiration date of the link. Use ISO 8601 UTC datetime (YYYY-MM-DDTHH:MM:SS.sssZ).","type":"string"},"domain":{"description":"Optional Hosted Auth hostname to use in the generated link instead of the default `auth.unipile.com`. The hostname must already be explicitly verified by Unipile for the parent Application.","type":"string"},"redirect_uri":{"format":"uri","description":"The URL to redirect to after the authentication process. If the authentication succeeded, `account_id` and `provider` will be present in query params, along the specified `state`. If the authentication has failed, `error_title` is present instead. This is useful for your app to be aware of the authentication result and to redirect the user to the correct page of your app.","type":"string"},"state":{"description":"State data sent as query parameter in the redirect_uri and in the `account.add` / `account.reconnect` webhook payload after the authentication process.","type":"string"},"config":{"description":"Specific provider configuration for the hosted auth session.","additionalProperties":false,"type":"object","properties":{"google":{"additionalProperties":true,"description":"Oauth authentication configuration.","type":"object","properties":{"custom_proxy":{"title":"Custom proxy","description":"A custom proxy used to connect to the account provider. When Automatic Proxy Protection applies to the provider, Unipile manages the proxy by default. A custom proxy overrides Automatic Proxy Protection. Read more in the Proxy documentation.","type":"object","required":["host","port"],"properties":{"host":{"minLength":1,"maxLength":255,"description":"The hostname or IP address of the proxy, without a scheme, port, path or credentials. Enclose IPv6 addresses in brackets.","type":"string"},"port":{"minimum":1,"maximum":65535,"description":"The port of the proxy, between 1 and 65535.","type":"integer"},"username":{"description":"The username to connect to the proxy. Omitted, null or empty credentials select unauthenticated access when both credentials are absent. SOCKS5 requires both a non-empty username and password for authentication, each at most 255 bytes.","anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}]},"password":{"description":"The password to connect to the proxy. Omitted, null or empty credentials select unauthenticated access when both credentials are absent. SOCKS5 requires both a non-empty username and password for authentication, each at most 255 bytes. HTTP Basic authentication permits an empty username or password.","anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}]},"protocol":{"default":"https","description":"The protocol of the proxy. Defaults to `https`.\n        - `https` is HTTPS.\n        - `http` is HTTP.\n          - `socks5` is SOCKS5.\n          - `socks4` is SOCKS4.","type":"string","enum":["https","http","socks5","socks4"]}}},"oauth_scope":{"minItems":1,"description":"The final list of authorizations to request from the Provider. Use this field to expand or narrow the scope of API access. For example, if your application only uses the Calendar API, you may request authorization solely for the calendar, excluding email access for providers like Google. Make sure to give only authorizations accepted by your registered provider application. For a new account, omitting this field requests the authorizations defined in the Provider OAuth settings. For a reconnect, omitting it preserves already granted authorizations and adds the authorizations currently defined in the Provider OAuth settings.","type":"array","items":{"minLength":1,"type":"string"}}}},"outlook":{"additionalProperties":true,"description":"Oauth authentication configuration.","type":"object","properties":{"custom_proxy":{"title":"Custom proxy","description":"A custom proxy used to connect to the account provider. When Automatic Proxy Protection applies to the provider, Unipile manages the proxy by default. A custom proxy overrides Automatic Proxy Protection. Read more in the Proxy documentation.","type":"object","required":["host","port"],"properties":{"host":{"minLength":1,"maxLength":255,"description":"The hostname or IP address of the proxy, without a scheme, port, path or credentials. Enclose IPv6 addresses in brackets.","type":"string"},"port":{"minimum":1,"maximum":65535,"description":"The port of the proxy, between 1 and 65535.","type":"integer"},"username":{"description":"The username to connect to the proxy. Omitted, null or empty credentials select unauthenticated access when both credentials are absent. SOCKS5 requires both a non-empty username and password for authentication, each at most 255 bytes.","anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}]},"password":{"description":"The password to connect to the proxy. Omitted, null or empty credentials select unauthenticated access when both credentials are absent. SOCKS5 requires both a non-empty username and password for authentication, each at most 255 bytes. HTTP Basic authentication permits an empty username or password.","anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}]},"protocol":{"default":"https","description":"The protocol of the proxy. Defaults to `https`.\n        - `https` is HTTPS.\n        - `http` is HTTP.\n          - `socks5` is SOCKS5.\n          - `socks4` is SOCKS4.","type":"string","enum":["https","http","socks5","socks4"]}}},"oauth_scope":{"minItems":1,"description":"The final list of authorizations to request from the Provider. Use this field to expand or narrow the scope of API access. For example, if your application only uses the Calendar API, you may request authorization solely for the calendar, excluding email access for providers like Google. Make sure to give only authorizations accepted by your registered provider application. For a new account, omitting this field requests the authorizations defined in the Provider OAuth settings. For a reconnect, omitting it preserves already granted authorizations and adds the authorizations currently defined in the Provider OAuth settings.","type":"array","items":{"minLength":1,"type":"string"}}}},"linkedin":{"additionalProperties":false,"description":"LinkedIn specific configuration.","type":"object","properties":{"custom_proxy":{"title":"Custom proxy","description":"A custom proxy used to connect to the account provider. When Automatic Proxy Protection applies to the provider, Unipile manages the proxy by default. A custom proxy overrides Automatic Proxy Protection. Read more in the Proxy documentation.","type":"object","required":["host","port"],"properties":{"host":{"minLength":1,"maxLength":255,"description":"The hostname or IP address of the proxy, without a scheme, port, path or credentials. Enclose IPv6 addresses in brackets.","type":"string"},"port":{"minimum":1,"maximum":65535,"description":"The port of the proxy, between 1 and 65535.","type":"integer"},"username":{"description":"The username to connect to the proxy. Omitted, null or empty credentials select unauthenticated access when both credentials are absent. SOCKS5 requires both a non-empty username and password for authentication, each at most 255 bytes.","anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}]},"password":{"description":"The password to connect to the proxy. Omitted, null or empty credentials select unauthenticated access when both credentials are absent. SOCKS5 requires both a non-empty username and password for authentication, each at most 255 bytes. HTTP Basic authentication permits an empty username or password.","anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}]},"protocol":{"default":"https","description":"The protocol of the proxy. Defaults to `https`.\n        - `https` is HTTPS.\n        - `http` is HTTP.\n          - `socks5` is SOCKS5.\n          - `socks4` is SOCKS4.","type":"string","enum":["https","http","socks5","socks4"]}}},"auto_proxy_config":{"description":"Country preferences for automatic proxy assignment. Explicitly selected countries must be part of Unipile’s proxy offering for the provider. If omitted, Unipile determines the preferred country automatically. The fallback setting determines whether an available proxy from another country may be used when no proxy is available in the preferred country.","title":"Automatic proxy configuration","type":"object","properties":{"country":{"description":"An ISO 3166-1 alpha-2 country code for the automatic proxy location, normalized to uppercase. Choose from the <a href=\"https://developer.unipile.com/v2.0/docs/proxys#countries\">countries where Unipile offers automatic proxies</a>. A proxy may be temporarily unavailable even in a country included in the offering.","type":"string"},"ip":{"description":"An IPv4 address used to infer the automatic proxy location. If Unipile does not offer proxies in the inferred country, or no proxy is currently available there, allow_country_fallback controls whether an available proxy from another country may be used.","type":"string"},"allow_country_fallback":{"default":true,"description":"Whether an available proxy from another country may be used when none is available in the rotation country, during authentication and throughout the account lifetime. Defaults to true. An explicitly selected country must be part of Unipile’s proxy offering for the provider, even when fallback is allowed. A proxy may be temporarily unavailable in a country included in the offering. Authentication fails if no proxy is available in any allowed country. If false, authentication fails when no proxy is available in the rotation country. If the selected proxy later fails and no replacement is available there, the account enters Service interruption. Rotation to another available proxy in that country remains allowed.","type":"boolean"}}},"products":{"default":["classic","company","recruiter","sales_navigator"],"minItems":1,"uniqueItems":true,"description":"Specifies which LinkedIn products are allowed to be activated (as long as the account actually has the relevant subscriptions). By default, all products are made available.<br>When reconnecting an account, just omit this field to keep allowing access to the same products, or provide new values to expand or narrow the scope. <a href=\"https://developer.unipile.com/v2.0/docs/linkedin-link-accounts\">Learn more about Linkedin products</a>\n      `classic` : Personnal Social network<br>\n      `recruiter` : Recruiter<br>\n      `sales_navigator` : Sales Navigator<br>\n      `company` : Company Pages\n      ","type":"array","items":{"type":"string","enum":["classic","company","recruiter","sales_navigator"]}},"allow_product_selection":{"default":true,"description":"When true, show the product selection screen after authentication, even when only one LinkedIn product is available; this screen also displays the requested scopes. When false, products are selected automatically and scope consent is collected before authentication.","type":"boolean"},"allow_methods":{"minItems":1,"uniqueItems":true,"description":"The authentication methods to show in the hosted auth.\n            `credentials` : Credentials Authentication\n            `cookies` : Cookies Authentication\n            `unilogin` : Connect the active browser session through the UniLogin extension\n          ","default":["credentials","unilogin"],"type":"array","items":{"type":"string","enum":["credentials","cookies","unilogin"]}}}},"whatsapp":{"additionalProperties":false,"description":"WhatsApp specific configuration.","type":"object","properties":{"custom_proxy":{"title":"Custom proxy","description":"A custom proxy used to connect to the account provider. When Automatic Proxy Protection applies to the provider, Unipile manages the proxy by default. A custom proxy overrides Automatic Proxy Protection. Read more in the Proxy documentation.","type":"object","required":["host","port"],"properties":{"host":{"minLength":1,"maxLength":255,"description":"The hostname or IP address of the proxy, without a scheme, port, path or credentials. Enclose IPv6 addresses in brackets.","type":"string"},"port":{"minimum":1,"maximum":65535,"description":"The port of the proxy, between 1 and 65535.","type":"integer"},"username":{"description":"The username to connect to the proxy. Omitted, null or empty credentials select unauthenticated access when both credentials are absent. SOCKS5 requires both a non-empty username and password for authentication, each at most 255 bytes.","anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}]},"password":{"description":"The password to connect to the proxy. Omitted, null or empty credentials select unauthenticated access when both credentials are absent. SOCKS5 requires both a non-empty username and password for authentication, each at most 255 bytes. HTTP Basic authentication permits an empty username or password.","anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}]},"protocol":{"default":"https","description":"The protocol of the proxy. Defaults to `https`.\n        - `https` is HTTPS.\n        - `http` is HTTP.\n          - `socks5` is SOCKS5.\n          - `socks4` is SOCKS4.","type":"string","enum":["https","http","socks5","socks4"]}}},"auto_proxy_config":{"description":"Country preferences for automatic proxy assignment. Explicitly selected countries must be part of Unipile’s proxy offering for the provider. If omitted, Unipile determines the preferred country automatically. The fallback setting determines whether an available proxy from another country may be used when no proxy is available in the preferred country.","title":"Automatic proxy configuration","type":"object","properties":{"country":{"description":"An ISO 3166-1 alpha-2 country code for the automatic proxy location, normalized to uppercase. Choose from the <a href=\"https://developer.unipile.com/v2.0/docs/proxys#countries\">countries where Unipile offers automatic proxies</a>. A proxy may be temporarily unavailable even in a country included in the offering.","type":"string"},"ip":{"description":"An IPv4 address used to infer the automatic proxy location. If Unipile does not offer proxies in the inferred country, or no proxy is currently available there, allow_country_fallback controls whether an available proxy from another country may be used.","type":"string"},"allow_country_fallback":{"default":true,"description":"Whether an available proxy from another country may be used when none is available in the rotation country, during authentication and throughout the account lifetime. Defaults to true. An explicitly selected country must be part of Unipile’s proxy offering for the provider, even when fallback is allowed. A proxy may be temporarily unavailable in a country included in the offering. Authentication fails if no proxy is available in any allowed country. If false, authentication fails when no proxy is available in the rotation country. If the selected proxy later fails and no replacement is available there, the account enters Service interruption. Rotation to another available proxy in that country remains allowed.","type":"boolean"}}},"allow_methods":{"description":"The authentication methods to show in the hosted auth.\n            `qr` : QR Code Authentication\n            `pairing` : Pairing Code Authentication\n          ","default":["qr","pairing"],"type":"array","items":{"type":"string","enum":["qr","pairing"]}}}},"instagram":{"additionalProperties":true,"description":"Instagram specific configuration.","type":"object","properties":{"custom_proxy":{"title":"Custom proxy","description":"A custom proxy used to connect to the account provider. When Automatic Proxy Protection applies to the provider, Unipile manages the proxy by default. A custom proxy overrides Automatic Proxy Protection. Read more in the Proxy documentation.","type":"object","required":["host","port"],"properties":{"host":{"minLength":1,"maxLength":255,"description":"The hostname or IP address of the proxy, without a scheme, port, path or credentials. Enclose IPv6 addresses in brackets.","type":"string"},"port":{"minimum":1,"maximum":65535,"description":"The port of the proxy, between 1 and 65535.","type":"integer"},"username":{"description":"The username to connect to the proxy. Omitted, null or empty credentials select unauthenticated access when both credentials are absent. SOCKS5 requires both a non-empty username and password for authentication, each at most 255 bytes.","anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}]},"password":{"description":"The password to connect to the proxy. Omitted, null or empty credentials select unauthenticated access when both credentials are absent. SOCKS5 requires both a non-empty username and password for authentication, each at most 255 bytes. HTTP Basic authentication permits an empty username or password.","anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}]},"protocol":{"default":"https","description":"The protocol of the proxy. Defaults to `https`.\n        - `https` is HTTPS.\n        - `http` is HTTP.\n          - `socks5` is SOCKS5.\n          - `socks4` is SOCKS4.","type":"string","enum":["https","http","socks5","socks4"]}}},"auto_proxy_config":{"description":"Country preferences for automatic proxy assignment. Explicitly selected countries must be part of Unipile’s proxy offering for the provider. If omitted, Unipile determines the preferred country automatically. The fallback setting determines whether an available proxy from another country may be used when no proxy is available in the preferred country.","title":"Automatic proxy configuration","type":"object","properties":{"country":{"description":"An ISO 3166-1 alpha-2 country code for the automatic proxy location, normalized to uppercase. Choose from the <a href=\"https://developer.unipile.com/v2.0/docs/proxys#countries\">countries where Unipile offers automatic proxies</a>. A proxy may be temporarily unavailable even in a country included in the offering.","type":"string"},"ip":{"description":"An IPv4 address used to infer the automatic proxy location. If Unipile does not offer proxies in the inferred country, or no proxy is currently available there, allow_country_fallback controls whether an available proxy from another country may be used.","type":"string"},"allow_country_fallback":{"default":true,"description":"Whether an available proxy from another country may be used when none is available in the rotation country, during authentication and throughout the account lifetime. Defaults to true. An explicitly selected country must be part of Unipile’s proxy offering for the provider, even when fallback is allowed. A proxy may be temporarily unavailable in a country included in the offering. Authentication fails if no proxy is available in any allowed country. If false, authentication fails when no proxy is available in the rotation country. If the selected proxy later fails and no replacement is available there, the account enters Service interruption. Rotation to another available proxy in that country remains allowed.","type":"boolean"}}},"allow_methods":{"minItems":1,"uniqueItems":true,"description":"The authentication methods to show in the hosted auth.\n          `credentials` : Credentials Authentication\n          `cookies` : Cookies Authentication\n          `unilogin` : Connect the active browser session through the UniLogin extension\n        ","default":["credentials","unilogin"],"type":"array","items":{"type":"string","enum":["credentials","cookies","unilogin"]}}}},"facebook":{"additionalProperties":true,"description":"Facebook specific configuration.","type":"object","properties":{"custom_proxy":{"title":"Custom proxy","description":"A custom proxy used to connect to the account provider. When Automatic Proxy Protection applies to the provider, Unipile manages the proxy by default. A custom proxy overrides Automatic Proxy Protection. Read more in the Proxy documentation.","type":"object","required":["host","port"],"properties":{"host":{"minLength":1,"maxLength":255,"description":"The hostname or IP address of the proxy, without a scheme, port, path or credentials. Enclose IPv6 addresses in brackets.","type":"string"},"port":{"minimum":1,"maximum":65535,"description":"The port of the proxy, between 1 and 65535.","type":"integer"},"username":{"description":"The username to connect to the proxy. Omitted, null or empty credentials select unauthenticated access when both credentials are absent. SOCKS5 requires both a non-empty username and password for authentication, each at most 255 bytes.","anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}]},"password":{"description":"The password to connect to the proxy. Omitted, null or empty credentials select unauthenticated access when both credentials are absent. SOCKS5 requires both a non-empty username and password for authentication, each at most 255 bytes. HTTP Basic authentication permits an empty username or password.","anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}]},"protocol":{"default":"https","description":"The protocol of the proxy. Defaults to `https`.\n        - `https` is HTTPS.\n        - `http` is HTTP.\n          - `socks5` is SOCKS5.\n          - `socks4` is SOCKS4.","type":"string","enum":["https","http","socks5","socks4"]}}},"auto_proxy_config":{"description":"Country preferences for automatic proxy assignment. Explicitly selected countries must be part of Unipile’s proxy offering for the provider. If omitted, Unipile determines the preferred country automatically. The fallback setting determines whether an available proxy from another country may be used when no proxy is available in the preferred country.","title":"Automatic proxy configuration","type":"object","properties":{"country":{"description":"An ISO 3166-1 alpha-2 country code for the automatic proxy location, normalized to uppercase. Choose from the <a href=\"https://developer.unipile.com/v2.0/docs/proxys#countries\">countries where Unipile offers automatic proxies</a>. A proxy may be temporarily unavailable even in a country included in the offering.","type":"string"},"ip":{"description":"An IPv4 address used to infer the automatic proxy location. If Unipile does not offer proxies in the inferred country, or no proxy is currently available there, allow_country_fallback controls whether an available proxy from another country may be used.","type":"string"},"allow_country_fallback":{"default":true,"description":"Whether an available proxy from another country may be used when none is available in the rotation country, during authentication and throughout the account lifetime. Defaults to true. An explicitly selected country must be part of Unipile’s proxy offering for the provider, even when fallback is allowed. A proxy may be temporarily unavailable in a country included in the offering. Authentication fails if no proxy is available in any allowed country. If false, authentication fails when no proxy is available in the rotation country. If the selected proxy later fails and no replacement is available there, the account enters Service interruption. Rotation to another available proxy in that country remains allowed.","type":"boolean"}}},"surface":{"description":"Meta web surface used to bootstrap the session. `facebook` uses facebook.com/messages (default), `messenger` uses messenger.com.","default":"facebook","anyOf":[{"type":"string","enum":["facebook"]},{"type":"string","enum":["messenger"]}]},"products":{"default":["messaging","page"],"minItems":1,"uniqueItems":true,"description":"Specifies which Facebook products are allowed to be activated (as long as the account actually has access to them). By default, all products are made available. `messaging` is always activated.\n      `messaging` : Messenger inbox of the account<br>\n      `page` : Facebook Pages administered by the account — each Page is an inbox (`PAGE_<page_id>_INBOX`) whose chats are answered as the Page\n      ","type":"array","items":{"type":"string","enum":["messaging","page"]}},"page_ids":{"uniqueItems":true,"description":"With the `page` product: the Facebook Pages that can be activated, by id (the Page messaging id, as in `PAGE_<page_id>_INBOX`). By default, every Page the account administers. Without `allow_product_selection` they are all activated; with it, they are the ones offered for selection. Each activated Page runs as its own product `page_<page_id>`, with its own connection status.","type":"array","items":{"type":"string"}},"allow_methods":{"description":"The authentication methods to show in Hosted Auth.\n          `credentials`: Credentials authentication\n          `cookies`: Cookie authentication\n          `unilogin`: Connect the active browser session through the UniLogin extension\n        ","default":["credentials","cookies","unilogin"],"type":"array","items":{"type":"string","enum":["credentials","cookies","unilogin"]}},"allow_product_selection":{"default":true,"description":"When true, show the product selection screen after authentication, even when the account administers no Facebook Page; this screen also displays the requested scopes. When false, products are selected automatically and scope consent is collected before authentication.","type":"boolean"}}},"imap":{"additionalProperties":true,"description":"IMAP specific configuration.","type":"object","properties":{"custom_proxy":{"title":"Custom proxy","description":"A custom proxy used to connect to the account provider. When Automatic Proxy Protection applies to the provider, Unipile manages the proxy by default. A custom proxy overrides Automatic Proxy Protection. Read more in the Proxy documentation.","type":"object","required":["host","port"],"properties":{"host":{"minLength":1,"maxLength":255,"description":"The hostname or IP address of the proxy, without a scheme, port, path or credentials. Enclose IPv6 addresses in brackets.","type":"string"},"port":{"minimum":1,"maximum":65535,"description":"The port of the proxy, between 1 and 65535.","type":"integer"},"username":{"description":"The username to connect to the proxy. Omitted, null or empty credentials select unauthenticated access when both credentials are absent. SOCKS5 requires both a non-empty username and password for authentication, each at most 255 bytes.","anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}]},"password":{"description":"The password to connect to the proxy. Omitted, null or empty credentials select unauthenticated access when both credentials are absent. SOCKS5 requires both a non-empty username and password for authentication, each at most 255 bytes. HTTP Basic authentication permits an empty username or password.","anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}]},"protocol":{"default":"https","description":"The protocol of the proxy. Defaults to `https`.\n        - `https` is HTTPS.\n        - `http` is HTTP.\n          - `socks5` is SOCKS5.\n          - `socks4` is SOCKS4.","type":"string","enum":["https","http","socks5","socks4"]}}},"initial_sync_enable":{"description":"Whether initial sync is enabled. Defaults to false for new accounts. When reconnecting, omitting this field preserves the current setting. Re-enabling starts a fresh initial sync. Initial sync is required for advanced search. Read more in the Synced Accounts guide.","type":"boolean"}}},"telegram":{"additionalProperties":true,"description":"Telegram specific configuration.","type":"object","properties":{"custom_proxy":{"title":"Custom proxy","description":"A custom proxy used to connect to the account provider. When Automatic Proxy Protection applies to the provider, Unipile manages the proxy by default. A custom proxy overrides Automatic Proxy Protection. Read more in the Proxy documentation.","type":"object","required":["host","port"],"properties":{"host":{"minLength":1,"maxLength":255,"description":"The hostname or IP address of the proxy, without a scheme, port, path or credentials. Enclose IPv6 addresses in brackets.","type":"string"},"port":{"minimum":1,"maximum":65535,"description":"The port of the proxy, between 1 and 65535.","type":"integer"},"username":{"description":"The username to connect to the proxy. Omitted, null or empty credentials select unauthenticated access when both credentials are absent. SOCKS5 requires both a non-empty username and password for authentication, each at most 255 bytes.","anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}]},"password":{"description":"The password to connect to the proxy. Omitted, null or empty credentials select unauthenticated access when both credentials are absent. SOCKS5 requires both a non-empty username and password for authentication, each at most 255 bytes. HTTP Basic authentication permits an empty username or password.","anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}]},"protocol":{"default":"https","description":"The protocol of the proxy. Defaults to `https`.\n        - `https` is HTTPS.\n        - `http` is HTTP.\n          - `socks5` is SOCKS5.\n          - `socks4` is SOCKS4.","type":"string","enum":["https","http","socks5","socks4"]}}}}},"global":{"description":"Configuration applied to all providers","additionalProperties":false,"type":"object","properties":{"login_hint":{"description":"If your application knows which user is trying to authenticate, it can use this parameter to provide a hint to the Hosted Auth. It uses the hint to simplify the login flow either by prefilling the email / username / phone number field in the authentication forms.","type":"string"},"allow_user_proxy_override":{"default":false,"description":"If true, the Hosted Auth UI will show a field where the user can provide their own proxy settings. When filled, the user-defined proxy takes precedence over any custom_proxy defined in the configuration and over automatic proxy detection (if the provider supports it).","type":"boolean"},"allow_user_country_override":{"default":false,"description":"If true, the Hosted Auth UI will allow the user to manually select a country where Unipile offers automatic proxies for the provider. A proxy may still be temporarily unavailable in the selected country. This selection overrides the detected country and any auto_proxy_config value. Note: if a custom_proxy is explicitly configured for a provider, this option has no effect for that provider (no country selection will be shown).","type":"boolean"},"wait_initial_sync":{"default":false,"description":"When true, the hosted authentication will wait for the initial sync to complete before redirecting. Only supported for providers with initial sync capability (whatsapp and imap). After authentication succeeds, the session can only poll the linked account for up to 24 hours, independently of the original link expiration, and cannot authenticate another account.","type":"boolean"}}}}},"providers":{"description":"Required to link a new account with Unipile. The list of providers to show in the selection list.\n        - `*` to list all providers.\n        - `*:EMAILS` to list providers with Emails API support only.\n        - `*:MESSAGING` to list providers with Messaging API support only.\n        - `*:CALENDAR` to list providers with Calendar API support only.\n        - `*:SOCIAL` to list providers with Social API (Users, Posts, etc.) support only.\n        - a specific provider to list only that provider.\n        - give an array of specific providers.","anyOf":[{"default":"*","type":"string","enum":["*","*:MESSAGING","*:EMAILS","*:CALENDAR","*:SOCIAL","linkedin","mock","whatsapp","google","outlook","imap","telegram","instagram","facebook"]},{"type":"array","items":{"type":"string","enum":["linkedin","mock","whatsapp","google","outlook","imap","telegram","instagram","facebook"]}}]},"account_scope_id":{"description":"The Scope assigned to the newly linked account.","type":"string","pattern":"^scope_(.*)$"}}},{"title":"Re-authenticate existing account","description":"Generate a link to re-authenticate or reconfigure an entire existing account with Unipile.","additionalProperties":false,"type":"object","required":["expires_on","redirect_uri","account_id"],"properties":{"expires_on":{"format":"date-time","description":"The expiration date of the link. Use ISO 8601 UTC datetime (YYYY-MM-DDTHH:MM:SS.sssZ).","type":"string"},"domain":{"description":"Optional Hosted Auth hostname to use in the generated link instead of the default `auth.unipile.com`. The hostname must already be explicitly verified by Unipile for the parent Application.","type":"string"},"redirect_uri":{"format":"uri","description":"The URL to redirect to after the authentication process. If the authentication succeeded, `account_id` and `provider` will be present in query params, along the specified `state`. If the authentication has failed, `error_title` is present instead. This is useful for your app to be aware of the authentication result and to redirect the user to the correct page of your app.","type":"string"},"state":{"description":"State data sent as query parameter in the redirect_uri and in the `account.add` / `account.reconnect` webhook payload after the authentication process.","type":"string"},"config":{"description":"Specific provider configuration for the hosted auth session.","additionalProperties":false,"type":"object","properties":{"google":{"additionalProperties":true,"description":"Oauth authentication configuration.","type":"object","properties":{"custom_proxy":{"title":"Custom proxy","description":"A custom proxy used to connect to the account provider. When Automatic Proxy Protection applies to the provider, Unipile manages the proxy by default. A custom proxy overrides Automatic Proxy Protection. Read more in the Proxy documentation.","type":"object","required":["host","port"],"properties":{"host":{"minLength":1,"maxLength":255,"description":"The hostname or IP address of the proxy, without a scheme, port, path or credentials. Enclose IPv6 addresses in brackets.","type":"string"},"port":{"minimum":1,"maximum":65535,"description":"The port of the proxy, between 1 and 65535.","type":"integer"},"username":{"description":"The username to connect to the proxy. Omitted, null or empty credentials select unauthenticated access when both credentials are absent. SOCKS5 requires both a non-empty username and password for authentication, each at most 255 bytes.","anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}]},"password":{"description":"The password to connect to the proxy. Omitted, null or empty credentials select unauthenticated access when both credentials are absent. SOCKS5 requires both a non-empty username and password for authentication, each at most 255 bytes. HTTP Basic authentication permits an empty username or password.","anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}]},"protocol":{"default":"https","description":"The protocol of the proxy. Defaults to `https`.\n        - `https` is HTTPS.\n        - `http` is HTTP.\n          - `socks5` is SOCKS5.\n          - `socks4` is SOCKS4.","type":"string","enum":["https","http","socks5","socks4"]}}},"oauth_scope":{"minItems":1,"description":"The final list of authorizations to request from the Provider. Use this field to expand or narrow the scope of API access. For example, if your application only uses the Calendar API, you may request authorization solely for the calendar, excluding email access for providers like Google. Make sure to give only authorizations accepted by your registered provider application. For a new account, omitting this field requests the authorizations defined in the Provider OAuth settings. For a reconnect, omitting it preserves already granted authorizations and adds the authorizations currently defined in the Provider OAuth settings.","type":"array","items":{"minLength":1,"type":"string"}}}},"outlook":{"additionalProperties":true,"description":"Oauth authentication configuration.","type":"object","properties":{"custom_proxy":{"title":"Custom proxy","description":"A custom proxy used to connect to the account provider. When Automatic Proxy Protection applies to the provider, Unipile manages the proxy by default. A custom proxy overrides Automatic Proxy Protection. Read more in the Proxy documentation.","type":"object","required":["host","port"],"properties":{"host":{"minLength":1,"maxLength":255,"description":"The hostname or IP address of the proxy, without a scheme, port, path or credentials. Enclose IPv6 addresses in brackets.","type":"string"},"port":{"minimum":1,"maximum":65535,"description":"The port of the proxy, between 1 and 65535.","type":"integer"},"username":{"description":"The username to connect to the proxy. Omitted, null or empty credentials select unauthenticated access when both credentials are absent. SOCKS5 requires both a non-empty username and password for authentication, each at most 255 bytes.","anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}]},"password":{"description":"The password to connect to the proxy. Omitted, null or empty credentials select unauthenticated access when both credentials are absent. SOCKS5 requires both a non-empty username and password for authentication, each at most 255 bytes. HTTP Basic authentication permits an empty username or password.","anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}]},"protocol":{"default":"https","description":"The protocol of the proxy. Defaults to `https`.\n        - `https` is HTTPS.\n        - `http` is HTTP.\n          - `socks5` is SOCKS5.\n          - `socks4` is SOCKS4.","type":"string","enum":["https","http","socks5","socks4"]}}},"oauth_scope":{"minItems":1,"description":"The final list of authorizations to request from the Provider. Use this field to expand or narrow the scope of API access. For example, if your application only uses the Calendar API, you may request authorization solely for the calendar, excluding email access for providers like Google. Make sure to give only authorizations accepted by your registered provider application. For a new account, omitting this field requests the authorizations defined in the Provider OAuth settings. For a reconnect, omitting it preserves already granted authorizations and adds the authorizations currently defined in the Provider OAuth settings.","type":"array","items":{"minLength":1,"type":"string"}}}},"linkedin":{"additionalProperties":false,"description":"LinkedIn specific configuration.","type":"object","properties":{"custom_proxy":{"title":"Custom proxy","description":"A custom proxy used to connect to the account provider. When Automatic Proxy Protection applies to the provider, Unipile manages the proxy by default. A custom proxy overrides Automatic Proxy Protection. Read more in the Proxy documentation.","type":"object","required":["host","port"],"properties":{"host":{"minLength":1,"maxLength":255,"description":"The hostname or IP address of the proxy, without a scheme, port, path or credentials. Enclose IPv6 addresses in brackets.","type":"string"},"port":{"minimum":1,"maximum":65535,"description":"The port of the proxy, between 1 and 65535.","type":"integer"},"username":{"description":"The username to connect to the proxy. Omitted, null or empty credentials select unauthenticated access when both credentials are absent. SOCKS5 requires both a non-empty username and password for authentication, each at most 255 bytes.","anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}]},"password":{"description":"The password to connect to the proxy. Omitted, null or empty credentials select unauthenticated access when both credentials are absent. SOCKS5 requires both a non-empty username and password for authentication, each at most 255 bytes. HTTP Basic authentication permits an empty username or password.","anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}]},"protocol":{"default":"https","description":"The protocol of the proxy. Defaults to `https`.\n        - `https` is HTTPS.\n        - `http` is HTTP.\n          - `socks5` is SOCKS5.\n          - `socks4` is SOCKS4.","type":"string","enum":["https","http","socks5","socks4"]}}},"auto_proxy_config":{"description":"Country preferences for automatic proxy assignment. Explicitly selected countries must be part of Unipile’s proxy offering for the provider. If omitted, Unipile determines the preferred country automatically. The fallback setting determines whether an available proxy from another country may be used when no proxy is available in the preferred country.","title":"Automatic proxy configuration","type":"object","properties":{"country":{"description":"An ISO 3166-1 alpha-2 country code for the automatic proxy location, normalized to uppercase. Choose from the <a href=\"https://developer.unipile.com/v2.0/docs/proxys#countries\">countries where Unipile offers automatic proxies</a>. A proxy may be temporarily unavailable even in a country included in the offering.","type":"string"},"ip":{"description":"An IPv4 address used to infer the automatic proxy location. If Unipile does not offer proxies in the inferred country, or no proxy is currently available there, allow_country_fallback controls whether an available proxy from another country may be used.","type":"string"},"allow_country_fallback":{"default":true,"description":"Whether an available proxy from another country may be used when none is available in the rotation country, during authentication and throughout the account lifetime. Defaults to true. An explicitly selected country must be part of Unipile’s proxy offering for the provider, even when fallback is allowed. A proxy may be temporarily unavailable in a country included in the offering. Authentication fails if no proxy is available in any allowed country. If false, authentication fails when no proxy is available in the rotation country. If the selected proxy later fails and no replacement is available there, the account enters Service interruption. Rotation to another available proxy in that country remains allowed.","type":"boolean"}}},"products":{"default":["classic","company","recruiter","sales_navigator"],"minItems":1,"uniqueItems":true,"description":"Specifies which LinkedIn products are allowed to be activated (as long as the account actually has the relevant subscriptions). By default, all products are made available.<br>When reconnecting an account, just omit this field to keep allowing access to the same products, or provide new values to expand or narrow the scope. <a href=\"https://developer.unipile.com/v2.0/docs/linkedin-link-accounts\">Learn more about Linkedin products</a>\n      `classic` : Personnal Social network<br>\n      `recruiter` : Recruiter<br>\n      `sales_navigator` : Sales Navigator<br>\n      `company` : Company Pages\n      ","type":"array","items":{"type":"string","enum":["classic","company","recruiter","sales_navigator"]}},"allow_product_selection":{"default":true,"description":"When true, show the product selection screen after authentication, even when only one LinkedIn product is available; this screen also displays the requested scopes. When false, products are selected automatically and scope consent is collected before authentication.","type":"boolean"},"allow_methods":{"minItems":1,"uniqueItems":true,"description":"The authentication methods to show in the hosted auth.\n            `credentials` : Credentials Authentication\n            `cookies` : Cookies Authentication\n            `unilogin` : Connect the active browser session through the UniLogin extension\n          ","default":["credentials","unilogin"],"type":"array","items":{"type":"string","enum":["credentials","cookies","unilogin"]}}}},"whatsapp":{"additionalProperties":false,"description":"WhatsApp specific configuration.","type":"object","properties":{"custom_proxy":{"title":"Custom proxy","description":"A custom proxy used to connect to the account provider. When Automatic Proxy Protection applies to the provider, Unipile manages the proxy by default. A custom proxy overrides Automatic Proxy Protection. Read more in the Proxy documentation.","type":"object","required":["host","port"],"properties":{"host":{"minLength":1,"maxLength":255,"description":"The hostname or IP address of the proxy, without a scheme, port, path or credentials. Enclose IPv6 addresses in brackets.","type":"string"},"port":{"minimum":1,"maximum":65535,"description":"The port of the proxy, between 1 and 65535.","type":"integer"},"username":{"description":"The username to connect to the proxy. Omitted, null or empty credentials select unauthenticated access when both credentials are absent. SOCKS5 requires both a non-empty username and password for authentication, each at most 255 bytes.","anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}]},"password":{"description":"The password to connect to the proxy. Omitted, null or empty credentials select unauthenticated access when both credentials are absent. SOCKS5 requires both a non-empty username and password for authentication, each at most 255 bytes. HTTP Basic authentication permits an empty username or password.","anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}]},"protocol":{"default":"https","description":"The protocol of the proxy. Defaults to `https`.\n        - `https` is HTTPS.\n        - `http` is HTTP.\n          - `socks5` is SOCKS5.\n          - `socks4` is SOCKS4.","type":"string","enum":["https","http","socks5","socks4"]}}},"auto_proxy_config":{"description":"Country preferences for automatic proxy assignment. Explicitly selected countries must be part of Unipile’s proxy offering for the provider. If omitted, Unipile determines the preferred country automatically. The fallback setting determines whether an available proxy from another country may be used when no proxy is available in the preferred country.","title":"Automatic proxy configuration","type":"object","properties":{"country":{"description":"An ISO 3166-1 alpha-2 country code for the automatic proxy location, normalized to uppercase. Choose from the <a href=\"https://developer.unipile.com/v2.0/docs/proxys#countries\">countries where Unipile offers automatic proxies</a>. A proxy may be temporarily unavailable even in a country included in the offering.","type":"string"},"ip":{"description":"An IPv4 address used to infer the automatic proxy location. If Unipile does not offer proxies in the inferred country, or no proxy is currently available there, allow_country_fallback controls whether an available proxy from another country may be used.","type":"string"},"allow_country_fallback":{"default":true,"description":"Whether an available proxy from another country may be used when none is available in the rotation country, during authentication and throughout the account lifetime. Defaults to true. An explicitly selected country must be part of Unipile’s proxy offering for the provider, even when fallback is allowed. A proxy may be temporarily unavailable in a country included in the offering. Authentication fails if no proxy is available in any allowed country. If false, authentication fails when no proxy is available in the rotation country. If the selected proxy later fails and no replacement is available there, the account enters Service interruption. Rotation to another available proxy in that country remains allowed.","type":"boolean"}}},"allow_methods":{"description":"The authentication methods to show in the hosted auth.\n            `qr` : QR Code Authentication\n            `pairing` : Pairing Code Authentication\n          ","default":["qr","pairing"],"type":"array","items":{"type":"string","enum":["qr","pairing"]}}}},"instagram":{"additionalProperties":true,"description":"Instagram specific configuration.","type":"object","properties":{"custom_proxy":{"title":"Custom proxy","description":"A custom proxy used to connect to the account provider. When Automatic Proxy Protection applies to the provider, Unipile manages the proxy by default. A custom proxy overrides Automatic Proxy Protection. Read more in the Proxy documentation.","type":"object","required":["host","port"],"properties":{"host":{"minLength":1,"maxLength":255,"description":"The hostname or IP address of the proxy, without a scheme, port, path or credentials. Enclose IPv6 addresses in brackets.","type":"string"},"port":{"minimum":1,"maximum":65535,"description":"The port of the proxy, between 1 and 65535.","type":"integer"},"username":{"description":"The username to connect to the proxy. Omitted, null or empty credentials select unauthenticated access when both credentials are absent. SOCKS5 requires both a non-empty username and password for authentication, each at most 255 bytes.","anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}]},"password":{"description":"The password to connect to the proxy. Omitted, null or empty credentials select unauthenticated access when both credentials are absent. SOCKS5 requires both a non-empty username and password for authentication, each at most 255 bytes. HTTP Basic authentication permits an empty username or password.","anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}]},"protocol":{"default":"https","description":"The protocol of the proxy. Defaults to `https`.\n        - `https` is HTTPS.\n        - `http` is HTTP.\n          - `socks5` is SOCKS5.\n          - `socks4` is SOCKS4.","type":"string","enum":["https","http","socks5","socks4"]}}},"auto_proxy_config":{"description":"Country preferences for automatic proxy assignment. Explicitly selected countries must be part of Unipile’s proxy offering for the provider. If omitted, Unipile determines the preferred country automatically. The fallback setting determines whether an available proxy from another country may be used when no proxy is available in the preferred country.","title":"Automatic proxy configuration","type":"object","properties":{"country":{"description":"An ISO 3166-1 alpha-2 country code for the automatic proxy location, normalized to uppercase. Choose from the <a href=\"https://developer.unipile.com/v2.0/docs/proxys#countries\">countries where Unipile offers automatic proxies</a>. A proxy may be temporarily unavailable even in a country included in the offering.","type":"string"},"ip":{"description":"An IPv4 address used to infer the automatic proxy location. If Unipile does not offer proxies in the inferred country, or no proxy is currently available there, allow_country_fallback controls whether an available proxy from another country may be used.","type":"string"},"allow_country_fallback":{"default":true,"description":"Whether an available proxy from another country may be used when none is available in the rotation country, during authentication and throughout the account lifetime. Defaults to true. An explicitly selected country must be part of Unipile’s proxy offering for the provider, even when fallback is allowed. A proxy may be temporarily unavailable in a country included in the offering. Authentication fails if no proxy is available in any allowed country. If false, authentication fails when no proxy is available in the rotation country. If the selected proxy later fails and no replacement is available there, the account enters Service interruption. Rotation to another available proxy in that country remains allowed.","type":"boolean"}}},"allow_methods":{"minItems":1,"uniqueItems":true,"description":"The authentication methods to show in the hosted auth.\n          `credentials` : Credentials Authentication\n          `cookies` : Cookies Authentication\n          `unilogin` : Connect the active browser session through the UniLogin extension\n        ","default":["credentials","unilogin"],"type":"array","items":{"type":"string","enum":["credentials","cookies","unilogin"]}}}},"facebook":{"additionalProperties":true,"description":"Facebook specific configuration.","type":"object","properties":{"custom_proxy":{"title":"Custom proxy","description":"A custom proxy used to connect to the account provider. When Automatic Proxy Protection applies to the provider, Unipile manages the proxy by default. A custom proxy overrides Automatic Proxy Protection. Read more in the Proxy documentation.","type":"object","required":["host","port"],"properties":{"host":{"minLength":1,"maxLength":255,"description":"The hostname or IP address of the proxy, without a scheme, port, path or credentials. Enclose IPv6 addresses in brackets.","type":"string"},"port":{"minimum":1,"maximum":65535,"description":"The port of the proxy, between 1 and 65535.","type":"integer"},"username":{"description":"The username to connect to the proxy. Omitted, null or empty credentials select unauthenticated access when both credentials are absent. SOCKS5 requires both a non-empty username and password for authentication, each at most 255 bytes.","anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}]},"password":{"description":"The password to connect to the proxy. Omitted, null or empty credentials select unauthenticated access when both credentials are absent. SOCKS5 requires both a non-empty username and password for authentication, each at most 255 bytes. HTTP Basic authentication permits an empty username or password.","anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}]},"protocol":{"default":"https","description":"The protocol of the proxy. Defaults to `https`.\n        - `https` is HTTPS.\n        - `http` is HTTP.\n          - `socks5` is SOCKS5.\n          - `socks4` is SOCKS4.","type":"string","enum":["https","http","socks5","socks4"]}}},"auto_proxy_config":{"description":"Country preferences for automatic proxy assignment. Explicitly selected countries must be part of Unipile’s proxy offering for the provider. If omitted, Unipile determines the preferred country automatically. The fallback setting determines whether an available proxy from another country may be used when no proxy is available in the preferred country.","title":"Automatic proxy configuration","type":"object","properties":{"country":{"description":"An ISO 3166-1 alpha-2 country code for the automatic proxy location, normalized to uppercase. Choose from the <a href=\"https://developer.unipile.com/v2.0/docs/proxys#countries\">countries where Unipile offers automatic proxies</a>. A proxy may be temporarily unavailable even in a country included in the offering.","type":"string"},"ip":{"description":"An IPv4 address used to infer the automatic proxy location. If Unipile does not offer proxies in the inferred country, or no proxy is currently available there, allow_country_fallback controls whether an available proxy from another country may be used.","type":"string"},"allow_country_fallback":{"default":true,"description":"Whether an available proxy from another country may be used when none is available in the rotation country, during authentication and throughout the account lifetime. Defaults to true. An explicitly selected country must be part of Unipile’s proxy offering for the provider, even when fallback is allowed. A proxy may be temporarily unavailable in a country included in the offering. Authentication fails if no proxy is available in any allowed country. If false, authentication fails when no proxy is available in the rotation country. If the selected proxy later fails and no replacement is available there, the account enters Service interruption. Rotation to another available proxy in that country remains allowed.","type":"boolean"}}},"surface":{"description":"Meta web surface used to bootstrap the session. `facebook` uses facebook.com/messages (default), `messenger` uses messenger.com.","default":"facebook","anyOf":[{"type":"string","enum":["facebook"]},{"type":"string","enum":["messenger"]}]},"products":{"default":["messaging","page"],"minItems":1,"uniqueItems":true,"description":"Specifies which Facebook products are allowed to be activated (as long as the account actually has access to them). By default, all products are made available. `messaging` is always activated.\n      `messaging` : Messenger inbox of the account<br>\n      `page` : Facebook Pages administered by the account — each Page is an inbox (`PAGE_<page_id>_INBOX`) whose chats are answered as the Page\n      ","type":"array","items":{"type":"string","enum":["messaging","page"]}},"page_ids":{"uniqueItems":true,"description":"With the `page` product: the Facebook Pages that can be activated, by id (the Page messaging id, as in `PAGE_<page_id>_INBOX`). By default, every Page the account administers. Without `allow_product_selection` they are all activated; with it, they are the ones offered for selection. Each activated Page runs as its own product `page_<page_id>`, with its own connection status.","type":"array","items":{"type":"string"}},"allow_methods":{"description":"The authentication methods to show in Hosted Auth.\n          `credentials`: Credentials authentication\n          `cookies`: Cookie authentication\n          `unilogin`: Connect the active browser session through the UniLogin extension\n        ","default":["credentials","cookies","unilogin"],"type":"array","items":{"type":"string","enum":["credentials","cookies","unilogin"]}},"allow_product_selection":{"default":true,"description":"When true, show the product selection screen after authentication, even when the account administers no Facebook Page; this screen also displays the requested scopes. When false, products are selected automatically and scope consent is collected before authentication.","type":"boolean"}}},"imap":{"additionalProperties":true,"description":"IMAP specific configuration.","type":"object","properties":{"custom_proxy":{"title":"Custom proxy","description":"A custom proxy used to connect to the account provider. When Automatic Proxy Protection applies to the provider, Unipile manages the proxy by default. A custom proxy overrides Automatic Proxy Protection. Read more in the Proxy documentation.","type":"object","required":["host","port"],"properties":{"host":{"minLength":1,"maxLength":255,"description":"The hostname or IP address of the proxy, without a scheme, port, path or credentials. Enclose IPv6 addresses in brackets.","type":"string"},"port":{"minimum":1,"maximum":65535,"description":"The port of the proxy, between 1 and 65535.","type":"integer"},"username":{"description":"The username to connect to the proxy. Omitted, null or empty credentials select unauthenticated access when both credentials are absent. SOCKS5 requires both a non-empty username and password for authentication, each at most 255 bytes.","anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}]},"password":{"description":"The password to connect to the proxy. Omitted, null or empty credentials select unauthenticated access when both credentials are absent. SOCKS5 requires both a non-empty username and password for authentication, each at most 255 bytes. HTTP Basic authentication permits an empty username or password.","anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}]},"protocol":{"default":"https","description":"The protocol of the proxy. Defaults to `https`.\n        - `https` is HTTPS.\n        - `http` is HTTP.\n          - `socks5` is SOCKS5.\n          - `socks4` is SOCKS4.","type":"string","enum":["https","http","socks5","socks4"]}}},"initial_sync_enable":{"description":"Whether initial sync is enabled. Defaults to false for new accounts. When reconnecting, omitting this field preserves the current setting. Re-enabling starts a fresh initial sync. Initial sync is required for advanced search. Read more in the Synced Accounts guide.","type":"boolean"}}},"telegram":{"additionalProperties":true,"description":"Telegram specific configuration.","type":"object","properties":{"custom_proxy":{"title":"Custom proxy","description":"A custom proxy used to connect to the account provider. When Automatic Proxy Protection applies to the provider, Unipile manages the proxy by default. A custom proxy overrides Automatic Proxy Protection. Read more in the Proxy documentation.","type":"object","required":["host","port"],"properties":{"host":{"minLength":1,"maxLength":255,"description":"The hostname or IP address of the proxy, without a scheme, port, path or credentials. Enclose IPv6 addresses in brackets.","type":"string"},"port":{"minimum":1,"maximum":65535,"description":"The port of the proxy, between 1 and 65535.","type":"integer"},"username":{"description":"The username to connect to the proxy. Omitted, null or empty credentials select unauthenticated access when both credentials are absent. SOCKS5 requires both a non-empty username and password for authentication, each at most 255 bytes.","anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}]},"password":{"description":"The password to connect to the proxy. Omitted, null or empty credentials select unauthenticated access when both credentials are absent. SOCKS5 requires both a non-empty username and password for authentication, each at most 255 bytes. HTTP Basic authentication permits an empty username or password.","anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}]},"protocol":{"default":"https","description":"The protocol of the proxy. Defaults to `https`.\n        - `https` is HTTPS.\n        - `http` is HTTP.\n          - `socks5` is SOCKS5.\n          - `socks4` is SOCKS4.","type":"string","enum":["https","http","socks5","socks4"]}}}}},"global":{"description":"Configuration applied to all providers","additionalProperties":false,"type":"object","properties":{"login_hint":{"description":"If your application knows which user is trying to authenticate, it can use this parameter to provide a hint to the Hosted Auth. It uses the hint to simplify the login flow either by prefilling the email / username / phone number field in the authentication forms.","type":"string"},"allow_user_proxy_override":{"default":false,"description":"If true, the Hosted Auth UI will show a field where the user can provide their own proxy settings. When filled, the user-defined proxy takes precedence over any custom_proxy defined in the configuration and over automatic proxy detection (if the provider supports it).","type":"boolean"},"allow_user_country_override":{"default":false,"description":"If true, the Hosted Auth UI will allow the user to manually select a country where Unipile offers automatic proxies for the provider. A proxy may still be temporarily unavailable in the selected country. This selection overrides the detected country and any auto_proxy_config value. Note: if a custom_proxy is explicitly configured for a provider, this option has no effect for that provider (no country selection will be shown).","type":"boolean"},"wait_initial_sync":{"default":false,"description":"When true, the hosted authentication will wait for the initial sync to complete before redirecting. Only supported for providers with initial sync capability (whatsapp and imap). After authentication succeeds, the session can only poll the linked account for up to 24 hours, independently of the original link expiration, and cannot authenticate another account.","type":"boolean"}}}}},"account_id":{"description":"Required to re-authenticate or reconfigure an existing account. The entire account is refreshed and all configured products are restarted.","type":"string","pattern":"^acc_(.*)$"}}}]}}}},"x-samples-languages":["node","python","curl"],"x-code-samples":[{"name":"Create auth link","language":"node","install":"npm install unipile","code":"import { UnipileHostedAuth } from 'unipile';\n\nconst ACCOUNT_ID = 'acc_123456789';\n\nconst unipileHostedAuth = new UnipileHostedAuth({ key: 'YOUR_API_KEY' });\n\nconst { data } = await unipileHostedAuth.createAuthLink(\n  {\n    body: {\n      expires_on: 'value',\n      redirect_uri: 'https://myapp.com/callback',\n      providers: '*',\n    },\n  }\n);"},{"name":"Create auth link","language":"python","install":"pip install git+https://github.com/unipile/unipile-python.git","code":"import unipile\n\nACCOUNT_ID = \"acc_123456789\"\n\nconfiguration = unipile.Configuration()\nconfiguration.api_key[\"apiKey\"] = \"YOUR_API_KEY\"\n\nwith unipile.ApiClient(configuration) as api_client:\n    hosted_auth_api = unipile.HostedAuthApi(api_client)\n\nresponse = hosted_auth_api.create_auth_link(\n    {\n    'expires_on': 'value',\n    'redirect_uri': 'https://myapp.com/callback',\n    'providers': '*',\n  }\n)"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","required":["object","link"],"properties":{"object":{"type":"string","enum":["HostedAuthLink"]},"link":{"description":"Link to the Hosted Auth session. Redirect your users to this link so they can authenticate their account. If you use a white-label domain, only replace the hostname with a domain that has been explicitly verified by Unipile for the parent Application.","type":"string"}}}}}}}}},"/v2/accounts/{account_id}":{"get":{"operationId":"getAccount","summary":"Get an Account","tags":["Accounts"],"description":"Retrieve an Account. After successful Hosted Auth authentication with initial sync waiting enabled, the consumed session can retrieve only its linked account until its polling deadline.","parameters":[{"schema":{"type":"string","pattern":"^acc_(.*)$"},"in":"path","name":"account_id","required":true}],"x-samples-languages":["node","python","curl"],"x-code-samples":[{"name":"Get account","language":"node","install":"npm install unipile","code":"import { UnipileAccounts } from 'unipile';\n\nconst ACCOUNT_ID = 'acc_123456789';\n\nconst unipileAccounts = new UnipileAccounts({ key: 'YOUR_API_KEY' });\n\nconst { data } = await unipileAccounts.getAccount(\n  {\n    path: {\n      account_id: ACCOUNT_ID,\n    },\n  }\n);"},{"name":"Get account","language":"python","install":"pip install git+https://github.com/unipile/unipile-python.git","code":"import unipile\n\nACCOUNT_ID = \"acc_123456789\"\n\nconfiguration = unipile.Configuration()\nconfiguration.api_key[\"apiKey\"] = \"YOUR_API_KEY\"\n\nwith unipile.ApiClient(configuration) as api_client:\n    accounts_api = unipile.AccountsApi(api_client)\n\nresponse = accounts_api.get_account(\n    ACCOUNT_ID\n)"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"title":"Account","type":"object","required":["object","user_id","created_at","id","application_id","status","is_locked","provider","metadata"],"properties":{"object":{"description":"The type of the returned object.","type":"string","enum":["Account"]},"user_id":{"description":"The ID of the user that owns the account for the provider.","type":"string"},"name":{"description":"The name of the account. This is usually the display name or public identifier (phone number, email address, etc.) of the user that owns the account.","type":"string"},"created_at":{"description":"The date and time the account was linked with Unipile.","type":"string"},"id":{"description":"ID of the account.","type":"string","pattern":"^acc_(.*)$"},"application_id":{"description":"ID of the parent application.","type":"string","pattern":"^app_(.*)$"},"account_scope_id":{"description":"ID of the Scope assigned to the Account. Once assigned, the Scope cannot be removed or replaced.","anyOf":[{"type":"string","pattern":"^scope_(.*)$"},{"type":"null"}]},"status":{"description":"The current status of the account.\n    - `running` is Operational.\n    - `errored` is Service Interuption.\n    - `disconnected` requires authentication.\n    - `degraded` means at least one product is running while another is errored; inspect `metadata.products_connection_status`.\n    - `partial` means at least one product is running while another requires authentication; inspect `metadata.products_connection_status`.\n    Learn more about [Status & Lifecycle](https://developer.unipile.com/v2.0/docs/status-lifecycle).","type":"string","enum":["running","errored","disconnected","degraded","partial"]},"is_locked":{"description":"Whether API access to the account is locked.","type":"boolean"},"provider":{"description":"The provider's of the Account.\n    - `mock` is mock.\n    - `whatsapp` is WhatsApp.\n    - `linkedin` is LinkedIn.\n    - `instagram` is Instagram.\n    - `facebook` is Facebook.\n    - `google` is Google.\n    - `outlook` is Outlook.\n    - `telegram` is Telegram.\n    - `imap` is IMAP.","type":"string","enum":["mock","whatsapp","linkedin","google","outlook","imap","telegram","instagram","facebook"]},"oauth_scope":{"description":"If the provider is OAuth, this is the scope of comma-separated permissions granted to the account.","type":"string"},"metadata":{"description":"Metadata associated with the Account.","type":"object","properties":{"auto_proxy_country":{"description":"The preferred country for automatic proxy selection. A country inferred from an IP may be outside Unipile’s proxy offering. The current proxy may be in another country when fallback is allowed and no proxy is available in the preferred country.","type":"string"},"allow_country_fallback":{"description":"Whether an available proxy from another country may be used when none is available in the rotation country, during authentication and throughout the account lifetime. Defaults to true. A country included in Unipile’s proxy offering may still have no proxy currently available. If false, authentication fails when no proxy is available in the rotation country. If the selected proxy later fails and no replacement is available there, the account enters Service interruption. Rotation to another available proxy in that country remains allowed.","type":"boolean"},"connection_method":{"description":"The authentication method that currently owns the account session lifecycle.","type":"string","enum":["credentials","cookies","unilogin"]},"v1_account_id":{"description":"The ID of the account in the v1 if the account is migrated from v1.","type":"string"},"v1_instance_port":{"description":"The port of the v1 instance from which the account was migrated.","type":"number"},"products_connection_status":{"description":"The status of the connection to a product, if the account is connected to multiple products.","type":"object","additionalProperties":{"type":"string","enum":["running","disconnected","errored"]}},"products_display_names":{"description":"The human-readable name of a product, keyed like products_connection_status, when the product has one (e.g. the name of a Facebook Page).","type":"object","additionalProperties":{"type":"string"}},"custom_data":{"description":"Custom data of the account. This is where you can store custom data using \"Update an account\" method.","type":"object","additionalProperties":{"type":"string"}}}},"initial_sync":{"description":"Sync details if the account has initial sync enabled.","type":"object","required":["status"],"properties":{"status":{"description":"The state of an account’s initial provider sync.\n  - `pending`sync hasn’t started yet.\n  - `running` sync is currently in progress.\n  - `failed` sync could not be completed due to an error.\n  - `completed` sync finished successfully.\n  .","type":"string","enum":["pending","running","failed","completed"]},"started_at":{"description":"The date and time the initial sync started.","type":"string"}}},"proxy":{"description":"The proxy used for the account.","type":"object","required":["country","auto_proxy"],"properties":{"country":{"description":"The country of the proxy. If null, the proxy has no defined country.","anyOf":[{"type":"string"},{"type":"null"}]},"auto_proxy":{"description":"Whether the proxy was set automatically by Unipile.","type":"boolean"},"host":{"description":"The host of the custom proxy.","type":"string"},"port":{"description":"The port of the custom proxy.","type":"number"},"username":{"description":"The username used to authenticate to the custom proxy.","type":"string"},"protocol":{"description":"The protocol of the custom proxy.","type":"string"}}}}}}}}}},"delete":{"operationId":"removeAccount","summary":"Remove an Account","tags":["Accounts"],"description":"Remove an Account from Unipile by its ID. This action is irreversible and will remove all data associated with the Account.","parameters":[{"schema":{"type":"string","pattern":"^acc_(.*)$"},"in":"path","name":"account_id","required":true,"description":"The ID of the Account to remove."}],"x-samples-languages":["node","python","curl"],"x-code-samples":[{"name":"Remove account","language":"node","install":"npm install unipile","code":"import { UnipileAccounts } from 'unipile';\n\nconst ACCOUNT_ID = 'acc_123456789';\n\nconst unipileAccounts = new UnipileAccounts({ key: 'YOUR_API_KEY' });\n\nconst { data } = await unipileAccounts.removeAccount(\n  {\n    path: {\n      account_id: ACCOUNT_ID,\n    },\n  }\n);"},{"name":"Remove account","language":"python","install":"pip install git+https://github.com/unipile/unipile-python.git","code":"import unipile\n\nACCOUNT_ID = \"acc_123456789\"\n\nconfiguration = unipile.Configuration()\nconfiguration.api_key[\"apiKey\"] = \"YOUR_API_KEY\"\n\nwith unipile.ApiClient(configuration) as api_client:\n    accounts_api = unipile.AccountsApi(api_client)\n\nresponse = accounts_api.remove_account(\n    ACCOUNT_ID\n)"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","required":["success"],"properties":{"success":{"type":"boolean"}}}}}}}},"patch":{"operationId":"updateAccount","summary":"Update an Account","tags":["Accounts"],"description":"Update an Account by ID.","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"account_scope_id":{"description":"The Scope to permanently assign to an unscoped Account. This field requires a Service API Key, and the Scope cannot be removed or replaced after assignment.","type":"string","pattern":"^scope_(.*)$"},"metadata":{"description":"Custom key-value data for the account. Replaces the account `metadata.custom_data` field; other metadata fields are not modified. Any fields not provided will be removed.","type":"object","additionalProperties":{"type":"string"}},"auto_proxy_country":{"description":"The rotation country to use for Automatic Proxy Protection. Choose from the <a href=\"https://developer.unipile.com/v2.0/docs/proxys#countries\">countries where Unipile offers automatic proxies</a>. A proxy may be temporarily unavailable even in a country included in the offering.","type":"string"},"allow_country_fallback":{"description":"Whether Automatic Proxy Protection may use an available proxy from another country when none is available in the rotation country, during authentication and throughout the account lifetime. Defaults to true. An explicitly selected rotation country must be part of Unipile’s proxy offering for the provider, but a proxy may still be temporarily unavailable there. If false, authentication fails when no proxy is available in the rotation country; if the selected proxy later fails without an available replacement there, the account enters Service interruption.","type":"boolean"},"proxy":{"description":"A new proxy configuration for the account. This will restart the account. Set to `null` to remove the proxy. Removing the proxy will revert the account to using Automatic Proxy Protection if required for the provider.","anyOf":[{"title":"Custom proxy","description":"A custom proxy used to connect to the account provider. When Automatic Proxy Protection applies to the provider, Unipile manages the proxy by default. A custom proxy overrides Automatic Proxy Protection. Read more in the Proxy documentation.","type":"object","required":["host","port"],"properties":{"host":{"minLength":1,"maxLength":255,"description":"The hostname or IP address of the proxy, without a scheme, port, path or credentials. Enclose IPv6 addresses in brackets.","type":"string"},"port":{"minimum":1,"maximum":65535,"description":"The port of the proxy, between 1 and 65535.","type":"integer"},"username":{"description":"The username to connect to the proxy. Omitted, null or empty credentials select unauthenticated access when both credentials are absent. SOCKS5 requires both a non-empty username and password for authentication, each at most 255 bytes.","anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}]},"password":{"description":"The password to connect to the proxy. Omitted, null or empty credentials select unauthenticated access when both credentials are absent. SOCKS5 requires both a non-empty username and password for authentication, each at most 255 bytes. HTTP Basic authentication permits an empty username or password.","anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}]},"protocol":{"default":"https","description":"The protocol of the proxy. Defaults to `https`.\n        - `https` is HTTPS.\n        - `http` is HTTP.\n          - `socks5` is SOCKS5.\n          - `socks4` is SOCKS4.","type":"string","enum":["https","http","socks5","socks4"]}}},{"type":"null"}]}}}}}},"parameters":[{"schema":{"type":"string","pattern":"^acc_(.*)$"},"in":"path","name":"account_id","required":true,"description":"The ID of the Account to update."}],"x-samples-languages":["node","python","curl"],"x-code-samples":[{"name":"Update account","language":"node","install":"npm install unipile","code":"import { UnipileAccounts } from 'unipile';\n\nconst ACCOUNT_ID = 'acc_123456789';\n\nconst unipileAccounts = new UnipileAccounts({ key: 'YOUR_API_KEY' });\n\nconst { data } = await unipileAccounts.updateAccount(\n  {\n    path: {\n      account_id: ACCOUNT_ID,\n    },\n    body: {\n      account_scope_id: 'account_scope_id',\n    },\n  }\n);"},{"name":"Update account","language":"python","install":"pip install git+https://github.com/unipile/unipile-python.git","code":"import unipile\n\nACCOUNT_ID = \"acc_123456789\"\n\nconfiguration = unipile.Configuration()\nconfiguration.api_key[\"apiKey\"] = \"YOUR_API_KEY\"\n\nwith unipile.ApiClient(configuration) as api_client:\n    accounts_api = unipile.AccountsApi(api_client)\n\nresponse = accounts_api.update_account(\n    ACCOUNT_ID,\n    {\n    'account_scope_id': 'account_scope_id',\n  }\n)"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"title":"Account","type":"object","required":["object","user_id","created_at","id","application_id","status","is_locked","provider","metadata"],"properties":{"object":{"description":"The type of the returned object.","type":"string","enum":["Account"]},"user_id":{"description":"The ID of the user that owns the account for the provider.","type":"string"},"name":{"description":"The name of the account. This is usually the display name or public identifier (phone number, email address, etc.) of the user that owns the account.","type":"string"},"created_at":{"description":"The date and time the account was linked with Unipile.","type":"string"},"id":{"description":"ID of the account.","type":"string","pattern":"^acc_(.*)$"},"application_id":{"description":"ID of the parent application.","type":"string","pattern":"^app_(.*)$"},"account_scope_id":{"description":"ID of the Scope assigned to the Account. Once assigned, the Scope cannot be removed or replaced.","anyOf":[{"type":"string","pattern":"^scope_(.*)$"},{"type":"null"}]},"status":{"description":"The current status of the account.\n    - `running` is Operational.\n    - `errored` is Service Interuption.\n    - `disconnected` requires authentication.\n    - `degraded` means at least one product is running while another is errored; inspect `metadata.products_connection_status`.\n    - `partial` means at least one product is running while another requires authentication; inspect `metadata.products_connection_status`.\n    Learn more about [Status & Lifecycle](https://developer.unipile.com/v2.0/docs/status-lifecycle).","type":"string","enum":["running","errored","disconnected","degraded","partial"]},"is_locked":{"description":"Whether API access to the account is locked.","type":"boolean"},"provider":{"description":"The provider's of the Account.\n    - `mock` is mock.\n    - `whatsapp` is WhatsApp.\n    - `linkedin` is LinkedIn.\n    - `instagram` is Instagram.\n    - `facebook` is Facebook.\n    - `google` is Google.\n    - `outlook` is Outlook.\n    - `telegram` is Telegram.\n    - `imap` is IMAP.","type":"string","enum":["mock","whatsapp","linkedin","google","outlook","imap","telegram","instagram","facebook"]},"oauth_scope":{"description":"If the provider is OAuth, this is the scope of comma-separated permissions granted to the account.","type":"string"},"metadata":{"description":"Metadata associated with the Account.","type":"object","properties":{"auto_proxy_country":{"description":"The preferred country for automatic proxy selection. A country inferred from an IP may be outside Unipile’s proxy offering. The current proxy may be in another country when fallback is allowed and no proxy is available in the preferred country.","type":"string"},"allow_country_fallback":{"description":"Whether an available proxy from another country may be used when none is available in the rotation country, during authentication and throughout the account lifetime. Defaults to true. A country included in Unipile’s proxy offering may still have no proxy currently available. If false, authentication fails when no proxy is available in the rotation country. If the selected proxy later fails and no replacement is available there, the account enters Service interruption. Rotation to another available proxy in that country remains allowed.","type":"boolean"},"connection_method":{"description":"The authentication method that currently owns the account session lifecycle.","type":"string","enum":["credentials","cookies","unilogin"]},"v1_account_id":{"description":"The ID of the account in the v1 if the account is migrated from v1.","type":"string"},"v1_instance_port":{"description":"The port of the v1 instance from which the account was migrated.","type":"number"},"products_connection_status":{"description":"The status of the connection to a product, if the account is connected to multiple products.","type":"object","additionalProperties":{"type":"string","enum":["running","disconnected","errored"]}},"products_display_names":{"description":"The human-readable name of a product, keyed like products_connection_status, when the product has one (e.g. the name of a Facebook Page).","type":"object","additionalProperties":{"type":"string"}},"custom_data":{"description":"Custom data of the account. This is where you can store custom data using \"Update an account\" method.","type":"object","additionalProperties":{"type":"string"}}}},"initial_sync":{"description":"Sync details if the account has initial sync enabled.","type":"object","required":["status"],"properties":{"status":{"description":"The state of an account’s initial provider sync.\n  - `pending`sync hasn’t started yet.\n  - `running` sync is currently in progress.\n  - `failed` sync could not be completed due to an error.\n  - `completed` sync finished successfully.\n  .","type":"string","enum":["pending","running","failed","completed"]},"started_at":{"description":"The date and time the initial sync started.","type":"string"}}},"proxy":{"description":"The proxy used for the account.","type":"object","required":["country","auto_proxy"],"properties":{"country":{"description":"The country of the proxy. If null, the proxy has no defined country.","anyOf":[{"type":"string"},{"type":"null"}]},"auto_proxy":{"description":"Whether the proxy was set automatically by Unipile.","type":"boolean"},"host":{"description":"The host of the custom proxy.","type":"string"},"port":{"description":"The port of the custom proxy.","type":"number"},"username":{"description":"The username used to authenticate to the custom proxy.","type":"string"},"protocol":{"description":"The protocol of the custom proxy.","type":"string"}}}}}}}}}}},"/v2/accounts/":{"get":{"operationId":"listAccounts","summary":"List all Accounts","tags":["Accounts"],"description":"Returns the Accounts accessible to the API Key in the current Application. Use `account_scope_id` with a Scope ID to return Accounts assigned to that Scope, or `none` to return Accounts without a Scope. Accounts are sorted alphabetically by `name`.","parameters":[{"schema":{"anyOf":[{"type":"string","pattern":"^scope_(.*)$"},{"type":"string","enum":["none"]}]},"in":"query","name":"account_scope_id","required":false,"description":"Filter Accounts by Scope ID, or use `none` to return Accounts without a Scope."},{"schema":{"type":"string","enum":["running","errored","disconnected","degraded","partial"]},"in":"query","name":"status","required":false,"description":"Filter to return only accounts of the given status."},{"schema":{"type":"string","enum":["linkedin","mock","whatsapp","google","outlook","imap","telegram","instagram","facebook"]},"in":"query","name":"provider","required":false,"description":"Filter to return only accounts of the given provider.\n        - `mock` is mock.\n        - `whatsapp` is WhatsApp.\n        - `linkedin` is LinkedIn.\n        - `instagram` is Instagram.\n        - `facebook` is Facebook.\n        - `google` is Google.\n        - `outlook` is Outlook.\n        - `telegram` is Telegram.\n        - `imap` is IMAP."},{"schema":{"type":"string"},"in":"query","name":"search","required":false,"description":"Filter to return only accounts matching the given search term on `name` or `id`."},{"schema":{"pattern":"^[0-9]+$","type":"string"},"in":"query","name":"offset","required":false,"description":"A non-negative integer offset used for pagination."},{"schema":{"default":"20","pattern":"^[0-9]+$","type":"string"},"in":"query","name":"limit","required":false,"description":"A positive integer limit of items to be returned."}],"x-samples-languages":["node","python","curl"],"x-code-samples":[{"name":"List accounts","language":"node","install":"npm install unipile","code":"import { UnipileAccounts } from 'unipile';\n\nconst ACCOUNT_ID = 'acc_123456789';\n\nconst unipileAccounts = new UnipileAccounts({ key: 'YOUR_API_KEY' });\n\nconst { data } = await unipileAccounts.listAccounts();"},{"name":"List accounts","language":"python","install":"pip install git+https://github.com/unipile/unipile-python.git","code":"import unipile\n\nACCOUNT_ID = \"acc_123456789\"\n\nconfiguration = unipile.Configuration()\nconfiguration.api_key[\"apiKey\"] = \"YOUR_API_KEY\"\n\nwith unipile.ApiClient(configuration) as api_client:\n    accounts_api = unipile.AccountsApi(api_client)\n\nresponse = accounts_api.list_accounts()"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","required":["object","data","has_more"],"properties":{"object":{"type":"string","enum":["Accounts"]},"data":{"type":"array","items":{"title":"Account","type":"object","required":["object","user_id","created_at","id","application_id","status","is_locked","provider","metadata"],"properties":{"object":{"description":"The type of the returned object.","type":"string","enum":["Account"]},"user_id":{"description":"The ID of the user that owns the account for the provider.","type":"string"},"name":{"description":"The name of the account. This is usually the display name or public identifier (phone number, email address, etc.) of the user that owns the account.","type":"string"},"created_at":{"description":"The date and time the account was linked with Unipile.","type":"string"},"id":{"description":"ID of the account.","type":"string","pattern":"^acc_(.*)$"},"application_id":{"description":"ID of the parent application.","type":"string","pattern":"^app_(.*)$"},"account_scope_id":{"description":"ID of the Scope assigned to the Account. Once assigned, the Scope cannot be removed or replaced.","anyOf":[{"type":"string","pattern":"^scope_(.*)$"},{"type":"null"}]},"status":{"description":"The current status of the account.\n    - `running` is Operational.\n    - `errored` is Service Interuption.\n    - `disconnected` requires authentication.\n    - `degraded` means at least one product is running while another is errored; inspect `metadata.products_connection_status`.\n    - `partial` means at least one product is running while another requires authentication; inspect `metadata.products_connection_status`.\n    Learn more about [Status & Lifecycle](https://developer.unipile.com/v2.0/docs/status-lifecycle).","type":"string","enum":["running","errored","disconnected","degraded","partial"]},"is_locked":{"description":"Whether API access to the account is locked.","type":"boolean"},"provider":{"description":"The provider's of the Account.\n    - `mock` is mock.\n    - `whatsapp` is WhatsApp.\n    - `linkedin` is LinkedIn.\n    - `instagram` is Instagram.\n    - `facebook` is Facebook.\n    - `google` is Google.\n    - `outlook` is Outlook.\n    - `telegram` is Telegram.\n    - `imap` is IMAP.","type":"string","enum":["mock","whatsapp","linkedin","google","outlook","imap","telegram","instagram","facebook"]},"oauth_scope":{"description":"If the provider is OAuth, this is the scope of comma-separated permissions granted to the account.","type":"string"},"metadata":{"description":"Metadata associated with the Account.","type":"object","properties":{"auto_proxy_country":{"description":"The preferred country for automatic proxy selection. A country inferred from an IP may be outside Unipile’s proxy offering. The current proxy may be in another country when fallback is allowed and no proxy is available in the preferred country.","type":"string"},"allow_country_fallback":{"description":"Whether an available proxy from another country may be used when none is available in the rotation country, during authentication and throughout the account lifetime. Defaults to true. A country included in Unipile’s proxy offering may still have no proxy currently available. If false, authentication fails when no proxy is available in the rotation country. If the selected proxy later fails and no replacement is available there, the account enters Service interruption. Rotation to another available proxy in that country remains allowed.","type":"boolean"},"connection_method":{"description":"The authentication method that currently owns the account session lifecycle.","type":"string","enum":["credentials","cookies","unilogin"]},"v1_account_id":{"description":"The ID of the account in the v1 if the account is migrated from v1.","type":"string"},"v1_instance_port":{"description":"The port of the v1 instance from which the account was migrated.","type":"number"},"products_connection_status":{"description":"The status of the connection to a product, if the account is connected to multiple products.","type":"object","additionalProperties":{"type":"string","enum":["running","disconnected","errored"]}},"products_display_names":{"description":"The human-readable name of a product, keyed like products_connection_status, when the product has one (e.g. the name of a Facebook Page).","type":"object","additionalProperties":{"type":"string"}},"custom_data":{"description":"Custom data of the account. This is where you can store custom data using \"Update an account\" method.","type":"object","additionalProperties":{"type":"string"}}}},"initial_sync":{"description":"Sync details if the account has initial sync enabled.","type":"object","required":["status"],"properties":{"status":{"description":"The state of an account’s initial provider sync.\n  - `pending`sync hasn’t started yet.\n  - `running` sync is currently in progress.\n  - `failed` sync could not be completed due to an error.\n  - `completed` sync finished successfully.\n  .","type":"string","enum":["pending","running","failed","completed"]},"started_at":{"description":"The date and time the initial sync started.","type":"string"}}},"proxy":{"description":"The proxy used for the account.","type":"object","required":["country","auto_proxy"],"properties":{"country":{"description":"The country of the proxy. If null, the proxy has no defined country.","anyOf":[{"type":"string"},{"type":"null"}]},"auto_proxy":{"description":"Whether the proxy was set automatically by Unipile.","type":"boolean"},"host":{"description":"The host of the custom proxy.","type":"string"},"port":{"description":"The port of the custom proxy.","type":"number"},"username":{"description":"The username used to authenticate to the custom proxy.","type":"string"},"protocol":{"description":"The protocol of the custom proxy.","type":"string"}}}}}},"has_more":{"description":"Whether there are more accounts to fetch.","type":"boolean"}}}}}}}}},"/v2/accounts/{account_id}/sync":{"post":{"operationId":"syncAccount","summary":"Synchronize an Account","tags":["Accounts"],"description":"Request a full history synchronization for an Account, including after an earlier synchronization completed. Currently supported for WhatsApp accounts. The response confirms that the request was sent; completion is asynchronous and the history returned depends on the provider. An active synchronization prevents another request until it completes or an error is detected.","parameters":[{"schema":{"type":"string","pattern":"^acc_(.*)$"},"in":"path","name":"account_id","required":true,"description":"The ID of the Account to synchronize."}],"responses":{"202":{"description":"Confirmation that a full history synchronization was requested. Completion is asynchronous.","content":{"application/json":{"schema":{"description":"Confirmation that a full history synchronization was requested. Completion is asynchronous.","type":"object","required":["object","request_id"],"properties":{"object":{"description":"Object type identifier, always \"AccountSyncRequested\".","type":"string","enum":["AccountSyncRequested"]},"request_id":{"description":"Identifier of the history synchronization request sent to the provider.","type":"string"}}}}}}}}},"/v2/api-keys/":{"post":{"operationId":"createApiKey","summary":"Create an API Key","tags":["API Keys"],"description":"Creates an API key that can access every account or only accounts assigned to one scope. Service API keys cannot be created through this endpoint.","requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"additionalProperties":false,"title":"Global Account API Key","type":"object","required":["name","expires_at","access"],"properties":{"name":{"minLength":1,"maxLength":255,"description":"An internal name used to identify the API Key.","type":"string"},"expires_at":{"description":"The date and time when the API Key expires. Must use a supported date-time format. See [supported date formats](https://developer.unipile.com/v2.0/reference/api-usage#dates).","format":"date-time","type":"string"},"access":{"additionalProperties":false,"description":"The Account access boundary of the API Key.","type":"object","required":["type"],"properties":{"type":{"description":"Grants access to every Account in the Application without management permissions.","type":"string","enum":["global"]}}}}},{"additionalProperties":false,"title":"Scoped Account API Key","type":"object","required":["name","expires_at","access"],"properties":{"name":{"minLength":1,"maxLength":255,"description":"An internal name used to identify the API Key.","type":"string"},"expires_at":{"description":"The date and time when the API Key expires. Must use a supported date-time format. See [supported date formats](https://developer.unipile.com/v2.0/reference/api-usage#dates).","format":"date-time","type":"string"},"access":{"additionalProperties":false,"description":"The Account access boundary of the API Key.","type":"object","required":["type","scope_id"],"properties":{"type":{"description":"Restricts access to Accounts permanently assigned to one Scope.","type":"string","enum":["scope"]},"scope_id":{"minLength":32,"maxLength":32,"description":"The ID of the active Scope that the API Key can access.","type":"string","pattern":"^scope_(.*)$"}}}}}]}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","required":["object","id","api_key"],"properties":{"object":{"description":"The type of the created object.","type":"string","enum":["ApiKey"]},"id":{"description":"The unique public ID of the created API Key.","type":"string","pattern":"^pk_(.*)$"},"api_key":{"description":"The secret API Key token. It is returned only once and must be stored securely.","type":"string"}}}}}}}},"get":{"operationId":"listApiKeys","summary":"List API Keys","tags":["API Keys"],"description":"Lists user-managed account-wide and scoped API keys. Service API keys and automatically managed credentials are excluded.","parameters":[{"schema":{"anyOf":[{"type":"string","enum":["global"]},{"type":"string","enum":["scope"]}]},"in":"query","name":"access","required":false,"description":"Filter Account API Keys by global or Scope access."},{"schema":{"type":"string","pattern":"^scope_(.*)$"},"in":"query","name":"account_scope_id","required":false,"description":"Filter API Keys assigned to this Scope."},{"schema":{"type":"string"},"in":"query","name":"offset","required":false,"description":"The number of API Keys to skip for pagination."},{"schema":{"default":"20","type":"string"},"in":"query","name":"limit","required":false,"description":"The maximum number of API Keys to return."}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","required":["object","data","has_more"],"properties":{"object":{"description":"The type of the returned collection.","type":"string","enum":["ApiKeys"]},"data":{"description":"The Account API Keys in the current page.","type":"array","items":{"type":"object","required":["object","id","application_id","prefix","issued_at","expires_at","name","role","account_scope_id"],"properties":{"object":{"description":"The type of the returned object.","type":"string","enum":["ApiKey"]},"id":{"description":"The unique public ID of the API Key.","type":"string","pattern":"^pk_(.*)$"},"application_id":{"description":"The ID of the Application that owns the API Key.","type":"string","pattern":"^app_(.*)$"},"prefix":{"description":"The non-secret prefix used to identify the API Key.","type":"string"},"issued_at":{"description":"The date and time when the API Key was created.","type":"string"},"expires_at":{"description":"The date and time when the API Key expires.","type":"string"},"name":{"description":"The internal name of the API Key.","type":"string"},"role":{"description":"The effective access role: `service` manages the Application, `account` accesses every Account, and `scoped` accesses one Scope.","anyOf":[{"type":"string","enum":["service"]},{"type":"string","enum":["account"]},{"type":"string","enum":["scoped"]}]},"account_scope_id":{"description":"The Scope accessible to the API Key, or `null` for service and global Account API Keys.","anyOf":[{"type":"string","pattern":"^scope_(.*)$"},{"type":"null"}]}}}},"has_more":{"description":"Whether more API Keys are available after the current page.","type":"boolean"}}}}}}}}},"/v2/api-keys/{api_key_id}":{"delete":{"operationId":"deleteApiKey","summary":"Delete an API Key","tags":["API Keys"],"description":"Deletes an account-wide or scoped API key. Service API keys cannot be deleted through this endpoint.","parameters":[{"schema":{"type":"string","pattern":"^pk_(.*)$"},"in":"path","name":"api_key_id","required":true,"description":"The ID of the Account API Key to delete."}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","required":["object"],"properties":{"object":{"type":"string","enum":["ApiKeyDeleted"]}}}}}}}}},"/v2/scopes/":{"post":{"operationId":"createScope","summary":"Create a Scope","tags":["Scopes"],"description":"Creates a Scope in the authenticated Application. A Scope is an isolation boundary used to restrict Account API Keys to the Accounts assigned to it.","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","required":["name"],"properties":{"name":{"minLength":1,"maxLength":255,"description":"An internal name used to identify the Scope.","type":"string"},"reference":{"minLength":1,"maxLength":255,"description":"Optional metadata used to map the Scope to an external resource. Must be unique in the Application.","type":"string"}}}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","required":["object","id","application_id","name","reference","status","created_at","accounts_count","api_keys_count"],"properties":{"object":{"description":"The type of the returned object.","type":"string","enum":["Scope"]},"id":{"description":"The unique public ID of the Scope.","type":"string","pattern":"^scope_(.*)$"},"application_id":{"description":"The ID of the Application that owns the Scope.","type":"string","pattern":"^app_(.*)$"},"name":{"description":"The internal name of the Scope.","type":"string"},"reference":{"description":"External metadata used to map the Scope to another resource, or `null` when none is defined.","anyOf":[{"type":"string"},{"type":"null"}]},"status":{"description":"The status of the Scope. A disabled scope blocks its scoped API keys, MCP access and authentication flows until it is enabled again.","type":"string","enum":["active","disabled"]},"created_at":{"description":"The date and time when the Scope was created.","type":"string"},"accounts_count":{"description":"The number of Accounts permanently assigned to the Scope.","type":"number"},"api_keys_count":{"description":"The number of user-managed API Keys assigned to the Scope. Automatically managed credentials are excluded.","type":"number"}}}}}}}},"get":{"operationId":"listScopes","summary":"List Scopes","tags":["Scopes"],"description":"Returns the Scopes created in the authenticated Application, including their status and the number of Accounts and API Keys assigned to each Scope.","parameters":[{"schema":{"type":"string"},"in":"query","name":"offset","required":false,"description":"The number of Scopes to skip for pagination."},{"schema":{"default":"20","type":"string"},"in":"query","name":"limit","required":false,"description":"The maximum number of Scopes to return."},{"schema":{"type":"string","enum":["active","disabled"]},"in":"query","name":"status","required":false,"description":"The status of the Scope. A disabled scope blocks its scoped API keys, MCP access and authentication flows until it is enabled again."},{"schema":{"type":"string"},"in":"query","name":"search","required":false,"description":"Filter scopes by name or reference."}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","required":["object","data","has_more"],"properties":{"object":{"description":"The type of the returned collection.","type":"string","enum":["Scopes"]},"data":{"description":"The scopes in the current page.","type":"array","items":{"type":"object","required":["object","id","application_id","name","reference","status","created_at","accounts_count","api_keys_count"],"properties":{"object":{"description":"The type of the returned object.","type":"string","enum":["Scope"]},"id":{"description":"The unique public ID of the Scope.","type":"string","pattern":"^scope_(.*)$"},"application_id":{"description":"The ID of the Application that owns the Scope.","type":"string","pattern":"^app_(.*)$"},"name":{"description":"The internal name of the Scope.","type":"string"},"reference":{"description":"External metadata used to map the Scope to another resource, or `null` when none is defined.","anyOf":[{"type":"string"},{"type":"null"}]},"status":{"description":"The status of the Scope. A disabled scope blocks its scoped API keys, MCP access and authentication flows until it is enabled again.","type":"string","enum":["active","disabled"]},"created_at":{"description":"The date and time when the Scope was created.","type":"string"},"accounts_count":{"description":"The number of Accounts permanently assigned to the Scope.","type":"number"},"api_keys_count":{"description":"The number of user-managed API Keys assigned to the Scope. Automatically managed credentials are excluded.","type":"number"}}}},"has_more":{"description":"Whether more scopes are available after the current page.","type":"boolean"}}}}}}}}},"/v2/scopes/{scope_id}":{"get":{"operationId":"getScope","summary":"Get a Scope","tags":["Scopes"],"description":"Returns a Scope from the authenticated Application, including its status and the number of Accounts and API Keys assigned to it.","parameters":[{"schema":{"type":"string","pattern":"^scope_(.*)$"},"in":"path","name":"scope_id","required":true,"description":"The ID of the Scope to retrieve."}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","required":["object","id","application_id","name","reference","status","created_at","accounts_count","api_keys_count"],"properties":{"object":{"description":"The type of the returned object.","type":"string","enum":["Scope"]},"id":{"description":"The unique public ID of the Scope.","type":"string","pattern":"^scope_(.*)$"},"application_id":{"description":"The ID of the Application that owns the Scope.","type":"string","pattern":"^app_(.*)$"},"name":{"description":"The internal name of the Scope.","type":"string"},"reference":{"description":"External metadata used to map the Scope to another resource, or `null` when none is defined.","anyOf":[{"type":"string"},{"type":"null"}]},"status":{"description":"The status of the Scope. A disabled scope blocks its scoped API keys, MCP access and authentication flows until it is enabled again.","type":"string","enum":["active","disabled"]},"created_at":{"description":"The date and time when the Scope was created.","type":"string"},"accounts_count":{"description":"The number of Accounts permanently assigned to the Scope.","type":"number"},"api_keys_count":{"description":"The number of user-managed API Keys assigned to the Scope. Automatically managed credentials are excluded.","type":"number"}}}}}}}},"patch":{"operationId":"updateScope","summary":"Update a Scope","tags":["Scopes"],"description":"Updates the name, unique reference, or status of a Scope. Disabling a Scope blocks its Account API Keys and authentication flows until it is enabled again.","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"name":{"minLength":1,"description":"The new internal name of the Scope.","type":"string"},"reference":{"description":"The new external reference of the Scope. Must be unique in the Application. Set to `null` to remove it.","anyOf":[{"minLength":1,"type":"string"},{"type":"null"}]},"status":{"description":"The status of the Scope. A disabled scope blocks its scoped API keys, MCP access and authentication flows until it is enabled again.","type":"string","enum":["active","disabled"]}}}}}},"parameters":[{"schema":{"type":"string","pattern":"^scope_(.*)$"},"in":"path","name":"scope_id","required":true,"description":"The ID of the Scope to update."}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","required":["object","id","application_id","name","reference","status","created_at","accounts_count","api_keys_count"],"properties":{"object":{"description":"The type of the returned object.","type":"string","enum":["Scope"]},"id":{"description":"The unique public ID of the Scope.","type":"string","pattern":"^scope_(.*)$"},"application_id":{"description":"The ID of the Application that owns the Scope.","type":"string","pattern":"^app_(.*)$"},"name":{"description":"The internal name of the Scope.","type":"string"},"reference":{"description":"External metadata used to map the Scope to another resource, or `null` when none is defined.","anyOf":[{"type":"string"},{"type":"null"}]},"status":{"description":"The status of the Scope. A disabled scope blocks its scoped API keys, MCP access and authentication flows until it is enabled again.","type":"string","enum":["active","disabled"]},"created_at":{"description":"The date and time when the Scope was created.","type":"string"},"accounts_count":{"description":"The number of Accounts permanently assigned to the Scope.","type":"number"},"api_keys_count":{"description":"The number of user-managed API Keys assigned to the Scope. Automatically managed credentials are excluded.","type":"number"}}}}}}}},"delete":{"operationId":"deleteScope","summary":"Delete a Scope","tags":["Scopes"],"description":"Deletes a Scope from the authenticated Application. Accounts and API Keys, including expired keys, must be removed first, except for internal keys belonging to its assigned MCP users. A Scope with assigned MCP users returns a conflict unless revoke_mcp_access=true is supplied. When confirmed, all assigned MCP accesses, their OAuth authorizations and their internal API keys are deleted together with the Scope. The users’ Unipile accounts are preserved.","parameters":[{"schema":{"default":false,"type":"boolean"},"in":"query","name":"revoke_mcp_access","required":false,"description":"Explicitly revoke all assigned MCP accesses and delete their internal API keys when deleting this Scope. Accounts and other API keys must be removed first."},{"schema":{"type":"string","pattern":"^scope_(.*)$"},"in":"path","name":"scope_id","required":true,"description":"The ID of the Scope to delete."}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","required":["object"],"properties":{"object":{"description":"Indicates that the Scope was successfully deleted.","type":"string","enum":["ScopeDeleted"]}}}}}}}}},"/v2/webhooks/conversations/":{"get":{"operationId":"listWebhookConversations","summary":"List all Webhook Conversations","tags":["Webhooks"],"description":"Returns a list of all Webhook Conversations associated with the current Application. The conversations are returned sorted by their creation date, with the most recent appearing first.","parameters":[{"schema":{"type":"string","pattern":"^we_(.*)$"},"in":"query","name":"endpoint_id","required":true,"description":"Filter to return only conversations for the given endpoint."},{"schema":{"type":"string","pattern":"^evt_(.*)$"},"in":"query","name":"event_id","required":false,"description":"Filter to return only conversations for the given event."},{"schema":{"type":"string","pattern":"^acc_(.*)$"},"in":"query","name":"account_id","required":false,"description":"Filter to return only conversations for events from the given account."},{"schema":{"type":"string","enum":["account.status.disconnected","account.status.running","account.status.errored","account.status.degraded","account.status.partial","account.locked","account.unlocked","account.add","account.reconnect","account.remove","account.initial_sync.running","account.initial_sync.failed","account.initial_sync.completed","message.new","message.update","message.delete","message.receipt.read","message.receipt.delivery","message.reaction.new","message.reaction.delete","chat.delete","chat.update","email.new","email.new.bounce","email.update","email.delete","email.draft.new","email.draft.delete","email.folder.create","email.folder.update","email.folder.delete","calendar.create","calendar.update","calendar.delete","calendar.event.new","calendar.event.update","calendar.event.delete","tracking.open","tracking.click","relation.new","follower.new","blocked.new"]},"in":"query","name":"event_type","required":false,"description":"Filter to return only conversations for events of the given type."},{"schema":{"type":"string","enum":["success","failed"]},"in":"query","name":"status","required":false,"description":"The delivery status of an event, based on its latest delivery attempt to the endpoint. `success` means the endpoint returned a 2xx HTTP status; `failed` means it returned another status or did not respond."},{"schema":{"format":"date-time","type":"string"},"in":"query","name":"created_after","required":false,"description":"Filter to return only conversations created at or after the given date and time, in ISO 8601 format."},{"schema":{"format":"date-time","type":"string"},"in":"query","name":"created_before","required":false,"description":"Filter to return only conversations created before the given date and time, in ISO 8601 format."},{"schema":{"type":"string"},"in":"query","name":"offset","required":false,"description":"An offset used for pagination."},{"schema":{"type":"string"},"in":"query","name":"limit","required":false,"description":"A limit used for pagination."}],"x-samples-languages":["node","python","curl"],"x-code-samples":[{"name":"List webhook conversations","language":"node","install":"npm install unipile","code":"import { UnipileWebhooks } from 'unipile';\n\nconst ACCOUNT_ID = 'acc_123456789';\n\nconst unipileWebhooks = new UnipileWebhooks({ key: 'YOUR_API_KEY' });\n\nconst { data } = await unipileWebhooks.listWebhookConversations(\n  {\n    query: {\n      endpoint_id: 'we_123456789',\n    },\n  }\n);"},{"name":"List webhook conversations","language":"python","install":"pip install git+https://github.com/unipile/unipile-python.git","code":"import unipile\n\nACCOUNT_ID = \"acc_123456789\"\n\nconfiguration = unipile.Configuration()\nconfiguration.api_key[\"apiKey\"] = \"YOUR_API_KEY\"\n\nwith unipile.ApiClient(configuration) as api_client:\n    webhooks_api = unipile.WebhooksApi(api_client)\n\nresponse = webhooks_api.list_webhook_conversations(\n    'we_123456789'\n)"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","required":["object","data","has_more"],"properties":{"object":{"type":"string","enum":["WebhookConversations"]},"data":{"type":"array","items":{"type":"object","required":["first_attempt","event_type","created_at","http_status","endpoint_url","response_body","latency_ms","response_time_ms","object","id","endpoint_id","event_id"],"properties":{"first_attempt":{"description":"Whether this delivery was the first attempt to send the webhook. `false` indicates a retry.","type":"boolean"},"event_type":{"description":"The type of the event that was delivered.","type":"string","enum":["account.status.disconnected","account.status.running","account.status.errored","account.status.degraded","account.status.partial","account.locked","account.unlocked","account.add","account.reconnect","account.remove","account.initial_sync.running","account.initial_sync.failed","account.initial_sync.completed","message.new","message.update","message.delete","message.receipt.read","message.receipt.delivery","message.reaction.new","message.reaction.delete","chat.delete","chat.update","email.new","email.new.bounce","email.update","email.delete","email.draft.new","email.draft.delete","email.folder.create","email.folder.update","email.folder.delete","calendar.create","calendar.update","calendar.delete","calendar.event.new","calendar.event.update","calendar.event.delete","tracking.open","tracking.click","relation.new","follower.new","blocked.new"]},"created_at":{"description":"The date and time at which the delivery attempt was made, in ISO 8601 format.","type":"string"},"http_status":{"description":"The HTTP status code returned by the endpoint.","anyOf":[{"type":"integer"},{"type":"null"}]},"endpoint_url":{"description":"The URL the webhook was delivered to.","type":"string"},"response_body":{"description":"The body of the HTTP response returned by the endpoint.","anyOf":[{"type":"string"},{"type":"null"}]},"latency_ms":{"description":"The time between the event occurrence and this delivery attempt, in milliseconds.","anyOf":[{"type":"integer"},{"type":"null"}]},"response_time_ms":{"description":"The response time of the webhook endpoint for this delivery attempt, in milliseconds.","anyOf":[{"type":"integer"},{"type":"null"}]},"object":{"description":"The type of the returned object.","type":"string","enum":["WebhookConversation"]},"id":{"description":"Unique identifier of the webhook conversation.","type":"string","pattern":"^wc_(.*)$"},"endpoint_id":{"description":"Unique identifier of the webhook endpoint the event was delivered to.","type":"string","pattern":"^we_(.*)$"},"event_id":{"description":"Unique identifier of the event that was delivered.","type":"string","pattern":"^evt_(.*)$"}}}},"has_more":{"type":"boolean"}}}}}}}}},"/v2/webhooks/endpoints/":{"post":{"operationId":"createWebhookEndpoint","summary":"Create a Webhook Endpoint","tags":["Webhooks"],"description":"Creates a new webhook endpoint.","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["trigger_events","url"],"properties":{"trigger_events":{"description":"The events that will trigger the webhook endpoint.\n      Refer to [Events Types](https://developer.unipile.com/v2.0/reference/event-types-1) to see the list of available values.","type":"array","items":{"type":"string","enum":["account.status.disconnected","account.status.running","account.status.errored","account.status.degraded","account.status.partial","account.locked","account.unlocked","account.add","account.reconnect","account.remove","account.initial_sync.running","account.initial_sync.failed","account.initial_sync.completed","message.new","message.update","message.delete","message.receipt.read","message.receipt.delivery","message.reaction.new","message.reaction.delete","chat.delete","chat.update","email.new","email.new.bounce","email.update","email.delete","email.draft.new","email.draft.delete","email.folder.create","email.folder.update","email.folder.delete","calendar.create","calendar.update","calendar.delete","calendar.event.new","calendar.event.update","calendar.event.delete","tracking.open","tracking.click","relation.new","follower.new","blocked.new"]}},"account_ids":{"description":"Restrict the webhook to specific accounts. Leave empty or omit the field to listen to events from every account in the application.","type":"array","items":{"type":"string","pattern":"^acc_(.*)$"}},"url":{"description":"The HTTP or HTTPS URL to send the webhook payload to.","format":"uri","minLength":1,"maxLength":255,"pattern":"^https?://","type":"string"},"description":{"description":"A description of the webhook endpoint.","maxLength":255,"type":"string"}}}}},"required":true},"x-samples-languages":["node","python","curl"],"x-code-samples":[{"name":"Create webhook endpoint","language":"node","install":"npm install unipile","code":"import { UnipileWebhooks } from 'unipile';\n\nconst ACCOUNT_ID = 'acc_123456789';\n\nconst unipileWebhooks = new UnipileWebhooks({ key: 'YOUR_API_KEY' });\n\nconst { data } = await unipileWebhooks.createWebhookEndpoint(\n  {\n    body: {\n      trigger_events: ['account.add'],\n      url: 'https://myapp.com/callback',\n    },\n  }\n);"},{"name":"Create webhook endpoint","language":"python","install":"pip install git+https://github.com/unipile/unipile-python.git","code":"import unipile\n\nACCOUNT_ID = \"acc_123456789\"\n\nconfiguration = unipile.Configuration()\nconfiguration.api_key[\"apiKey\"] = \"YOUR_API_KEY\"\n\nwith unipile.ApiClient(configuration) as api_client:\n    webhooks_api = unipile.WebhooksApi(api_client)\n\nresponse = webhooks_api.create_webhook_endpoint(\n    {\n    'trigger_events': ['account.add'],\n    'url': 'https://myapp.com/callback',\n  }\n)"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","required":["enabled","description","url","trigger_events","secret","object","id","application_id","account_ids","account_targets"],"properties":{"enabled":{"type":"boolean"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"url":{"type":"string"},"trigger_events":{"type":"array","items":{"type":"string","enum":["account.status.disconnected","account.status.running","account.status.errored","account.status.degraded","account.status.partial","account.locked","account.unlocked","account.add","account.reconnect","account.remove","account.initial_sync.running","account.initial_sync.failed","account.initial_sync.completed","message.new","message.update","message.delete","message.receipt.read","message.receipt.delivery","message.reaction.new","message.reaction.delete","chat.delete","chat.update","email.new","email.new.bounce","email.update","email.delete","email.draft.new","email.draft.delete","email.folder.create","email.folder.update","email.folder.delete","calendar.create","calendar.update","calendar.delete","calendar.event.new","calendar.event.update","calendar.event.delete","tracking.open","tracking.click","relation.new","follower.new","blocked.new"]}},"secret":{"maxLength":36,"type":"string"},"object":{"type":"string","enum":["WebhookEndpoint"]},"id":{"type":"string","pattern":"^we_(.*)$"},"application_id":{"type":"string","pattern":"^app_(.*)$"},"account_ids":{"type":"array","items":{"type":"string","pattern":"^acc_(.*)$"}},"account_targets":{"type":"array","items":{"type":"object","required":["account_name","account_provider","object","id","status"],"properties":{"account_name":{"anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}]},"account_provider":{"description":"The provider's of the Account.\n    - `mock` is mock.\n    - `whatsapp` is WhatsApp.\n    - `linkedin` is LinkedIn.\n    - `instagram` is Instagram.\n    - `facebook` is Facebook.\n    - `google` is Google.\n    - `outlook` is Outlook.\n    - `telegram` is Telegram.\n    - `imap` is IMAP.","type":"string","enum":["mock","whatsapp","linkedin","google","outlook","imap","telegram","instagram","facebook"]},"object":{"type":"string","enum":["WebhookEndpointAccountTarget"]},"id":{"type":"string","pattern":"^acc_(.*)$"},"status":{"type":"string","enum":["active","deleted"]}}}}}}}}}}},"get":{"operationId":"listWebhookEndpoints","summary":"List all Webhook Endpoints","tags":["Webhooks"],"description":"Returns a list of all Webhook Endpoints associated with the current Application.","parameters":[{"schema":{"type":"string"},"in":"query","name":"offset","required":false,"description":"An offset used for pagination."},{"schema":{"default":"20","type":"string"},"in":"query","name":"limit","required":false,"description":"The limit of items to be returned."}],"x-samples-languages":["node","python","curl"],"x-code-samples":[{"name":"List webhook endpoints","language":"node","install":"npm install unipile","code":"import { UnipileWebhooks } from 'unipile';\n\nconst ACCOUNT_ID = 'acc_123456789';\n\nconst unipileWebhooks = new UnipileWebhooks({ key: 'YOUR_API_KEY' });\n\nconst { data } = await unipileWebhooks.listWebhookEndpoints();"},{"name":"List webhook endpoints","language":"python","install":"pip install git+https://github.com/unipile/unipile-python.git","code":"import unipile\n\nACCOUNT_ID = \"acc_123456789\"\n\nconfiguration = unipile.Configuration()\nconfiguration.api_key[\"apiKey\"] = \"YOUR_API_KEY\"\n\nwith unipile.ApiClient(configuration) as api_client:\n    webhooks_api = unipile.WebhooksApi(api_client)\n\nresponse = webhooks_api.list_webhook_endpoints()"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","required":["object","data","has_more"],"properties":{"object":{"type":"string","enum":["WebhookEndpoints"]},"data":{"type":"array","items":{"type":"object","required":["enabled","description","url","trigger_events","secret","object","id","application_id","account_ids","account_targets"],"properties":{"enabled":{"type":"boolean"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"url":{"type":"string"},"trigger_events":{"type":"array","items":{"type":"string","enum":["account.status.disconnected","account.status.running","account.status.errored","account.status.degraded","account.status.partial","account.locked","account.unlocked","account.add","account.reconnect","account.remove","account.initial_sync.running","account.initial_sync.failed","account.initial_sync.completed","message.new","message.update","message.delete","message.receipt.read","message.receipt.delivery","message.reaction.new","message.reaction.delete","chat.delete","chat.update","email.new","email.new.bounce","email.update","email.delete","email.draft.new","email.draft.delete","email.folder.create","email.folder.update","email.folder.delete","calendar.create","calendar.update","calendar.delete","calendar.event.new","calendar.event.update","calendar.event.delete","tracking.open","tracking.click","relation.new","follower.new","blocked.new"]}},"secret":{"maxLength":36,"type":"string"},"object":{"type":"string","enum":["WebhookEndpoint"]},"id":{"type":"string","pattern":"^we_(.*)$"},"application_id":{"type":"string","pattern":"^app_(.*)$"},"account_ids":{"type":"array","items":{"type":"string","pattern":"^acc_(.*)$"}},"account_targets":{"type":"array","items":{"type":"object","required":["account_name","account_provider","object","id","status"],"properties":{"account_name":{"anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}]},"account_provider":{"description":"The provider's of the Account.\n    - `mock` is mock.\n    - `whatsapp` is WhatsApp.\n    - `linkedin` is LinkedIn.\n    - `instagram` is Instagram.\n    - `facebook` is Facebook.\n    - `google` is Google.\n    - `outlook` is Outlook.\n    - `telegram` is Telegram.\n    - `imap` is IMAP.","type":"string","enum":["mock","whatsapp","linkedin","google","outlook","imap","telegram","instagram","facebook"]},"object":{"type":"string","enum":["WebhookEndpointAccountTarget"]},"id":{"type":"string","pattern":"^acc_(.*)$"},"status":{"type":"string","enum":["active","deleted"]}}}}}}},"has_more":{"type":"boolean"}}}}}}}}},"/v2/webhooks/endpoints/{id}":{"patch":{"operationId":"updateWebhookEndpoint","summary":"Update a Webhook Endpoint","tags":["Webhooks"],"description":"Updates a webhook endpoint by ID.","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"trigger_events":{"description":"The events that will trigger the webhook endpoint.\n          Refer to [Events Types](https://developer.unipile.com/v2.0/reference/event-types-1) to see the list of available values.","type":"array","items":{"type":"string","enum":["account.status.disconnected","account.status.running","account.status.errored","account.status.degraded","account.status.partial","account.locked","account.unlocked","account.add","account.reconnect","account.remove","account.initial_sync.running","account.initial_sync.failed","account.initial_sync.completed","message.new","message.update","message.delete","message.receipt.read","message.receipt.delivery","message.reaction.new","message.reaction.delete","chat.delete","chat.update","email.new","email.new.bounce","email.update","email.delete","email.draft.new","email.draft.delete","email.folder.create","email.folder.update","email.folder.delete","calendar.create","calendar.update","calendar.delete","calendar.event.new","calendar.event.update","calendar.event.delete","tracking.open","tracking.click","relation.new","follower.new","blocked.new"]}},"account_ids":{"description":"Restrict the webhook to specific accounts. Leave empty or omit the field to listen to events from every account in the application.","type":"array","items":{"type":"string","pattern":"^acc_(.*)$"}},"url":{"description":"The HTTP or HTTPS URL to send the webhook payload to.","format":"uri","minLength":1,"maxLength":255,"pattern":"^https?://","type":"string"},"description":{"description":"A description of the webhook endpoint.","maxLength":255,"type":"string"},"enabled":{"description":"Whether the webhook endpoint is enabled.","type":"boolean"}}}}}},"parameters":[{"schema":{"type":"string","pattern":"^we_(.*)$"},"in":"path","name":"id","required":true,"description":"The ID of the Webhook Endpoint to update."}],"x-samples-languages":["node","python","curl"],"x-code-samples":[{"name":"Update webhook endpoint","language":"node","install":"npm install unipile","code":"import { UnipileWebhooks } from 'unipile';\n\nconst ACCOUNT_ID = 'acc_123456789';\n\nconst unipileWebhooks = new UnipileWebhooks({ key: 'YOUR_API_KEY' });\n\nconst { data } = await unipileWebhooks.updateWebhookEndpoint(\n  {\n    path: {\n      id: 'we_123456789',\n    },\n    body: {\n      trigger_events: ['account.add'],\n    },\n  }\n);"},{"name":"Update webhook endpoint","language":"python","install":"pip install git+https://github.com/unipile/unipile-python.git","code":"import unipile\n\nACCOUNT_ID = \"acc_123456789\"\n\nconfiguration = unipile.Configuration()\nconfiguration.api_key[\"apiKey\"] = \"YOUR_API_KEY\"\n\nwith unipile.ApiClient(configuration) as api_client:\n    webhooks_api = unipile.WebhooksApi(api_client)\n\nresponse = webhooks_api.update_webhook_endpoint(\n    'we_123456789',\n    {\n    'trigger_events': ['account.add'],\n  }\n)"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","required":["enabled","description","url","trigger_events","secret","object","id","application_id","account_ids","account_targets"],"properties":{"enabled":{"type":"boolean"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"url":{"type":"string"},"trigger_events":{"type":"array","items":{"type":"string","enum":["account.status.disconnected","account.status.running","account.status.errored","account.status.degraded","account.status.partial","account.locked","account.unlocked","account.add","account.reconnect","account.remove","account.initial_sync.running","account.initial_sync.failed","account.initial_sync.completed","message.new","message.update","message.delete","message.receipt.read","message.receipt.delivery","message.reaction.new","message.reaction.delete","chat.delete","chat.update","email.new","email.new.bounce","email.update","email.delete","email.draft.new","email.draft.delete","email.folder.create","email.folder.update","email.folder.delete","calendar.create","calendar.update","calendar.delete","calendar.event.new","calendar.event.update","calendar.event.delete","tracking.open","tracking.click","relation.new","follower.new","blocked.new"]}},"secret":{"maxLength":36,"type":"string"},"object":{"type":"string","enum":["WebhookEndpoint"]},"id":{"type":"string","pattern":"^we_(.*)$"},"application_id":{"type":"string","pattern":"^app_(.*)$"},"account_ids":{"type":"array","items":{"type":"string","pattern":"^acc_(.*)$"}},"account_targets":{"type":"array","items":{"type":"object","required":["account_name","account_provider","object","id","status"],"properties":{"account_name":{"anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}]},"account_provider":{"description":"The provider's of the Account.\n    - `mock` is mock.\n    - `whatsapp` is WhatsApp.\n    - `linkedin` is LinkedIn.\n    - `instagram` is Instagram.\n    - `facebook` is Facebook.\n    - `google` is Google.\n    - `outlook` is Outlook.\n    - `telegram` is Telegram.\n    - `imap` is IMAP.","type":"string","enum":["mock","whatsapp","linkedin","google","outlook","imap","telegram","instagram","facebook"]},"object":{"type":"string","enum":["WebhookEndpointAccountTarget"]},"id":{"type":"string","pattern":"^acc_(.*)$"},"status":{"type":"string","enum":["active","deleted"]}}}}}}}}}}},"delete":{"operationId":"deleteWebhookEndpoint","summary":"Delete a Webhook Endpoint","tags":["Webhooks"],"description":"Deletes a webhook endpoint by ID.","parameters":[{"schema":{"type":"string","pattern":"^we_(.*)$"},"in":"path","name":"id","required":true,"description":"The ID of the Webhook Endpoint to delete."}],"x-samples-languages":["node","python","curl"],"x-code-samples":[{"name":"Delete webhook endpoint","language":"node","install":"npm install unipile","code":"import { UnipileWebhooks } from 'unipile';\n\nconst ACCOUNT_ID = 'acc_123456789';\n\nconst unipileWebhooks = new UnipileWebhooks({ key: 'YOUR_API_KEY' });\n\nconst { data } = await unipileWebhooks.deleteWebhookEndpoint(\n  {\n    path: {\n      id: 'we_123456789',\n    },\n  }\n);"},{"name":"Delete webhook endpoint","language":"python","install":"pip install git+https://github.com/unipile/unipile-python.git","code":"import unipile\n\nACCOUNT_ID = \"acc_123456789\"\n\nconfiguration = unipile.Configuration()\nconfiguration.api_key[\"apiKey\"] = \"YOUR_API_KEY\"\n\nwith unipile.ApiClient(configuration) as api_client:\n    webhooks_api = unipile.WebhooksApi(api_client)\n\nresponse = webhooks_api.delete_webhook_endpoint(\n    'we_123456789'\n)"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","required":["success"],"properties":{"success":{"type":"boolean"}}}}}}}},"get":{"operationId":"getWebhookEndpoint","summary":"Get a Webhook Endpoint","tags":["Webhooks"],"description":"Retrieves a webhook endpoint by ID.","parameters":[{"schema":{"type":"string","pattern":"^we_(.*)$"},"in":"path","name":"id","required":true,"description":"The ID of the Webhook Endpoint to retrieve."}],"x-samples-languages":["node","python","curl"],"x-code-samples":[{"name":"Get webhook endpoint","language":"node","install":"npm install unipile","code":"import { UnipileWebhooks } from 'unipile';\n\nconst ACCOUNT_ID = 'acc_123456789';\n\nconst unipileWebhooks = new UnipileWebhooks({ key: 'YOUR_API_KEY' });\n\nconst { data } = await unipileWebhooks.getWebhookEndpoint(\n  {\n    path: {\n      id: 'we_123456789',\n    },\n  }\n);"},{"name":"Get webhook endpoint","language":"python","install":"pip install git+https://github.com/unipile/unipile-python.git","code":"import unipile\n\nACCOUNT_ID = \"acc_123456789\"\n\nconfiguration = unipile.Configuration()\nconfiguration.api_key[\"apiKey\"] = \"YOUR_API_KEY\"\n\nwith unipile.ApiClient(configuration) as api_client:\n    webhooks_api = unipile.WebhooksApi(api_client)\n\nresponse = webhooks_api.get_webhook_endpoint(\n    'we_123456789'\n)"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","required":["enabled","description","url","trigger_events","secret","object","id","application_id","account_ids","account_targets"],"properties":{"enabled":{"type":"boolean"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"url":{"type":"string"},"trigger_events":{"type":"array","items":{"type":"string","enum":["account.status.disconnected","account.status.running","account.status.errored","account.status.degraded","account.status.partial","account.locked","account.unlocked","account.add","account.reconnect","account.remove","account.initial_sync.running","account.initial_sync.failed","account.initial_sync.completed","message.new","message.update","message.delete","message.receipt.read","message.receipt.delivery","message.reaction.new","message.reaction.delete","chat.delete","chat.update","email.new","email.new.bounce","email.update","email.delete","email.draft.new","email.draft.delete","email.folder.create","email.folder.update","email.folder.delete","calendar.create","calendar.update","calendar.delete","calendar.event.new","calendar.event.update","calendar.event.delete","tracking.open","tracking.click","relation.new","follower.new","blocked.new"]}},"secret":{"maxLength":36,"type":"string"},"object":{"type":"string","enum":["WebhookEndpoint"]},"id":{"type":"string","pattern":"^we_(.*)$"},"application_id":{"type":"string","pattern":"^app_(.*)$"},"account_ids":{"type":"array","items":{"type":"string","pattern":"^acc_(.*)$"}},"account_targets":{"type":"array","items":{"type":"object","required":["account_name","account_provider","object","id","status"],"properties":{"account_name":{"anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}]},"account_provider":{"description":"The provider's of the Account.\n    - `mock` is mock.\n    - `whatsapp` is WhatsApp.\n    - `linkedin` is LinkedIn.\n    - `instagram` is Instagram.\n    - `facebook` is Facebook.\n    - `google` is Google.\n    - `outlook` is Outlook.\n    - `telegram` is Telegram.\n    - `imap` is IMAP.","type":"string","enum":["mock","whatsapp","linkedin","google","outlook","imap","telegram","instagram","facebook"]},"object":{"type":"string","enum":["WebhookEndpointAccountTarget"]},"id":{"type":"string","pattern":"^acc_(.*)$"},"status":{"type":"string","enum":["active","deleted"]}}}}}}}}}}}},"/v2/webhooks/events/{id}/replay":{"post":{"operationId":"replayWebhookEvent","summary":"Replay a Webhook Event","tags":["Webhooks"],"description":"Queues a new delivery of a stored event to all currently enabled endpoints listening to this event and matching its account, even after successful delivery. Uses the original event ID and payload, with the current endpoint URL and secret. An optional endpoint_id targets one original endpoint. Deliveries use the normal automatic retries and appear in webhook conversations. Returns 202 when queued; delivery happens asynchronously.","parameters":[{"schema":{"type":"string","pattern":"^we_(.*)$"},"in":"query","name":"endpoint_id","required":false,"description":"Replay only to this original endpoint. Omit to replay to all currently enabled endpoints listening to this event and matching its account."},{"schema":{"type":"string","pattern":"^evt_(.*)$"},"in":"path","name":"id","required":true}],"responses":{"202":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","required":["object","event_id","endpoint_ids"],"properties":{"object":{"type":"string","enum":["EventReplay"]},"event_id":{"type":"string","pattern":"^evt_(.*)$"},"endpoint_ids":{"type":"array","items":{"type":"string","pattern":"^we_(.*)$"}}}}}}}}}}},"tags":[{"name":"Accounts","description":"Accounts management"},{"name":"Webhooks","description":"Webhooks management"},{"name":"Hosted Auth","description":"Hosted account authentication"},{"name":"Custom Auth","description":"Custom account authentication"}]}