openapi: 3.1.0 info: title: Unbounce REST Accounts API version: 0.4.0 summary: Programmatic access to Unbounce accounts, pages, leads, and domains. description: 'The Unbounce REST API provides programmatic access to accounts, sub-accounts, domains, pages, page groups, and leads. Authentication uses an API key (available to all Unbounce pricing plans) or OAuth 2.0 Authorization Code flow (granted case-by-case). Clients send a custom Accept header indicating the API version. Endpoint surface and authentication confirmed against https://developer.unbounce.com/api_reference/. ' contact: name: Unbounce Developers url: https://developer.unbounce.com/ license: name: Proprietary url: https://unbounce.com/legal servers: - url: https://api.unbounce.com description: Unbounce REST API security: - apiKeyAuth: [] - oauth2: [] tags: - name: Accounts description: Account and sub-account resources paths: /accounts: get: tags: - Accounts summary: List accounts operationId: listAccounts responses: '200': description: Account collection content: application/json: schema: $ref: '#/components/schemas/AccountCollection' '401': $ref: '#/components/responses/Unauthorized' /accounts/{account_id}: get: tags: - Accounts summary: Retrieve a single account operationId: getAccount parameters: - $ref: '#/components/parameters/AccountId' responses: '200': description: Account content: application/json: schema: $ref: '#/components/schemas/Account' '404': $ref: '#/components/responses/NotFound' /accounts/{account_id}/sub_accounts: get: tags: - Accounts summary: List sub-accounts for an account operationId: listSubAccountsForAccount parameters: - $ref: '#/components/parameters/AccountId' responses: '200': description: Sub-account collection content: application/json: schema: type: object properties: sub_accounts: type: array items: $ref: '#/components/schemas/SubAccount' /sub_accounts/{sub_account_id}: get: tags: - Accounts summary: Retrieve a sub-account operationId: getSubAccount parameters: - $ref: '#/components/parameters/SubAccountId' responses: '200': description: Sub-account content: application/json: schema: $ref: '#/components/schemas/SubAccount' components: schemas: Error: type: object properties: code: type: string message: type: string SubAccount: type: object properties: id: type: string name: type: string account_id: type: string Account: type: object properties: id: type: string name: type: string created_at: type: string format: date-time AccountCollection: type: object properties: accounts: type: array items: $ref: '#/components/schemas/Account' parameters: AccountId: name: account_id in: path required: true schema: type: string SubAccountId: name: sub_account_id in: path required: true schema: type: string responses: Unauthorized: description: Authentication failed content: application/json: schema: $ref: '#/components/schemas/Error' NotFound: description: Resource not found content: application/json: schema: $ref: '#/components/schemas/Error' securitySchemes: apiKeyAuth: type: http scheme: basic description: HTTP Basic auth using the Unbounce API key as the username. oauth2: type: oauth2 description: OAuth 2.0 Authorization Code (granted case-by-case by Unbounce). flows: authorizationCode: authorizationUrl: https://api.unbounce.com/oauth/authorize tokenUrl: https://api.unbounce.com/oauth/token scopes: read: Read access to account resources write: Write access to account resources