Paid customer-portals API

The customer-portals API from Paid — 1 operation(s) for customer-portals.

OpenAPI Specification

paid-customer-portals-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: API Reference agents customer-portals API
  version: 1.0.0
servers:
- url: https://api.agentpaid.io/api/v1
  description: Production
tags:
- name: customer-portals
paths:
  /customer-portals/:
    post:
      operationId: create-customer-portal
      summary: Create a customer portal session
      description: Creates a portal session for the customer. Returns a short-lived URL to the customer portal.
      tags:
      - customer-portals
      parameters:
      - name: Authorization
        in: header
        description: API Key authentication using Bearer token
        required: true
        schema:
          type: string
      responses:
        '201':
          description: '201'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerPortal'
        '400':
          description: '400'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: '403'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: '404'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: '500'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      requestBody:
        description: Body
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateCustomerPortalRequest'
components:
  schemas:
    CreateCustomerPortalRequest:
      type: object
      properties:
        customerId:
          type: string
          description: The Paid customer ID (display ID or UUID). Either this or externalCustomerId must be provided.
        externalCustomerId:
          type: string
          description: Your external customer ID. Either this or customerId must be provided.
        returnUrl:
          type: string
          format: uri
        expiresAt:
          type: string
          format: date-time
      title: CreateCustomerPortalRequest
    CustomerPortalStatus:
      type: string
      enum:
      - active
      - expired
      title: CustomerPortalStatus
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
        code:
          type: string
        details:
          type: string
      required:
      - error
      title: ErrorResponse
    CustomerPortal:
      type: object
      properties:
        id:
          type: string
        customerId:
          type: string
        url:
          type: string
        status:
          $ref: '#/components/schemas/CustomerPortalStatus'
        returnUrl:
          type:
          - string
          - 'null'
        expiresAt:
          type: string
          format: date-time
        createdAt:
          type: string
          format: date-time
      required:
      - id
      - customerId
      - url
      - status
      - returnUrl
      - expiresAt
      - createdAt
      title: CustomerPortal
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer