openapi: 3.1.0 info: title: Unbounce REST Accounts Leads 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: Leads description: Lead submissions captured by pages paths: /pages/{page_id}/leads: get: tags: - Leads summary: List leads for a page operationId: listLeadsForPage parameters: - $ref: '#/components/parameters/PageId' responses: '200': description: Lead collection content: application/json: schema: type: object properties: leads: type: array items: $ref: '#/components/schemas/Lead' /pages/{page_id}/leads/{lead_id}: get: tags: - Leads summary: Retrieve a lead from a page operationId: getLeadForPage parameters: - $ref: '#/components/parameters/PageId' - $ref: '#/components/parameters/LeadId' responses: '200': description: Lead content: application/json: schema: $ref: '#/components/schemas/Lead' /pages/{page_id}/lead_deletion_request: get: tags: - Leads summary: List lead deletion requests for a page operationId: listLeadDeletionRequests parameters: - $ref: '#/components/parameters/PageId' responses: '200': description: Lead deletion request collection content: application/json: schema: type: object properties: lead_deletion_requests: type: array items: $ref: '#/components/schemas/LeadDeletionRequest' /pages/{page_id}/lead_deletion_request/{lead_deletion_request_id}: get: tags: - Leads summary: Retrieve a single lead deletion request operationId: getLeadDeletionRequest parameters: - $ref: '#/components/parameters/PageId' - name: lead_deletion_request_id in: path required: true schema: type: string responses: '200': description: Lead deletion request content: application/json: schema: $ref: '#/components/schemas/LeadDeletionRequest' /leads/{lead_id}: get: tags: - Leads summary: Retrieve a lead operationId: getLead parameters: - $ref: '#/components/parameters/LeadId' responses: '200': description: Lead content: application/json: schema: $ref: '#/components/schemas/Lead' components: schemas: LeadDeletionRequest: type: object properties: id: type: string state: type: string requested_at: type: string format: date-time Lead: type: object properties: id: type: string page_id: type: string form_data: type: object additionalProperties: true created_at: type: string format: date-time parameters: LeadId: name: lead_id in: path required: true schema: type: string PageId: name: page_id in: path required: true schema: type: string 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