openapi: 3.0.3
info:
  title: Proxy Public API
  version: 1.0.0
  description: Reference for the customer-facing HTTP API. Request and response examples
    use synthetic values but follow the payloads returned by the service. Authenticate
    customer requests with a JWT or API key in the Authorization header.
paths:
  /affiliates:
    get:
      operationId: affiliates_list
      description: Returns customers attributed to the authenticated affiliate together
        with the referral information available to that account.
      summary: List referred customers
      parameters:
      - name: limit
        required: false
        in: query
        description: Number of results to return per page.
        schema:
          type: integer
      - name: offset
        required: false
        in: query
        description: The initial index from which to return the results.
        schema:
          type: integer
      tags:
      - Affiliates
      security:
      - BearerAuth: []
      - StaticAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedAffiliateList'
              examples:
                example:
                  summary: Example response
                  value:
                    count: 1
                    next: null
                    previous: null
                    results:
                    - id: 550e8400-e29b-41d4-a716-446655440001
                      email: developer@example.com
                      signup_ip: 198.51.100.25
                      signup_country: us
                      date_joined: '2026-07-01T12:30:00Z'
          description: The operation completed successfully.
        '401':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                AuthenticationRequired:
                  value:
                    detail: Authentication credentials were not provided.
                  summary: Authentication required
          description: Authentication credentials are missing, expired, or invalid.
        '403':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                PermissionDenied:
                  value:
                    detail: You do not have permission to perform this action.
                  summary: Permission denied
          description: The authenticated account cannot perform this operation.
        '400':
          description: The request is malformed or violates a business rule.
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                example:
                  summary: Validation error
                  value:
                    non_field_errors:
                    - The request could not be processed.
                    translation: errors.request.invalid
  /affiliates/rewards:
    get:
      operationId: affiliates_rewards_list
      description: Returns individual reward entries generated by customers attributed
        to the authenticated marketer.
      summary: List affiliate reward entries
      parameters:
      - name: limit
        required: false
        in: query
        description: Number of results to return per page.
        schema:
          type: integer
      - name: offset
        required: false
        in: query
        description: The initial index from which to return the results.
        schema:
          type: integer
      tags:
      - Affiliates
      security:
      - BearerAuth: []
      - StaticAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedAffiliateRewardList'
              examples:
                example:
                  summary: Example response
                  value:
                    count: 1
                    next: null
                    previous: null
                    results:
                    - id: 550e8400-e29b-41d4-a716-446655440001
                      email: developer@example.com
                      status: pending
                      package:
                        id: 550e8400-e29b-41d4-a716-446655440001
                        name: Residential 10 GB
                        alias: residential-10gb
                        is_unlimited_data: true
                        targeting_options:
                          package: package
                          split_char: '-'
                          value_char: '-'
                          continent: continent
                          country: us
                          region: california
                          city: los_angeles
                          asn: '15169'
                          isp: comcast
                          username: developer
                          pool: residential
                          location: location
                          location_format: location format
                          session: session
                          session_mode_tag: session mode tag
                          session_ttl: session ttl
                          session_ttl_format: 1
                          os: os
                          os_combined: true
                          os_split_char: os split char
                          os_linux: os linux
                          os_windows: os windows
                          os_ios: os ios
                          os_macos: os macos
                          os_android: os android
                      price_total: 1
                      data: 1073741824
                      commission_amount: 1
                      created: '2026-07-01T12:30:00Z'
          description: The operation completed successfully.
        '401':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                AuthenticationRequired:
                  value:
                    detail: Authentication credentials were not provided.
                  summary: Authentication required
          description: Authentication credentials are missing, expired, or invalid.
        '403':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                PermissionDenied:
                  value:
                    detail: You do not have permission to perform this action.
                  summary: Permission denied
          description: The authenticated account cannot perform this operation.
        '400':
          description: The request is malformed or violates a business rule.
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                example:
                  summary: Validation error
                  value:
                    non_field_errors:
                    - The request could not be processed.
                    translation: errors.request.invalid
  /affiliates/rewards/overall:
    get:
      operationId: affiliates_rewards_overall_retrieve
      description: Returns affiliate reward totals for the requested date range. start,
        end, and timezone use the same rules as analytics endpoints.
      summary: Get affiliate earnings over time
      tags:
      - Affiliates
      security:
      - BearerAuth: []
      - StaticAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AffiliateStatsResponse'
              examples:
                AffiliateTotals:
                  value:
                    results:
                    - date: '2026-07-01'
                      balance: 42.5
                      data: 1073741824
                      count: 3
                  summary: Affiliate totals
          description: The operation completed successfully.
        '400':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                ValidationError:
                  value:
                    non_field_errors:
                    - The request could not be processed.
                    translation: errors.request.invalid
                  summary: Validation error
          description: The request is malformed or violates a business rule.
        '401':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                AuthenticationRequired:
                  value:
                    detail: Authentication credentials were not provided.
                  summary: Authentication required
          description: Authentication credentials are missing, expired, or invalid.
        '403':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                PermissionDenied:
                  value:
                    detail: You do not have permission to perform this action.
                  summary: Permission denied
          description: The authenticated account cannot perform this operation.
  /analytics/{id}/transactions:
    get:
      operationId: analytics_transactions_retrieve
      description: Returns data allocation and consumption transactions visible to
        the caller. Sender and recipient filters are restricted to the caller's scope.
      summary: List data transactions
      parameters:
      - in: query
        name: end
        schema:
          type: string
          format: date-time
        description: Exclusive end of the reporting window.
        examples:
          EndTime:
            value: '2026-07-02T00:00:00Z'
            summary: End time
      - in: path
        name: id
        schema:
          type: string
        description: Route identifier for this analytics action. Use query parameters
          to filter transactions.
        required: true
      - in: query
        name: limit
        schema:
          type: integer
        description: Maximum records returned on this page.
      - in: query
        name: offset
        schema:
          type: integer
        description: Zero-based number of matching records to skip.
      - in: query
        name: recipient_id
        schema:
          type: string
          format: uuid
        description: Restrict transactions to this recipient account.
      - in: query
        name: sender_id
        schema:
          type: string
          format: uuid
        description: Restrict transactions to this sender account.
      - in: query
        name: start
        schema:
          type: string
          format: date-time
        description: Inclusive start of the reporting window. Defaults to a recent
          window.
        examples:
          StartTime:
            value: '2026-07-01T00:00:00Z'
            summary: Start time
      - in: query
        name: timezone
        schema:
          type: string
        description: IANA timezone used for bucket boundaries. Defaults to UTC.
        examples:
          UTC:
            value: UTC
      - in: query
        name: type
        schema:
          type: integer
        description: Transaction type identifier. Defaults to data transactions.
      tags:
      - Analytics
      security:
      - BearerAuth: []
      - StaticAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TransactionsResponse'
              examples:
                DataTransactions:
                  value:
                    count: 1
                    next: null
                    previous: null
                    timezone: UTC
                    start: '2026-07-01T00:00:00Z'
                    end: '2026-07-02T00:00:00Z'
                    results:
                    - sender_uuid: 550e8400-e29b-41d4-a716-446655440001
                      recipient_uuid: null
                      type: 1
                      amount: 1073741824
                      package_uuid: 550e8400-e29b-41d4-a716-446655440002
                      details: Data used by active proxy sessions
                      date: '2026-07-01T00:00:00Z'
                      timestamp: '2026-07-01T12:30:00Z'
                  summary: Data transactions
          description: The operation completed successfully.
        '400':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                ValidationError:
                  value:
                    non_field_errors:
                    - The request could not be processed.
                    translation: errors.request.invalid
                  summary: Validation error
          description: The request is malformed or violates a business rule.
        '401':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                AuthenticationRequired:
                  value:
                    detail: Authentication credentials were not provided.
                  summary: Authentication required
          description: Authentication credentials are missing, expired, or invalid.
        '403':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                PermissionDenied:
                  value:
                    detail: You do not have permission to perform this action.
                  summary: Permission denied
          description: The authenticated account cannot perform this operation.
        '500':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                InternalServiceError:
                  value:
                    non_field_errors:
                    - Internal server error.
                  summary: Internal service error
          description: The service could not complete the operation.
        '404':
          description: The requested resource does not exist in the current account
            scope.
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                example:
                  summary: Resource not found
                  value:
                    detail: Not found.
  /analytics/connections:
    get:
      operationId: analytics_connections_retrieve
      description: Returns a paginated snapshot of active connections for the selected
        user and package scope.
      summary: List active proxy connections
      parameters:
      - in: query
        name: limit
        schema:
          type: integer
        description: Maximum records returned on this page.
      - in: query
        name: offset
        schema:
          type: integer
        description: Zero-based number of matching records to skip.
      - in: query
        name: package_id
        schema:
          type: string
          format: uuid
        description: Restrict results to one purchased package.
        examples:
          Package:
            value: 550e8400-e29b-41d4-a716-446655440002
      - in: query
        name: user_id
        schema:
          type: string
          format: uuid
        description: Restrict results to the current account or an accessible sub-user.
        examples:
          User:
            value: 550e8400-e29b-41d4-a716-446655440001
      tags:
      - Analytics
      security:
      - BearerAuth: []
      - StaticAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConnectionsResponse'
              examples:
                ActiveConnections:
                  value:
                    count: 1
                    next: null
                    previous: null
                    results:
                    - user_id: 550e8400-e29b-41d4-a716-446655440001
                      package_id: 550e8400-e29b-41d4-a716-446655440002
                      connections: 12
                      server_ip: 203.0.113.10
                  summary: Active connections
          description: The operation completed successfully.
        '400':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                ValidationError:
                  value:
                    non_field_errors:
                    - The request could not be processed.
                    translation: errors.request.invalid
                  summary: Validation error
          description: The request is malformed or violates a business rule.
        '401':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                AuthenticationRequired:
                  value:
                    detail: Authentication credentials were not provided.
                  summary: Authentication required
          description: Authentication credentials are missing, expired, or invalid.
        '403':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                PermissionDenied:
                  value:
                    detail: You do not have permission to perform this action.
                  summary: Permission denied
          description: The authenticated account cannot perform this operation.
        '500':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                InternalServiceError:
                  value:
                    non_field_errors:
                    - Internal server error.
                  summary: Internal service error
          description: The service could not complete the operation.
  /analytics/domains:
    get:
      operationId: analytics_domains_retrieve
      description: Aggregates request count and transferred bytes by destination hostname
        for the selected reporting window and account scope.
      summary: List top destination domains
      parameters:
      - in: query
        name: end
        schema:
          type: string
          format: date-time
        description: Exclusive end of the reporting window.
        examples:
          EndTime:
            value: '2026-07-02T00:00:00Z'
            summary: End time
      - in: query
        name: hostname
        schema:
          type: string
        description: Comma-separated hostnames to include.
        examples:
          Hostnames:
            value: example.com,api.example.com
      - in: query
        name: ledger_id
        schema:
          type: string
          format: uuid
        description: Restrict results to one data ledger when supported.
        examples:
          Ledger:
            value: 550e8400-e29b-41d4-a716-446655440005
      - in: query
        name: limit
        schema:
          type: integer
        description: Maximum records returned on this page.
      - in: query
        name: offset
        schema:
          type: integer
        description: Zero-based number of matching records to skip.
      - in: query
        name: package_id
        schema:
          type: string
          format: uuid
        description: Restrict results to one purchased package.
        examples:
          Package:
            value: 550e8400-e29b-41d4-a716-446655440002
      - in: query
        name: start
        schema:
          type: string
          format: date-time
        description: Inclusive start of the reporting window. Defaults to a recent
          window.
        examples:
          StartTime:
            value: '2026-07-01T00:00:00Z'
            summary: Start time
      - in: query
        name: timezone
        schema:
          type: string
        description: IANA timezone used for bucket boundaries. Defaults to UTC.
        examples:
          UTC:
            value: UTC
      - in: query
        name: user_id
        schema:
          type: string
          format: uuid
        description: Restrict results to the current account or an accessible sub-user.
        examples:
          User:
            value: 550e8400-e29b-41d4-a716-446655440001
      tags:
      - Analytics
      security:
      - BearerAuth: []
      - StaticAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DomainsResponse'
              examples:
                TopDomains:
                  value:
                    count: 1
                    next: null
                    previous: null
                    timezone: UTC
                    start: '2026-07-01T00:00:00Z'
                    end: '2026-07-02T00:00:00Z'
                    results:
                    - hostname: example.com
                      requests: 1240
                      data: 73400320
                  summary: Top domains
          description: The operation completed successfully.
        '400':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                ValidationError:
                  value:
                    non_field_errors:
                    - The request could not be processed.
                    translation: errors.request.invalid
                  summary: Validation error
          description: The request is malformed or violates a business rule.
        '401':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                AuthenticationRequired:
                  value:
                    detail: Authentication credentials were not provided.
                  summary: Authentication required
          description: Authentication credentials are missing, expired, or invalid.
        '403':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                PermissionDenied:
                  value:
                    detail: You do not have permission to perform this action.
                  summary: Permission denied
          description: The authenticated account cannot perform this operation.
        '500':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                InternalServiceError:
                  value:
                    non_field_errors:
                    - Internal server error.
                  summary: Internal service error
          description: The service could not complete the operation.
  /analytics/feed:
    get:
      operationId: analytics_feed_retrieve
      description: Returns recent proxy requests with traffic, endpoint, location,
        protocol, package, and sticky-session details.
      summary: List proxy request activity
      parameters:
      - in: query
        name: city
        schema:
          type: string
        description: Normalized city targeting code. country and region are required.
        examples:
          LosAngeles:
            value: los_angeles
            summary: Los Angeles
      - in: query
        name: country
        schema:
          type: string
        description: Lowercase ISO 3166-1 alpha-2 country code.
        examples:
          UnitedStates:
            value: us
            summary: United States
      - in: query
        name: end
        schema:
          type: string
          format: date-time
        description: Exclusive end of the reporting window.
        examples:
          EndTime:
            value: '2026-07-02T00:00:00Z'
            summary: End time
      - in: query
        name: hostname
        schema:
          type: string
        description: Comma-separated hostnames to include.
        examples:
          Hostnames:
            value: example.com,api.example.com
      - in: query
        name: ledger_id
        schema:
          type: string
          format: uuid
        description: Restrict results to one data ledger when supported.
        examples:
          Ledger:
            value: 550e8400-e29b-41d4-a716-446655440005
      - in: query
        name: limit
        schema:
          type: integer
        description: Maximum records returned on this page.
      - in: query
        name: offset
        schema:
          type: integer
        description: Zero-based number of matching records to skip.
      - in: query
        name: package_id
        schema:
          type: string
          format: uuid
        description: Restrict results to one purchased package.
        examples:
          Package:
            value: 550e8400-e29b-41d4-a716-446655440002
      - in: query
        name: protocol
        schema:
          type: string
          enum:
          - http
          - socks5
        description: 'Proxy protocol: http or socks5.'
      - in: query
        name: region
        schema:
          type: string
        description: Normalized region targeting code. country is required.
        examples:
          California:
            value: california
      - in: query
        name: start
        schema:
          type: string
          format: date-time
        description: Inclusive start of the reporting window. Defaults to a recent
          window.
        examples:
          StartTime:
            value: '2026-07-01T00:00:00Z'
            summary: Start time
      - in: query
        name: timezone
        schema:
          type: string
        description: IANA timezone used for bucket boundaries. Defaults to UTC.
        examples:
          UTC:
            value: UTC
      - in: query
        name: user_id
        schema:
          type: string
          format: uuid
        description: Restrict results to the current account or an accessible sub-user.
        examples:
          User:
            value: 550e8400-e29b-41d4-a716-446655440001
      tags:
      - Analytics
      security:
      - BearerAuth: []
      - StaticAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FeedResponse'
              examples:
                ProxyActivity:
                  value:
                    count: 42
                    next: https://api.proxyrequest.com/api/v1/analytics/feed?limit=1&offset=1
                    previous: null
                    timezone: UTC
                    start: '2026-07-01T00:00:00Z'
                    end: '2026-07-02T00:00:00Z'
                    results:
                    - id: 987654
                      established_connections: 2
                      reseller_id: ''
                      user_id: 550e8400-e29b-41d4-a716-446655440001
                      package_id: 550e8400-e29b-41d4-a716-446655440002
                      ledger_id: 550e8400-e29b-41d4-a716-446655440005
                      username: developer
                      user_ip: 198.51.100.25
                      server_ip: 203.0.113.10
                      data: 1048576
                      hostname: example.com
                      protocol: http
                      method: GET
                      pool: residential
                      is_session: true
                      country: us
                      region: california
                      city: los_angeles
                      asn: '15169'
                      timestamp: '2026-07-01T12:30:00Z'
                  summary: Proxy activity
          description: The operation completed successfully.
        '400':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                ValidationError:
                  value:
                    non_field_errors:
                    - The request could not be processed.
                    translation: errors.request.invalid
                  summary: Validation error
          description: The request is malformed or violates a business rule.
        '401':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                AuthenticationRequired:
                  value:
                    detail: Authentication credentials were not provided.
                  summary: Authentication required
          description: Authentication credentials are missing, expired, or invalid.
        '403':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                PermissionDenied:
                  value:
                    detail: You do not have permission to perform this action.
                  summary: Permission denied
          description: The authenticated account cannot perform this operation.
        '500':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                InternalServiceError:
                  value:
                    non_field_errors:
                    - Internal server error.
                  summary: Internal service error
          description: The service could not complete the operation.
  /analytics/logs:
    get:
      operationId: analytics_logs_retrieve
      description: Returns request-level proxy errors with server, client, targeting,
        package, and error-code context.
      summary: List proxy error logs
      parameters:
      - in: query
        name: city
        schema:
          type: string
        description: Normalized city targeting code. country and region are required.
        examples:
          LosAngeles:
            value: los_angeles
            summary: Los Angeles
      - in: query
        name: country
        schema:
          type: string
        description: Lowercase ISO 3166-1 alpha-2 country code.
        examples:
          UnitedStates:
            value: us
            summary: United States
      - in: query
        name: end
        schema:
          type: string
          format: date-time
        description: Exclusive end of the reporting window.
        examples:
          EndTime:
            value: '2026-07-02T00:00:00Z'
            summary: End time
      - in: query
        name: error_code
        schema:
          type: integer
        description: Restrict results to one non-negative proxy error code.
      - in: query
        name: hostname
        schema:
          type: string
        description: Comma-separated hostnames to include.
        examples:
          Hostnames:
            value: example.com,api.example.com
      - in: query
        name: ledger_id
        schema:
          type: string
          format: uuid
        description: Restrict results to one data ledger when supported.
        examples:
          Ledger:
            value: 550e8400-e29b-41d4-a716-446655440005
      - in: query
        name: limit
        schema:
          type: integer
        description: Maximum records returned on this page.
      - in: query
        name: offset
        schema:
          type: integer
        description: Zero-based number of matching records to skip.
      - in: query
        name: package_id
        schema:
          type: string
          format: uuid
        description: Restrict results to one purchased package.
        examples:
          Package:
            value: 550e8400-e29b-41d4-a716-446655440002
      - in: query
        name: protocol
        schema:
          type: string
          enum:
          - http
          - socks5
        description: 'Proxy protocol: http or socks5.'
      - in: query
        name: region
        schema:
          type: string
        description: Normalized region targeting code. country is required.
        examples:
          California:
            value: california
      - in: query
        name: start
        schema:
          type: string
          format: date-time
        description: Inclusive start of the reporting window. Defaults to a recent
          window.
        examples:
          StartTime:
            value: '2026-07-01T00:00:00Z'
            summary: Start time
      - in: query
        name: timezone
        schema:
          type: string
        description: IANA timezone used for bucket boundaries. Defaults to UTC.
        examples:
          UTC:
            value: UTC
      - in: query
        name: user_id
        schema:
          type: string
          format: uuid
        description: Restrict results to the current account or an accessible sub-user.
        examples:
          User:
            value: 550e8400-e29b-41d4-a716-446655440001
      tags:
      - Analytics
      security:
      - BearerAuth: []
      - StaticAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LogsResponse'
              examples:
                ProxyErrors:
                  value:
                    count: 1
                    next: null
                    previous: null
                    timezone: UTC
                    start: '2026-07-01T00:00:00Z'
                    end: '2026-07-02T00:00:00Z'
                    results:
                    - id: 987654
                      server_ip: 203.0.113.10
                      user_ip: 198.51.100.25
                      protocol: http
                      method: GET
                      user_id: 550e8400-e29b-41d4-a716-446655440001
                      reseller_id: ''
                      username: developer
                      hostname: example.com
                      status_code: 407
                      error_code: 1001
                      error_message: Proxy authentication failed
                      country: us
                      region: california
                      city: los_angeles
                      asn: '15169'
                      level: warning
                      is_session: false
                      timestamp: '2026-07-01T12:30:00Z'
                      package_id: 550e8400-e29b-41d4-a716-446655440002
                      package_alias: residential-us
                      ledger_id: 550e8400-e29b-41d4-a716-446655440005
                  summary: Proxy errors
          description: The operation completed successfully.
        '400':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                ValidationError:
                  value:
                    non_field_errors:
                    - The request could not be processed.
                    translation: errors.request.invalid
                  summary: Validation error
          description: The request is malformed or violates a business rule.
        '401':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                AuthenticationRequired:
                  value:
                    detail: Authentication credentials were not provided.
                  summary: Authentication required
          description: Authentication credentials are missing, expired, or invalid.
        '403':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                PermissionDenied:
                  value:
                    detail: You do not have permission to perform this action.
                  summary: Permission denied
          description: The authenticated account cannot perform this operation.
        '500':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                InternalServiceError:
                  value:
                    non_field_errors:
                    - Internal server error.
                  summary: Internal service error
          description: The service could not complete the operation.
  /analytics/overall:
    get:
      operationId: analytics_overall_retrieve
      description: Returns transferred bytes and request counts grouped into time
        buckets for charts and usage reporting.
      summary: Get traffic totals over time
      parameters:
      - in: query
        name: end
        schema:
          type: string
          format: date-time
        description: Exclusive end of the reporting window.
        examples:
          EndTime:
            value: '2026-07-02T00:00:00Z'
            summary: End time
      - in: query
        name: limit
        schema:
          type: integer
        description: Maximum records returned on this page.
      - in: query
        name: offset
        schema:
          type: integer
        description: Zero-based number of matching records to skip.
      - in: query
        name: package_id
        schema:
          type: string
          format: uuid
        description: Restrict results to one purchased package.
        examples:
          Package:
            value: 550e8400-e29b-41d4-a716-446655440002
      - in: query
        name: start
        schema:
          type: string
          format: date-time
        description: Inclusive start of the reporting window. Defaults to a recent
          window.
        examples:
          StartTime:
            value: '2026-07-01T00:00:00Z'
            summary: Start time
      - in: query
        name: timezone
        schema:
          type: string
        description: IANA timezone used for bucket boundaries. Defaults to UTC.
        examples:
          UTC:
            value: UTC
      - in: query
        name: user_id
        schema:
          type: string
          format: uuid
        description: Restrict results to the current account or an accessible sub-user.
        examples:
          User:
            value: 550e8400-e29b-41d4-a716-446655440001
      tags:
      - Analytics
      security:
      - BearerAuth: []
      - StaticAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OverallResponse'
              examples:
                TrafficOverview:
                  value:
                    count: 1
                    next: null
                    previous: null
                    timezone: UTC
                    start: '2026-07-01T00:00:00Z'
                    end: '2026-07-02T00:00:00Z'
                    results:
                    - data: 73400320
                      requests: 1240
                      timestamp: '2026-07-01T00:00:00Z'
                  summary: Traffic overview
          description: The operation completed successfully.
        '400':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                ValidationError:
                  value:
                    non_field_errors:
                    - The request could not be processed.
                    translation: errors.request.invalid
                  summary: Validation error
          description: The request is malformed or violates a business rule.
        '401':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                AuthenticationRequired:
                  value:
                    detail: Authentication credentials were not provided.
                  summary: Authentication required
          description: Authentication credentials are missing, expired, or invalid.
        '403':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                PermissionDenied:
                  value:
                    detail: You do not have permission to perform this action.
                  summary: Permission denied
          description: The authenticated account cannot perform this operation.
        '500':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                InternalServiceError:
                  value:
                    non_field_errors:
                    - Internal server error.
                  summary: Internal service error
          description: The service could not complete the operation.
  /api-keys:
    get:
      operationId: api_keys_list
      description: Returns API keys created by the authenticated account. Secret key
        values are returned only where the underlying account policy permits it.
      summary: List API keys
      parameters:
      - name: limit
        required: false
        in: query
        description: Number of results to return per page.
        schema:
          type: integer
      - name: offset
        required: false
        in: query
        description: The initial index from which to return the results.
        schema:
          type: integer
      tags:
      - API Keys
      security:
      - BearerAuth: []
      - StaticAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedAPIKeyListList'
              examples:
                example:
                  summary: Example response
                  value:
                    count: 1
                    next: null
                    previous: null
                    results:
                    - id: 550e8400-e29b-41d4-a716-446655440001
                      title: Production integration
                      prefix: prefix
                      key: key
                      allowed_ips:
                      - 198.51.100.25
                      created: '2026-07-01T12:30:00Z'
                      updated: '2026-07-01T12:30:00Z'
          description: The operation completed successfully.
        '401':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                AuthenticationRequired:
                  value:
                    detail: Authentication credentials were not provided.
                  summary: Authentication required
          description: Authentication credentials are missing, expired, or invalid.
        '403':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                PermissionDenied:
                  value:
                    detail: You do not have permission to perform this action.
                  summary: Permission denied
          description: The authenticated account cannot perform this operation.
        '400':
          description: The request is malformed or violates a business rule.
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                example:
                  summary: Validation error
                  value:
                    non_field_errors:
                    - The request could not be processed.
                    translation: errors.request.invalid
    post:
      operationId: api_keys_create
      description: Creates an API key for server-to-server access. allowed_ips can
        restrict the key to trusted IPv4 or IPv6 addresses.
      summary: Create an API key
      tags:
      - API Keys
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/APIKeyCreateRequest'
            examples:
              RestrictKeyByIP:
                value:
                  allowed_ips:
                  - 198.51.100.25
                  - 203.0.113.10
                summary: Restrict key by IP
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/APIKeyCreateRequest'
            examples:
              example:
                summary: Example request
                value:
                  id: 550e8400-e29b-41d4-a716-446655440001
                  allowed_ips:
                  - 198.51.100.25
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/APIKeyCreateRequest'
            examples:
              example:
                summary: Example request
                value:
                  id: 550e8400-e29b-41d4-a716-446655440001
                  allowed_ips:
                  - 198.51.100.25
      security:
      - BearerAuth: []
      - StaticAuth: []
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIKeyCreate'
              examples:
                CreatedAPIKey:
                  value:
                    id: 550e8400-e29b-41d4-a716-446655440008
                    title: Production reporting
                    key: pk_live_7eb1db5a0b174eddb9e70718197780a8
                    allowed_ips:
                    - 198.51.100.25
                    - 203.0.113.10
                    created: '2026-07-01T12:30:00Z'
                  summary: Created API key
          description: The resource or action result was created successfully.
        '400':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                ValidationError:
                  value:
                    non_field_errors:
                    - The request could not be processed.
                    translation: errors.request.invalid
                  summary: Validation error
          description: The request is malformed or violates a business rule.
        '401':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                AuthenticationRequired:
                  value:
                    detail: Authentication credentials were not provided.
                  summary: Authentication required
          description: Authentication credentials are missing, expired, or invalid.
        '403':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                PermissionDenied:
                  value:
                    detail: You do not have permission to perform this action.
                  summary: Permission denied
          description: The authenticated account cannot perform this operation.
  /api-keys/{id}:
    delete:
      operationId: api_keys_destroy
      description: Permanently revokes an API key owned by the authenticated account.
        Requests using the revoked key fail immediately.
      summary: Revoke an API key
      parameters:
      - in: path
        name: id
        schema:
          type: string
        description: A unique value identifying this API Key.
        required: true
      tags:
      - API Keys
      security:
      - BearerAuth: []
      - StaticAuth: []
      responses:
        '204':
          description: No response body
        '401':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                AuthenticationRequired:
                  value:
                    detail: Authentication credentials were not provided.
                  summary: Authentication required
          description: Authentication credentials are missing, expired, or invalid.
        '403':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                PermissionDenied:
                  value:
                    detail: You do not have permission to perform this action.
                  summary: Permission denied
          description: The authenticated account cannot perform this operation.
        '404':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                ResourceNotFound:
                  value:
                    detail: Not found.
                  summary: Resource not found
          description: The requested resource does not exist in the current account
            scope.
        '400':
          description: The request is malformed or violates a business rule.
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                example:
                  summary: Validation error
                  value:
                    non_field_errors:
                    - The request could not be processed.
                    translation: errors.request.invalid
  /coupons:
    get:
      operationId: coupons_list
      description: Returns coupons visible to the authenticated account. Staff accounts
        receive administrative fields; customers receive the public coupon view.
      summary: List available coupons
      parameters:
      - in: query
        name: code
        schema:
          type: string
      - name: limit
        required: false
        in: query
        description: Number of results to return per page.
        schema:
          type: integer
      - name: offset
        required: false
        in: query
        description: The initial index from which to return the results.
        schema:
          type: integer
      - name: ordering
        required: false
        in: query
        description: Which field to use when ordering the results.
        schema:
          type: string
      - name: search
        required: false
        in: query
        description: 'Case-insensitive partial search across Coupon fields: `title`
          and `content`. Separate multiple terms with spaces or commas; every term
          must match at least one listed field.'
        schema:
          type: string
      - in: query
        name: type
        schema:
          type: string
          enum:
          - free_data
          - monetary
          - percentage
        description: '* `free_data` - Free Data * `monetary` - Money * `percentage`
          - Percentage'
      tags:
      - Coupons
      security:
      - BearerAuth: []
      - StaticAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedCouponShortList'
              examples:
                example:
                  summary: Example response
                  value:
                    count: 1
                    next: null
                    previous: null
                    results:
                    - id: 550e8400-e29b-41d4-a716-446655440001
                      is_expired: true
                      is_redeemed: true
                      packages:
                      - {}
                      created: '2026-07-01T12:30:00Z'
                      value: 1
                      code: us
                      is_multi_use: true
                      is_available_to_one_time: true
                      type: free_data
                      limit: 100
                      valid_until: '2026-07-01T12:30:00Z'
                      marketer: 550e8400-e29b-41d4-a716-446655440001
                      user: 550e8400-e29b-41d4-a716-446655440001
          description: The operation completed successfully.
        '400':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                ValidationError:
                  value:
                    non_field_errors:
                    - The request could not be processed.
                    translation: errors.request.invalid
                  summary: Validation error
          description: The request is malformed or violates a business rule.
        '401':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                AuthenticationRequired:
                  value:
                    detail: Authentication credentials were not provided.
                  summary: Authentication required
          description: Authentication credentials are missing, expired, or invalid.
        '403':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                PermissionDenied:
                  value:
                    detail: You do not have permission to perform this action.
                  summary: Permission denied
          description: The authenticated account cannot perform this operation.
    post:
      operationId: coupons_create
      description: Creates a coupon. This operation is restricted to administrators.
      summary: Create a coupon
      tags:
      - Coupons
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CouponCreateRequest'
            examples:
              example:
                summary: Example request
                value:
                  value: 1
                  code: us
                  is_multi_use: true
                  is_available_to_one_time: true
                  marketer: 550e8400-e29b-41d4-a716-446655440001
                  type: free_data
                  limit: 100
                  valid_until: '2026-07-01T12:30:00Z'
                  packages:
                  - package
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/CouponCreateRequest'
            examples:
              example:
                summary: Example request
                value:
                  value: 1
                  code: us
                  is_multi_use: true
                  is_available_to_one_time: true
                  marketer: 550e8400-e29b-41d4-a716-446655440001
                  type: free_data
                  limit: 100
                  valid_until: '2026-07-01T12:30:00Z'
                  packages:
                  - package
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/CouponCreateRequest'
            examples:
              example:
                summary: Example request
                value:
                  value: 1
                  code: us
                  is_multi_use: true
                  is_available_to_one_time: true
                  marketer: 550e8400-e29b-41d4-a716-446655440001
                  type: free_data
                  limit: 100
                  valid_until: '2026-07-01T12:30:00Z'
                  packages:
                  - package
        required: true
      security:
      - BearerAuth: []
      - StaticAuth: []
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Coupon'
              examples:
                example:
                  summary: Example response
                  value:
                    id: 550e8400-e29b-41d4-a716-446655440001
                    redeemed_count: 1
                    is_expired: true
                    is_redeemed: true
                    packages:
                    - id: 550e8400-e29b-41d4-a716-446655440001
                      name: Residential 10 GB
                      alias: residential-10gb
                      is_unlimited_data: true
                      targeting_options:
                        package: package
                        split_char: '-'
                        value_char: '-'
                        continent: continent
                        country: us
                        region: california
                        city: los_angeles
                        asn: '15169'
                        isp: comcast
                        username: developer
                        pool: residential
                        location: location
                        location_format: location format
                        session: session
                        session_mode_tag: session mode tag
                        session_ttl: session ttl
                        session_ttl_format: 1
                        os: os
                        os_combined: true
                        os_split_char: os split char
                        os_linux: os linux
                        os_windows: os windows
                        os_ios: os ios
                        os_macos: os macos
                        os_android: os android
                    stats: {}
                    created: '2026-07-01T12:30:00Z'
                    value: 1
                    code: us
                    is_multi_use: true
                    is_available_to_one_time: true
                    type: free_data
                    limit: 100
                    valid_until: '2026-07-01T12:30:00Z'
                    marketer: 550e8400-e29b-41d4-a716-446655440001
                    user: 550e8400-e29b-41d4-a716-446655440001
          description: The resource or action result was created successfully.
        '400':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                ValidationError:
                  value:
                    non_field_errors:
                    - The request could not be processed.
                    translation: errors.request.invalid
                  summary: Validation error
          description: The request is malformed or violates a business rule.
        '401':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                AuthenticationRequired:
                  value:
                    detail: Authentication credentials were not provided.
                  summary: Authentication required
          description: Authentication credentials are missing, expired, or invalid.
        '403':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                PermissionDenied:
                  value:
                    detail: You do not have permission to perform this action.
                  summary: Permission denied
          description: The authenticated account cannot perform this operation.
  /coupons/{id}:
    get:
      operationId: coupons_retrieve
      description: Returns one coupon visible within the caller's account scope.
      summary: Get a coupon
      parameters:
      - in: path
        name: id
        schema:
          type: string
        description: A unique value identifying this Coupon.
        required: true
      tags:
      - Coupons
      security:
      - BearerAuth: []
      - StaticAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CouponShort'
              examples:
                example:
                  summary: Example response
                  value:
                    id: 550e8400-e29b-41d4-a716-446655440001
                    is_expired: true
                    is_redeemed: true
                    packages:
                    - {}
                    created: '2026-07-01T12:30:00Z'
                    value: 1
                    code: us
                    is_multi_use: true
                    is_available_to_one_time: true
                    type: free_data
                    limit: 100
                    valid_until: '2026-07-01T12:30:00Z'
                    marketer: 550e8400-e29b-41d4-a716-446655440001
                    user: 550e8400-e29b-41d4-a716-446655440001
          description: The operation completed successfully.
        '401':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                AuthenticationRequired:
                  value:
                    detail: Authentication credentials were not provided.
                  summary: Authentication required
          description: Authentication credentials are missing, expired, or invalid.
        '403':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                PermissionDenied:
                  value:
                    detail: You do not have permission to perform this action.
                  summary: Permission denied
          description: The authenticated account cannot perform this operation.
        '404':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                ResourceNotFound:
                  value:
                    detail: Not found.
                  summary: Resource not found
          description: The requested resource does not exist in the current account
            scope.
        '400':
          description: The request is malformed or violates a business rule.
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                example:
                  summary: Validation error
                  value:
                    non_field_errors:
                    - The request could not be processed.
                    translation: errors.request.invalid
    put:
      operationId: coupons_update
      description: Replaces the writable fields of a coupon. Staff access is required.
      summary: Replace a coupon
      parameters:
      - in: path
        name: id
        schema:
          type: string
        description: A unique value identifying this Coupon.
        required: true
      tags:
      - Coupons
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CouponUpdateRequest'
            examples:
              example:
                summary: Example request
                value:
                  value: 1
                  code: us
                  is_multi_use: true
                  is_available_to_one_time: true
                  marketer: 550e8400-e29b-41d4-a716-446655440001
                  type: free_data
                  limit: 100
                  valid_until: '2026-07-01T12:30:00Z'
                  packages:
                  - package
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/CouponUpdateRequest'
            examples:
              example:
                summary: Example request
                value:
                  value: 1
                  code: us
                  is_multi_use: true
                  is_available_to_one_time: true
                  marketer: 550e8400-e29b-41d4-a716-446655440001
                  type: free_data
                  limit: 100
                  valid_until: '2026-07-01T12:30:00Z'
                  packages:
                  - package
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/CouponUpdateRequest'
            examples:
              example:
                summary: Example request
                value:
                  value: 1
                  code: us
                  is_multi_use: true
                  is_available_to_one_time: true
                  marketer: 550e8400-e29b-41d4-a716-446655440001
                  type: free_data
                  limit: 100
                  valid_until: '2026-07-01T12:30:00Z'
                  packages:
                  - package
        required: true
      security:
      - BearerAuth: []
      - StaticAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Coupon'
              examples:
                example:
                  summary: Example response
                  value:
                    id: 550e8400-e29b-41d4-a716-446655440001
                    redeemed_count: 1
                    is_expired: true
                    is_redeemed: true
                    packages:
                    - id: 550e8400-e29b-41d4-a716-446655440001
                      name: Residential 10 GB
                      alias: residential-10gb
                      is_unlimited_data: true
                      targeting_options:
                        package: package
                        split_char: '-'
                        value_char: '-'
                        continent: continent
                        country: us
                        region: california
                        city: los_angeles
                        asn: '15169'
                        isp: comcast
                        username: developer
                        pool: residential
                        location: location
                        location_format: location format
                        session: session
                        session_mode_tag: session mode tag
                        session_ttl: session ttl
                        session_ttl_format: 1
                        os: os
                        os_combined: true
                        os_split_char: os split char
                        os_linux: os linux
                        os_windows: os windows
                        os_ios: os ios
                        os_macos: os macos
                        os_android: os android
                    stats: {}
                    created: '2026-07-01T12:30:00Z'
                    value: 1
                    code: us
                    is_multi_use: true
                    is_available_to_one_time: true
                    type: free_data
                    limit: 100
                    valid_until: '2026-07-01T12:30:00Z'
                    marketer: 550e8400-e29b-41d4-a716-446655440001
                    user: 550e8400-e29b-41d4-a716-446655440001
          description: The operation completed successfully.
        '400':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                ValidationError:
                  value:
                    non_field_errors:
                    - The request could not be processed.
                    translation: errors.request.invalid
                  summary: Validation error
          description: The request is malformed or violates a business rule.
        '401':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                AuthenticationRequired:
                  value:
                    detail: Authentication credentials were not provided.
                  summary: Authentication required
          description: Authentication credentials are missing, expired, or invalid.
        '403':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                PermissionDenied:
                  value:
                    detail: You do not have permission to perform this action.
                  summary: Permission denied
          description: The authenticated account cannot perform this operation.
        '404':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                ResourceNotFound:
                  value:
                    detail: Not found.
                  summary: Resource not found
          description: The requested resource does not exist in the current account
            scope.
    patch:
      operationId: coupons_partial_update
      description: Updates selected coupon fields. Staff access is required.
      summary: Update a coupon
      parameters:
      - in: path
        name: id
        schema:
          type: string
        description: A unique value identifying this Coupon.
        required: true
      tags:
      - Coupons
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchedCouponUpdateRequest'
            examples:
              example:
                summary: Example request
                value:
                  value: 1
                  code: us
                  is_multi_use: true
                  is_available_to_one_time: true
                  marketer: 550e8400-e29b-41d4-a716-446655440001
                  type: free_data
                  limit: 100
                  valid_until: '2026-07-01T12:30:00Z'
                  packages:
                  - package
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/PatchedCouponUpdateRequest'
            examples:
              example:
                summary: Example request
                value:
                  value: 1
                  code: us
                  is_multi_use: true
                  is_available_to_one_time: true
                  marketer: 550e8400-e29b-41d4-a716-446655440001
                  type: free_data
                  limit: 100
                  valid_until: '2026-07-01T12:30:00Z'
                  packages:
                  - package
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/PatchedCouponUpdateRequest'
            examples:
              example:
                summary: Example request
                value:
                  value: 1
                  code: us
                  is_multi_use: true
                  is_available_to_one_time: true
                  marketer: 550e8400-e29b-41d4-a716-446655440001
                  type: free_data
                  limit: 100
                  valid_until: '2026-07-01T12:30:00Z'
                  packages:
                  - package
      security:
      - BearerAuth: []
      - StaticAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Coupon'
              examples:
                example:
                  summary: Example response
                  value:
                    id: 550e8400-e29b-41d4-a716-446655440001
                    redeemed_count: 1
                    is_expired: true
                    is_redeemed: true
                    packages:
                    - id: 550e8400-e29b-41d4-a716-446655440001
                      name: Residential 10 GB
                      alias: residential-10gb
                      is_unlimited_data: true
                      targeting_options:
                        package: package
                        split_char: '-'
                        value_char: '-'
                        continent: continent
                        country: us
                        region: california
                        city: los_angeles
                        asn: '15169'
                        isp: comcast
                        username: developer
                        pool: residential
                        location: location
                        location_format: location format
                        session: session
                        session_mode_tag: session mode tag
                        session_ttl: session ttl
                        session_ttl_format: 1
                        os: os
                        os_combined: true
                        os_split_char: os split char
                        os_linux: os linux
                        os_windows: os windows
                        os_ios: os ios
                        os_macos: os macos
                        os_android: os android
                    stats: {}
                    created: '2026-07-01T12:30:00Z'
                    value: 1
                    code: us
                    is_multi_use: true
                    is_available_to_one_time: true
                    type: free_data
                    limit: 100
                    valid_until: '2026-07-01T12:30:00Z'
                    marketer: 550e8400-e29b-41d4-a716-446655440001
                    user: 550e8400-e29b-41d4-a716-446655440001
          description: The operation completed successfully.
        '400':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                ValidationError:
                  value:
                    non_field_errors:
                    - The request could not be processed.
                    translation: errors.request.invalid
                  summary: Validation error
          description: The request is malformed or violates a business rule.
        '401':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                AuthenticationRequired:
                  value:
                    detail: Authentication credentials were not provided.
                  summary: Authentication required
          description: Authentication credentials are missing, expired, or invalid.
        '403':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                PermissionDenied:
                  value:
                    detail: You do not have permission to perform this action.
                  summary: Permission denied
          description: The authenticated account cannot perform this operation.
        '404':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                ResourceNotFound:
                  value:
                    detail: Not found.
                  summary: Resource not found
          description: The requested resource does not exist in the current account
            scope.
    delete:
      operationId: coupons_destroy
      description: Deletes a coupon that is no longer needed. Staff access is required.
      summary: Delete a coupon
      parameters:
      - in: path
        name: id
        schema:
          type: string
        description: A unique value identifying this Coupon.
        required: true
      tags:
      - Coupons
      security:
      - BearerAuth: []
      - StaticAuth: []
      responses:
        '204':
          description: No response body
        '400':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                ValidationError:
                  value:
                    non_field_errors:
                    - The request could not be processed.
                    translation: errors.request.invalid
                  summary: Validation error
          description: The request is malformed or violates a business rule.
        '401':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                AuthenticationRequired:
                  value:
                    detail: Authentication credentials were not provided.
                  summary: Authentication required
          description: Authentication credentials are missing, expired, or invalid.
        '403':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                PermissionDenied:
                  value:
                    detail: You do not have permission to perform this action.
                  summary: Permission denied
          description: The authenticated account cannot perform this operation.
        '404':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                ResourceNotFound:
                  value:
                    detail: Not found.
                  summary: Resource not found
          description: The requested resource does not exist in the current account
            scope.
  /coupons/{id}/redeems:
    get:
      operationId: coupons_redeems_list
      description: Returns accounts and invoices that redeemed the selected coupon.
      summary: List coupon redemptions
      parameters:
      - in: query
        name: code
        schema:
          type: string
      - in: path
        name: id
        schema:
          type: string
        description: A unique value identifying this Coupon.
        required: true
      - name: limit
        required: false
        in: query
        description: Number of results to return per page.
        schema:
          type: integer
      - name: offset
        required: false
        in: query
        description: The initial index from which to return the results.
        schema:
          type: integer
      - name: ordering
        required: false
        in: query
        description: Which field to use when ordering the results.
        schema:
          type: string
      - in: query
        name: type
        schema:
          type: string
          enum:
          - free_data
          - monetary
          - percentage
        description: '* `free_data` - Free Data * `monetary` - Money * `percentage`
          - Percentage'
      tags:
      - Coupons
      security:
      - BearerAuth: []
      - StaticAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedCouponRedeemList'
              examples:
                example:
                  summary: Example response
                  value:
                    count: 1
                    next: null
                    previous: null
                    results:
                    - id: 550e8400-e29b-41d4-a716-446655440001
                      user: 550e8400-e29b-41d4-a716-446655440001
                      invoice: invoice
                      invoice_amount: 24.99
                      discount_applied: 24.99
                      redeemed_at: '2026-07-01T12:30:00Z'
                      created: '2026-07-01T12:30:00Z'
          description: The operation completed successfully.
        '401':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                AuthenticationRequired:
                  value:
                    detail: Authentication credentials were not provided.
                  summary: Authentication required
          description: Authentication credentials are missing, expired, or invalid.
        '403':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                PermissionDenied:
                  value:
                    detail: You do not have permission to perform this action.
                  summary: Permission denied
          description: The authenticated account cannot perform this operation.
        '404':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                ResourceNotFound:
                  value:
                    detail: Not found.
                  summary: Resource not found
          description: The requested resource does not exist in the current account
            scope.
        '400':
          description: The request is malformed or violates a business rule.
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                example:
                  summary: Validation error
                  value:
                    non_field_errors:
                    - The request could not be processed.
                    translation: errors.request.invalid
  /coupons/calculate-price:
    post:
      operationId: coupons_calculate_price_create
      description: Validates a coupon against the selected package and data amount,
        then returns both the original and discounted prices without creating an invoice.
      summary: Calculate a discounted price
      tags:
      - Coupons
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CouponCalculatePriceRequest'
            examples:
              CalculatePackageDiscount:
                value:
                  package_id: 550e8400-e29b-41d4-a716-446655440002
                  coupon_code: WELCOME20
                  data: 10737418240
                summary: Calculate package discount
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/CouponCalculatePriceRequest'
            examples:
              example:
                summary: Example request
                value:
                  package_id: 550e8400-e29b-41d4-a716-446655440002
                  coupon_code: coupon code
                  data: 1073741824
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/CouponCalculatePriceRequest'
            examples:
              example:
                summary: Example request
                value:
                  package_id: 550e8400-e29b-41d4-a716-446655440002
                  coupon_code: coupon code
                  data: 1073741824
        required: true
      security:
      - BearerAuth: []
      - StaticAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CouponPriceResponse'
              examples:
                DiscountedPrice:
                  value:
                    price_original: 2500
                    price_discounted: 2000
                    discount_percentage: 20
                  summary: Discounted price
          description: The operation completed successfully.
        '400':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                ValidationError:
                  value:
                    non_field_errors:
                    - The request could not be processed.
                    translation: errors.request.invalid
                  summary: Validation error
          description: The request is malformed or violates a business rule.
        '401':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                AuthenticationRequired:
                  value:
                    detail: Authentication credentials were not provided.
                  summary: Authentication required
          description: Authentication credentials are missing, expired, or invalid.
        '403':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                PermissionDenied:
                  value:
                    detail: You do not have permission to perform this action.
                  summary: Permission denied
          description: The authenticated account cannot perform this operation.
  /invoices:
    get:
      operationId: invoices_list
      description: Returns invoices visible to the authenticated account. Resellers
        and administrators can filter by an accessible user.
      summary: List invoices
      parameters:
      - in: query
        name: gateway
        schema:
          type: string
          title: Payment Gateway
          enum:
          - coinbase
          - coingate
          - cryptomus
          - manual
          - stripe
          - wallet
        description: The payment gateway used for processing the payment. * `coinbase`
          - Coinbase * `cryptomus` - Cryptomus * `stripe` - Stripe * `coingate` -
          Coingate * `wallet` - Wallet * `manual` - Manual
      - in: query
        name: internal_id
        schema:
          type: string
      - name: limit
        required: false
        in: query
        description: Number of results to return per page.
        schema:
          type: integer
      - name: offset
        required: false
        in: query
        description: The initial index from which to return the results.
        schema:
          type: integer
      - name: ordering
        required: false
        in: query
        description: Which field to use when ordering the results.
        schema:
          type: string
      - in: query
        name: package__id
        schema:
          type: string
      - name: search
        required: false
        in: query
        description: 'Case-insensitive partial search across Invoice fields: `id`,
          `internal_id`, and `user.email`. Separate multiple terms with spaces or
          commas; every term must match at least one listed field.'
        schema:
          type: string
      - in: query
        name: status
        schema:
          type: string
          enum:
          - error
          - paid
          - pending
          - unpaid
        description: After changing invoice status to PAID, the invoice will be processed
          and user package created in case none exists. If you need to cancel the
          invoice, make sure to subtract data from the user package after changing
          the invoice status. Changing the status from PAID to any other will not
          affect the user package's data or proxies. * `pending` - Pending * `paid`
          - Paid * `unpaid` - Unpaid * `error` - Error
      - in: query
        name: type
        schema:
          type: string
          enum:
          - balance
          - residential
          - static
        description: 'The type of invoice, indicating the type of proxy service. Options
          include: RESIDENTIAL: Residential proxies. STATIC: Static proxies. * `static`
          - Static * `residential` - Residential * `balance` - Balance'
      - in: query
        name: user__email
        schema:
          type: string
      - in: query
        name: user__id
        schema:
          type: string
          format: uuid
      tags:
      - Invoices
      security:
      - BearerAuth: []
      - StaticAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedInvoiceList'
              examples:
                example:
                  summary: Example response
                  value:
                    count: 1
                    next: null
                    previous: null
                    results:
                    - id: 550e8400-e29b-41d4-a716-446655440001
                      package:
                        id: 550e8400-e29b-41d4-a716-446655440001
                        name: Residential 10 GB
                        alias: residential-10gb
                        is_unlimited_data: true
                        targeting_options:
                          package: package
                          split_char: '-'
                          value_char: '-'
                          continent: continent
                          country: us
                          region: california
                          city: los_angeles
                          asn: '15169'
                          isp: comcast
                          username: developer
                          pool: residential
                          location: location
                          location_format: location format
                          session: session
                          session_mode_tag: session mode tag
                          session_ttl: session ttl
                          session_ttl_format: 1
                          os: os
                          os_combined: true
                          os_split_char: os split char
                          os_linux: os linux
                          os_windows: os windows
                          os_ios: os ios
                          os_macos: os macos
                          os_android: os android
                      country: us
                      user_id: 550e8400-e29b-41d4-a716-446655440001
                      coupon:
                        id: 550e8400-e29b-41d4-a716-446655440001
                        is_expired: true
                        is_redeemed: true
                        packages:
                        - {}
                        created: '2026-07-01T12:30:00Z'
                        value: 1
                        code: us
                        is_multi_use: true
                        is_available_to_one_time: true
                        type: free_data
                        limit: 100
                        valid_until: '2026-07-01T12:30:00Z'
                        marketer: 550e8400-e29b-41d4-a716-446655440001
                        user: 550e8400-e29b-41d4-a716-446655440001
                      updated: '2026-07-01T12:30:00Z'
                      created: '2026-07-01T12:30:00Z'
                      type: static
                      is_one_time: true
                      is_payout: true
                      internal_id: 550e8400-e29b-41d4-a716-446655440001
                      status: pending
                      description: description
                      connection_limit: 1
                      quantity: 1
                      data: 1073741824
                      balance: 1
                      price_total: 1
                      gateway: coinbase
                      payment_url: https://developer.example.com/resource
                      coingate_order_token: coingate order token
                      coinbase_charge_id: 550e8400-e29b-41d4-a716-446655440001
                      vat: 24.99
                      company_name: company name
                      company_address: company address
                      company_city: company city
                      company_postal_code: company postal code
                      company_registration_number: company registration number
                      company_vat_number: company vat number
                      paid: '2026-07-01T12:30:00Z'
          description: The operation completed successfully.
        '400':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                ValidationError:
                  value:
                    non_field_errors:
                    - The request could not be processed.
                    translation: errors.request.invalid
                  summary: Validation error
          description: The request is malformed or violates a business rule.
        '401':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                AuthenticationRequired:
                  value:
                    detail: Authentication credentials were not provided.
                  summary: Authentication required
          description: Authentication credentials are missing, expired, or invalid.
        '403':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                PermissionDenied:
                  value:
                    detail: You do not have permission to perform this action.
                  summary: Permission denied
          description: The authenticated account cannot perform this operation.
    post:
      operationId: invoices_create
      description: Calculates package pricing, creates a pending invoice, and initializes
        the selected payment provider when required.
      summary: Create an invoice
      tags:
      - Invoices
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InvoiceCreateRequestRequest'
            examples:
              PurchaseResidentialData:
                value:
                  package_id: 550e8400-e29b-41d4-a716-446655440002
                  data: 10737418240
                  gateway: stripe
                summary: Purchase residential data
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/InvoiceCreateRequestRequest'
            examples:
              example:
                summary: Example request
                value:
                  package_id: 550e8400-e29b-41d4-a716-446655440002
                  user_id: 550e8400-e29b-41d4-a716-446655440001
                  gateway: crypto
                  crypto_currency: crypto currency
                  coupon_code: coupon code
                  country_code: us
                  data: 1073741824
                  quantity: 1
                  amount: 1073741824
                  connection_limit: 1
                  expires: 1
                  company_name: company name
                  company_registration_number: company registration number
                  company_vat_number: company vat number
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/InvoiceCreateRequestRequest'
            examples:
              example:
                summary: Example request
                value:
                  package_id: 550e8400-e29b-41d4-a716-446655440002
                  user_id: 550e8400-e29b-41d4-a716-446655440001
                  gateway: crypto
                  crypto_currency: crypto currency
                  coupon_code: coupon code
                  country_code: us
                  data: 1073741824
                  quantity: 1
                  amount: 1073741824
                  connection_limit: 1
                  expires: 1
                  company_name: company name
                  company_registration_number: company registration number
                  company_vat_number: company vat number
        required: true
      security:
      - BearerAuth: []
      - StaticAuth: []
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Invoice'
              examples:
                example:
                  summary: Example response
                  value:
                    id: 550e8400-e29b-41d4-a716-446655440001
                    package:
                      id: 550e8400-e29b-41d4-a716-446655440001
                      name: Residential 10 GB
                      alias: residential-10gb
                      is_unlimited_data: true
                      targeting_options:
                        package: package
                        split_char: '-'
                        value_char: '-'
                        continent: continent
                        country: us
                        region: california
                        city: los_angeles
                        asn: '15169'
                        isp: comcast
                        username: developer
                        pool: residential
                        location: location
                        location_format: location format
                        session: session
                        session_mode_tag: session mode tag
                        session_ttl: session ttl
                        session_ttl_format: 1
                        os: os
                        os_combined: true
                        os_split_char: os split char
                        os_linux: os linux
                        os_windows: os windows
                        os_ios: os ios
                        os_macos: os macos
                        os_android: os android
                    country: us
                    user_id: 550e8400-e29b-41d4-a716-446655440001
                    coupon:
                      id: 550e8400-e29b-41d4-a716-446655440001
                      is_expired: true
                      is_redeemed: true
                      packages:
                      - {}
                      created: '2026-07-01T12:30:00Z'
                      value: 1
                      code: us
                      is_multi_use: true
                      is_available_to_one_time: true
                      type: free_data
                      limit: 100
                      valid_until: '2026-07-01T12:30:00Z'
                      marketer: 550e8400-e29b-41d4-a716-446655440001
                      user: 550e8400-e29b-41d4-a716-446655440001
                    updated: '2026-07-01T12:30:00Z'
                    created: '2026-07-01T12:30:00Z'
                    type: static
                    is_one_time: true
                    is_payout: true
                    internal_id: 550e8400-e29b-41d4-a716-446655440001
                    status: pending
                    description: description
                    connection_limit: 1
                    quantity: 1
                    data: 1073741824
                    balance: 1
                    price_total: 1
                    gateway: coinbase
                    payment_url: https://developer.example.com/resource
                    coingate_order_token: coingate order token
                    coinbase_charge_id: 550e8400-e29b-41d4-a716-446655440001
                    vat: 24.99
                    company_name: company name
                    company_address: company address
                    company_city: company city
                    company_postal_code: company postal code
                    company_registration_number: company registration number
                    company_vat_number: company vat number
                    paid: '2026-07-01T12:30:00Z'
          description: The resource or action result was created successfully.
        '400':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                ValidationError:
                  value:
                    non_field_errors:
                    - The request could not be processed.
                    translation: errors.request.invalid
                  summary: Validation error
          description: The request is malformed or violates a business rule.
        '401':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                AuthenticationRequired:
                  value:
                    detail: Authentication credentials were not provided.
                  summary: Authentication required
          description: Authentication credentials are missing, expired, or invalid.
        '403':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                PermissionDenied:
                  value:
                    detail: You do not have permission to perform this action.
                  summary: Permission denied
          description: The authenticated account cannot perform this operation.
  /invoices/{id}:
    get:
      operationId: invoices_retrieve
      description: Returns billing, package, payment, and status details for one invoice
        visible to the authenticated account.
      summary: Get an invoice
      parameters:
      - in: path
        name: id
        schema:
          type: string
        description: A unique value identifying this Invoice.
        required: true
      tags:
      - Invoices
      security:
      - BearerAuth: []
      - StaticAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Invoice'
              examples:
                example:
                  summary: Example response
                  value:
                    id: 550e8400-e29b-41d4-a716-446655440001
                    package:
                      id: 550e8400-e29b-41d4-a716-446655440001
                      name: Residential 10 GB
                      alias: residential-10gb
                      is_unlimited_data: true
                      targeting_options:
                        package: package
                        split_char: '-'
                        value_char: '-'
                        continent: continent
                        country: us
                        region: california
                        city: los_angeles
                        asn: '15169'
                        isp: comcast
                        username: developer
                        pool: residential
                        location: location
                        location_format: location format
                        session: session
                        session_mode_tag: session mode tag
                        session_ttl: session ttl
                        session_ttl_format: 1
                        os: os
                        os_combined: true
                        os_split_char: os split char
                        os_linux: os linux
                        os_windows: os windows
                        os_ios: os ios
                        os_macos: os macos
                        os_android: os android
                    country: us
                    user_id: 550e8400-e29b-41d4-a716-446655440001
                    coupon:
                      id: 550e8400-e29b-41d4-a716-446655440001
                      is_expired: true
                      is_redeemed: true
                      packages:
                      - {}
                      created: '2026-07-01T12:30:00Z'
                      value: 1
                      code: us
                      is_multi_use: true
                      is_available_to_one_time: true
                      type: free_data
                      limit: 100
                      valid_until: '2026-07-01T12:30:00Z'
                      marketer: 550e8400-e29b-41d4-a716-446655440001
                      user: 550e8400-e29b-41d4-a716-446655440001
                    updated: '2026-07-01T12:30:00Z'
                    created: '2026-07-01T12:30:00Z'
                    type: static
                    is_one_time: true
                    is_payout: true
                    internal_id: 550e8400-e29b-41d4-a716-446655440001
                    status: pending
                    description: description
                    connection_limit: 1
                    quantity: 1
                    data: 1073741824
                    balance: 1
                    price_total: 1
                    gateway: coinbase
                    payment_url: https://developer.example.com/resource
                    coingate_order_token: coingate order token
                    coinbase_charge_id: 550e8400-e29b-41d4-a716-446655440001
                    vat: 24.99
                    company_name: company name
                    company_address: company address
                    company_city: company city
                    company_postal_code: company postal code
                    company_registration_number: company registration number
                    company_vat_number: company vat number
                    paid: '2026-07-01T12:30:00Z'
          description: The operation completed successfully.
        '401':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                AuthenticationRequired:
                  value:
                    detail: Authentication credentials were not provided.
                  summary: Authentication required
          description: Authentication credentials are missing, expired, or invalid.
        '403':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                PermissionDenied:
                  value:
                    detail: You do not have permission to perform this action.
                  summary: Permission denied
          description: The authenticated account cannot perform this operation.
        '404':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                ResourceNotFound:
                  value:
                    detail: Not found.
                  summary: Resource not found
          description: The requested resource does not exist in the current account
            scope.
        '400':
          description: The request is malformed or violates a business rule.
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                example:
                  summary: Validation error
                  value:
                    non_field_errors:
                    - The request could not be processed.
                    translation: errors.request.invalid
    delete:
      operationId: invoices_destroy
      description: Deletes an invoice that the authenticated account is allowed to
        remove.
      summary: Delete an invoice
      parameters:
      - in: path
        name: id
        schema:
          type: string
        description: A unique value identifying this Invoice.
        required: true
      tags:
      - Invoices
      security:
      - BearerAuth: []
      - StaticAuth: []
      responses:
        '204':
          description: No response body
        '401':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                AuthenticationRequired:
                  value:
                    detail: Authentication credentials were not provided.
                  summary: Authentication required
          description: Authentication credentials are missing, expired, or invalid.
        '403':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                PermissionDenied:
                  value:
                    detail: You do not have permission to perform this action.
                  summary: Permission denied
          description: The authenticated account cannot perform this operation.
        '404':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                ResourceNotFound:
                  value:
                    detail: Not found.
                  summary: Resource not found
          description: The requested resource does not exist in the current account
            scope.
        '400':
          description: The request is malformed or violates a business rule.
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                example:
                  summary: Validation error
                  value:
                    non_field_errors:
                    - The request could not be processed.
                    translation: errors.request.invalid
  /invoices/{id}/download/pdf:
    get:
      operationId: invoices_download_pdf_retrieve
      description: Returns the generated invoice document as a PDF attachment. The
        file may be downloaded from the billing provider on first access.
      summary: Download an invoice PDF
      parameters:
      - in: path
        name: id
        schema:
          type: string
        description: A unique value identifying this Invoice.
        required: true
      tags:
      - Invoices
      security:
      - BearerAuth: []
      - StaticAuth: []
      responses:
        '200':
          content:
            application/pdf:
              schema:
                type: string
                format: binary
          description: Invoice PDF document.
        '401':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                AuthenticationRequired:
                  value:
                    detail: Authentication credentials were not provided.
                  summary: Authentication required
          description: Authentication credentials are missing, expired, or invalid.
        '403':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                PermissionDenied:
                  value:
                    detail: You do not have permission to perform this action.
                  summary: Permission denied
          description: The authenticated account cannot perform this operation.
        '404':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                ResourceNotFound:
                  value:
                    detail: Not found.
                  summary: Resource not found
          description: The requested resource does not exist in the current account
            scope.
        '400':
          description: The request is malformed or violates a business rule.
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                example:
                  summary: Validation error
                  value:
                    non_field_errors:
                    - The request could not be processed.
                    translation: errors.request.invalid
  /invoices/{id}/pay:
    get:
      operationId: invoices_pay_retrieve
      description: Returns the hosted checkout URL for a pending invoice. Paid, cancelled,
        or expired invoices cannot produce a new payment link.
      summary: Get an invoice payment link
      parameters:
      - in: path
        name: id
        schema:
          type: string
        description: A unique value identifying this Invoice.
        required: true
      tags:
      - Invoices
      security:
      - BearerAuth: []
      - StaticAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentLinkResponse'
              examples:
                HostedCheckout:
                  value:
                    payment_url: https://checkout.stripe.com/c/pay/550e8400e29b41d4a716446655440004
                  summary: Hosted checkout
          description: The operation completed successfully.
        '400':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                ValidationError:
                  value:
                    non_field_errors:
                    - The request could not be processed.
                    translation: errors.request.invalid
                  summary: Validation error
          description: The request is malformed or violates a business rule.
        '401':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                AuthenticationRequired:
                  value:
                    detail: Authentication credentials were not provided.
                  summary: Authentication required
          description: Authentication credentials are missing, expired, or invalid.
        '403':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                PermissionDenied:
                  value:
                    detail: You do not have permission to perform this action.
                  summary: Permission denied
          description: The authenticated account cannot perform this operation.
        '404':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                ResourceNotFound:
                  value:
                    detail: Not found.
                  summary: Resource not found
          description: The requested resource does not exist in the current account
            scope.
  /locations/asn:
    get:
      operationId: locations_asn_list
      description: Returns targetable ASNs for the selected package. Geo-scoped records
        include the country, region, or city where the ASN can be selected.
      summary: List available autonomous systems
      parameters:
      - in: query
        name: code
        schema:
          type: string
      - in: query
        name: country__code
        schema:
          type: string
      - in: query
        name: global
        schema:
          type: boolean
        description: Set to true to return only globally targetable ASNs.
      - name: limit
        required: false
        in: query
        description: Number of results to return per page.
        schema:
          type: integer
      - in: query
        name: name
        schema:
          type: string
      - name: offset
        required: false
        in: query
        description: The initial index from which to return the results.
        schema:
          type: integer
      - name: ordering
        required: false
        in: query
        description: Which field to use when ordering the results.
        schema:
          type: string
      - in: query
        name: package_id
        schema:
          type: string
          format: uuid
        description: Package whose targeting availability should be returned. Required
          when package-based authentication is enabled.
        examples:
          ResidentialPackage:
            value: 550e8400-e29b-41d4-a716-446655440002
            summary: Residential package
      - name: search
        required: false
        in: query
        description: 'Case-insensitive partial search across ASN fields: `code` and
          `name`. Separate multiple terms with spaces or commas; every term must match
          at least one listed field.'
        schema:
          type: string
      tags:
      - Locations
      security:
      - BearerAuth: []
      - StaticAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedLocationASNRecordList'
              examples:
                AvailableASNs:
                  value:
                    count: 1
                    next: null
                    previous: null
                    results:
                    - code: '7922'
                      name: Comcast Cable Communications
                      geo:
                      - country:
                          code: us
                          name: United States
                        region:
                          code: california
                          name: California
                        city:
                          code: los_angeles
                          name: Los Angeles
                  summary: Available ASNs
          description: The operation completed successfully.
        '400':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                ValidationError:
                  value:
                    non_field_errors:
                    - The request could not be processed.
                    translation: errors.request.invalid
                  summary: Validation error
          description: The request is malformed or violates a business rule.
        '401':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                AuthenticationRequired:
                  value:
                    detail: Authentication credentials were not provided.
                  summary: Authentication required
          description: Authentication credentials are missing, expired, or invalid.
        '403':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                PermissionDenied:
                  value:
                    detail: You do not have permission to perform this action.
                  summary: Permission denied
          description: The authenticated account cannot perform this operation.
  /locations/cities:
    get:
      operationId: locations_cities_list
      description: Returns cities supported by the selected package, country, and
        region, including targetable ISPs and autonomous system numbers.
      summary: List available cities
      parameters:
      - in: query
        name: code
        schema:
          type: string
      - in: query
        name: country__code
        schema:
          type: string
      - name: limit
        required: false
        in: query
        description: Number of results to return per page.
        schema:
          type: integer
      - in: query
        name: name
        schema:
          type: string
      - name: offset
        required: false
        in: query
        description: The initial index from which to return the results.
        schema:
          type: integer
      - name: ordering
        required: false
        in: query
        description: Which field to use when ordering the results.
        schema:
          type: string
      - in: query
        name: package_id
        schema:
          type: string
          format: uuid
        description: Package whose targeting availability should be returned. Required
          when package-based authentication is enabled.
        examples:
          ResidentialPackage:
            value: 550e8400-e29b-41d4-a716-446655440002
            summary: Residential package
      - in: query
        name: region__code
        schema:
          type: string
      - name: search
        required: false
        in: query
        description: 'Case-insensitive partial search across City fields: `code` and
          `name`. Separate multiple terms with spaces or commas; every term must match
          at least one listed field.'
        schema:
          type: string
      tags:
      - Locations
      security:
      - BearerAuth: []
      - StaticAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedCityList'
              examples:
                AvailableCities:
                  value:
                    count: 1
                    next: null
                    previous: null
                    results:
                    - id: us-ca-los-angeles
                      code: los_angeles
                      name: Los Angeles
                      country:
                        code: us
                        name: United States
                        original_name: United States
                      region:
                        code: california
                        name: California
                        original_name: California
                      isps:
                      - code: spectrum
                        name: Spectrum
                      asns:
                      - code: '20001'
                        name: Charter Communications
                  summary: Available cities
          description: The operation completed successfully.
        '400':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                ValidationError:
                  value:
                    non_field_errors:
                    - The request could not be processed.
                    translation: errors.request.invalid
                  summary: Validation error
          description: The request is malformed or violates a business rule.
        '401':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                AuthenticationRequired:
                  value:
                    detail: Authentication credentials were not provided.
                  summary: Authentication required
          description: Authentication credentials are missing, expired, or invalid.
        '403':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                PermissionDenied:
                  value:
                    detail: You do not have permission to perform this action.
                  summary: Permission denied
          description: The authenticated account cannot perform this operation.
  /locations/cities/{id}:
    get:
      operationId: locations_cities_retrieve
      description: Returns one city and its available network targeting options.
      summary: Get a city
      parameters:
      - in: path
        name: id
        schema:
          type: string
        required: true
      tags:
      - Locations
      security:
      - BearerAuth: []
      - StaticAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/City'
              examples:
                City:
                  value:
                    id: us-ca-los-angeles
                    code: los_angeles
                    name: Los Angeles
                    country:
                      code: us
                      name: United States
                      original_name: United States
                    region:
                      code: california
                      name: California
                      original_name: California
                    isps:
                    - code: spectrum
                      name: Spectrum
                    asns:
                    - code: '20001'
                      name: Charter Communications
          description: The operation completed successfully.
        '401':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                AuthenticationRequired:
                  value:
                    detail: Authentication credentials were not provided.
                  summary: Authentication required
          description: Authentication credentials are missing, expired, or invalid.
        '403':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                PermissionDenied:
                  value:
                    detail: You do not have permission to perform this action.
                  summary: Permission denied
          description: The authenticated account cannot perform this operation.
        '404':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                ResourceNotFound:
                  value:
                    detail: Not found.
                  summary: Resource not found
          description: The requested resource does not exist in the current account
            scope.
        '400':
          description: The request is malformed or violates a business rule.
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                example:
                  summary: Validation error
                  value:
                    non_field_errors:
                    - The request could not be processed.
                    translation: errors.request.invalid
  /locations/continents:
    get:
      operationId: locations_continents_list
      description: Returns continents containing at least one country supported by
        the selected package's active proxy providers.
      summary: List available continents
      parameters:
      - in: query
        name: code
        schema:
          type: string
      - name: limit
        required: false
        in: query
        description: Number of results to return per page.
        schema:
          type: integer
      - in: query
        name: name
        schema:
          type: string
      - name: offset
        required: false
        in: query
        description: The initial index from which to return the results.
        schema:
          type: integer
      - name: ordering
        required: false
        in: query
        description: Which field to use when ordering the results.
        schema:
          type: string
      - in: query
        name: package_id
        schema:
          type: string
          format: uuid
        description: Package whose targeting availability should be returned. Required
          when package-based authentication is enabled.
        examples:
          ResidentialPackage:
            value: 550e8400-e29b-41d4-a716-446655440002
            summary: Residential package
      - name: search
        required: false
        in: query
        description: 'Case-insensitive partial search across Continent fields: `code`
          and `name`. Separate multiple terms with spaces or commas; every term must
          match at least one listed field.'
        schema:
          type: string
      tags:
      - Locations
      security:
      - BearerAuth: []
      - StaticAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedContinentList'
              examples:
                AvailableContinents:
                  value:
                    count: 1
                    next: null
                    previous: null
                    results:
                    - id: na
                      code: na
                      name: North America
                  summary: Available continents
          description: The operation completed successfully.
        '400':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                ValidationError:
                  value:
                    non_field_errors:
                    - The request could not be processed.
                    translation: errors.request.invalid
                  summary: Validation error
          description: The request is malformed or violates a business rule.
        '401':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                AuthenticationRequired:
                  value:
                    detail: Authentication credentials were not provided.
                  summary: Authentication required
          description: Authentication credentials are missing, expired, or invalid.
        '403':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                PermissionDenied:
                  value:
                    detail: You do not have permission to perform this action.
                  summary: Permission denied
          description: The authenticated account cannot perform this operation.
  /locations/continents/{id}:
    get:
      operationId: locations_continents_retrieve
      description: Returns one continent from the proxy targeting dictionary.
      summary: Get a continent
      parameters:
      - in: path
        name: id
        schema:
          type: string
        required: true
      tags:
      - Locations
      security:
      - BearerAuth: []
      - StaticAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Continent'
              examples:
                Continent:
                  value:
                    id: na
                    code: na
                    name: North America
          description: The operation completed successfully.
        '401':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                AuthenticationRequired:
                  value:
                    detail: Authentication credentials were not provided.
                  summary: Authentication required
          description: Authentication credentials are missing, expired, or invalid.
        '403':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                PermissionDenied:
                  value:
                    detail: You do not have permission to perform this action.
                  summary: Permission denied
          description: The authenticated account cannot perform this operation.
        '404':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                ResourceNotFound:
                  value:
                    detail: Not found.
                  summary: Resource not found
          description: The requested resource does not exist in the current account
            scope.
        '400':
          description: The request is malformed or violates a business rule.
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                example:
                  summary: Validation error
                  value:
                    non_field_errors:
                    - The request could not be processed.
                    translation: errors.request.invalid
  /locations/countries:
    get:
      operationId: locations_countries_list
      description: Returns countries supported by the selected package, including
        targetable ISPs and autonomous system numbers when available.
      summary: List available countries
      parameters:
      - in: query
        name: code
        schema:
          type: string
      - name: limit
        required: false
        in: query
        description: Number of results to return per page.
        schema:
          type: integer
      - in: query
        name: name
        schema:
          type: string
      - name: offset
        required: false
        in: query
        description: The initial index from which to return the results.
        schema:
          type: integer
      - name: ordering
        required: false
        in: query
        description: Which field to use when ordering the results.
        schema:
          type: string
      - in: query
        name: package_id
        schema:
          type: string
          format: uuid
        description: Package whose targeting availability should be returned. Required
          when package-based authentication is enabled.
        examples:
          ResidentialPackage:
            value: 550e8400-e29b-41d4-a716-446655440002
            summary: Residential package
      - name: search
        required: false
        in: query
        description: 'Case-insensitive partial search across Country fields: `code`
          and `name`. Separate multiple terms with spaces or commas; every term must
          match at least one listed field.'
        schema:
          type: string
      tags:
      - Locations
      security:
      - BearerAuth: []
      - StaticAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedCountryList'
              examples:
                AvailableCountries:
                  value:
                    count: 1
                    next: null
                    previous: null
                    results:
                    - id: us
                      code: us
                      name: United States
                      original_name: United States
                      isps:
                      - code: comcast
                        name: Comcast Cable
                      asns:
                      - code: '7922'
                        name: Comcast Cable Communications
                  summary: Available countries
          description: The operation completed successfully.
        '400':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                ValidationError:
                  value:
                    non_field_errors:
                    - The request could not be processed.
                    translation: errors.request.invalid
                  summary: Validation error
          description: The request is malformed or violates a business rule.
        '401':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                AuthenticationRequired:
                  value:
                    detail: Authentication credentials were not provided.
                  summary: Authentication required
          description: Authentication credentials are missing, expired, or invalid.
        '403':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                PermissionDenied:
                  value:
                    detail: You do not have permission to perform this action.
                  summary: Permission denied
          description: The authenticated account cannot perform this operation.
  /locations/countries/{id}:
    get:
      operationId: locations_countries_retrieve
      description: Returns one country and its available network targeting options.
      summary: Get a country
      parameters:
      - in: path
        name: id
        schema:
          type: string
        required: true
      tags:
      - Locations
      security:
      - BearerAuth: []
      - StaticAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Country'
              examples:
                Country:
                  value:
                    id: us
                    code: us
                    name: United States
                    original_name: United States
                    isps:
                    - code: comcast
                      name: Comcast Cable
                    asns:
                    - code: '7922'
                      name: Comcast Cable Communications
          description: The operation completed successfully.
        '401':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                AuthenticationRequired:
                  value:
                    detail: Authentication credentials were not provided.
                  summary: Authentication required
          description: Authentication credentials are missing, expired, or invalid.
        '403':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                PermissionDenied:
                  value:
                    detail: You do not have permission to perform this action.
                  summary: Permission denied
          description: The authenticated account cannot perform this operation.
        '404':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                ResourceNotFound:
                  value:
                    detail: Not found.
                  summary: Resource not found
          description: The requested resource does not exist in the current account
            scope.
        '400':
          description: The request is malformed or violates a business rule.
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                example:
                  summary: Validation error
                  value:
                    non_field_errors:
                    - The request could not be processed.
                    translation: errors.request.invalid
  /locations/isps:
    get:
      operationId: locations_isps_list
      description: Returns ISPs that can be targeted by the selected package and location
        scope. Use country filters to narrow the result.
      summary: List available internet service providers
      parameters:
      - in: query
        name: code
        schema:
          type: string
      - in: query
        name: country__code
        schema:
          type: string
      - name: limit
        required: false
        in: query
        description: Number of results to return per page.
        schema:
          type: integer
      - in: query
        name: name
        schema:
          type: string
      - name: offset
        required: false
        in: query
        description: The initial index from which to return the results.
        schema:
          type: integer
      - name: ordering
        required: false
        in: query
        description: Which field to use when ordering the results.
        schema:
          type: string
      - in: query
        name: package_id
        schema:
          type: string
          format: uuid
        description: Package whose targeting availability should be returned. Required
          when package-based authentication is enabled.
        examples:
          ResidentialPackage:
            value: 550e8400-e29b-41d4-a716-446655440002
            summary: Residential package
      - name: search
        required: false
        in: query
        description: 'Case-insensitive partial search across ISP fields: `code` and
          `name`. Separate multiple terms with spaces or commas; every term must match
          at least one listed field.'
        schema:
          type: string
      tags:
      - Locations
      security:
      - BearerAuth: []
      - StaticAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedISPList'
              examples:
                AvailableISPs:
                  value:
                    count: 1
                    next: null
                    previous: null
                    results:
                    - code: comcast
                      name: Comcast Cable
                  summary: Available ISPs
          description: The operation completed successfully.
        '400':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                ValidationError:
                  value:
                    non_field_errors:
                    - The request could not be processed.
                    translation: errors.request.invalid
                  summary: Validation error
          description: The request is malformed or violates a business rule.
        '401':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                AuthenticationRequired:
                  value:
                    detail: Authentication credentials were not provided.
                  summary: Authentication required
          description: Authentication credentials are missing, expired, or invalid.
        '403':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                PermissionDenied:
                  value:
                    detail: You do not have permission to perform this action.
                  summary: Permission denied
          description: The authenticated account cannot perform this operation.
  /locations/regions:
    get:
      operationId: locations_regions_list
      description: Returns regions supported by the selected package and country,
        including targetable ISPs and autonomous system numbers.
      summary: List available regions
      parameters:
      - in: query
        name: code
        schema:
          type: string
      - in: query
        name: country__code
        schema:
          type: string
      - name: limit
        required: false
        in: query
        description: Number of results to return per page.
        schema:
          type: integer
      - in: query
        name: name
        schema:
          type: string
      - name: offset
        required: false
        in: query
        description: The initial index from which to return the results.
        schema:
          type: integer
      - name: ordering
        required: false
        in: query
        description: Which field to use when ordering the results.
        schema:
          type: string
      - in: query
        name: package_id
        schema:
          type: string
          format: uuid
        description: Package whose targeting availability should be returned. Required
          when package-based authentication is enabled.
        examples:
          ResidentialPackage:
            value: 550e8400-e29b-41d4-a716-446655440002
            summary: Residential package
      - name: search
        required: false
        in: query
        description: 'Case-insensitive partial search across Region fields: `code`
          and `name`. Separate multiple terms with spaces or commas; every term must
          match at least one listed field.'
        schema:
          type: string
      tags:
      - Locations
      security:
      - BearerAuth: []
      - StaticAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedRegionList'
              examples:
                AvailableRegions:
                  value:
                    count: 1
                    next: null
                    previous: null
                    results:
                    - id: us-ca
                      code: california
                      iso31662: US-CA
                      name: California
                      original_name: California
                      country:
                        code: us
                        name: United States
                        original_name: United States
                      isps:
                      - code: comcast
                        name: Comcast Cable
                      asns:
                      - code: '7922'
                        name: Comcast Cable Communications
                  summary: Available regions
          description: The operation completed successfully.
        '400':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                ValidationError:
                  value:
                    non_field_errors:
                    - The request could not be processed.
                    translation: errors.request.invalid
                  summary: Validation error
          description: The request is malformed or violates a business rule.
        '401':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                AuthenticationRequired:
                  value:
                    detail: Authentication credentials were not provided.
                  summary: Authentication required
          description: Authentication credentials are missing, expired, or invalid.
        '403':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                PermissionDenied:
                  value:
                    detail: You do not have permission to perform this action.
                  summary: Permission denied
          description: The authenticated account cannot perform this operation.
  /locations/regions/{id}:
    get:
      operationId: locations_regions_retrieve
      description: Returns one region and its available network targeting options.
      summary: Get a region
      parameters:
      - in: path
        name: id
        schema:
          type: string
        required: true
      tags:
      - Locations
      security:
      - BearerAuth: []
      - StaticAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Region'
              examples:
                Region:
                  value:
                    id: us-ca
                    code: california
                    iso31662: US-CA
                    name: California
                    original_name: California
                    country:
                      code: us
                      name: United States
                      original_name: United States
                    isps:
                    - code: comcast
                      name: Comcast Cable
                    asns:
                    - code: '7922'
                      name: Comcast Cable Communications
          description: The operation completed successfully.
        '401':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                AuthenticationRequired:
                  value:
                    detail: Authentication credentials were not provided.
                  summary: Authentication required
          description: Authentication credentials are missing, expired, or invalid.
        '403':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                PermissionDenied:
                  value:
                    detail: You do not have permission to perform this action.
                  summary: Permission denied
          description: The authenticated account cannot perform this operation.
        '404':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                ResourceNotFound:
                  value:
                    detail: Not found.
                  summary: Resource not found
          description: The requested resource does not exist in the current account
            scope.
        '400':
          description: The request is malformed or violates a business rule.
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                example:
                  summary: Validation error
                  value:
                    non_field_errors:
                    - The request could not be processed.
                    translation: errors.request.invalid
  /login:
    post:
      operationId: login_create
      description: 'Checks account credentials and returns an access token plus a
        refresh token. Send the access token as `Authorization: Bearer `.'
      summary: Sign in with email or username
      tags:
      - Authorization
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LoginRequestRequest'
            examples:
              SignInWithEmail:
                value:
                  email: developer@example.com
                  password: Correct-Horse-Battery-Staple-42
                summary: Sign in with email
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/LoginRequestRequest'
            examples:
              example:
                summary: Example request
                value:
                  email: developer@example.com
                  username: developer
                  password: Correct-Horse-Battery-Staple-42
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/LoginRequestRequest'
            examples:
              example:
                summary: Example request
                value:
                  email: developer@example.com
                  username: developer
                  password: Correct-Horse-Battery-Staple-42
        required: true
      security:
      - {}
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TokenPairResponse'
              examples:
                IssuedTokens:
                  value:
                    token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbl90eXBlIjoiYWNjZXNzIiwidXNlcl9pZCI6IjU1MGU4NDAwLWUyOWItNDFkNC1hNzE2LTQ0NjY1NTQ0MDAwMSJ9.example-signature
                    refresh: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbl90eXBlIjoicmVmcmVzaCIsInVzZXJfaWQiOiI1NTBlODQwMC1lMjliLTQxZDQtYTcxNi00NDY2NTU0NDAwMDEifQ.example-signature
                  summary: Issued tokens
          description: The operation completed successfully.
        '400':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                ValidationError:
                  value:
                    non_field_errors:
                    - The request could not be processed.
                    translation: errors.request.invalid
                  summary: Validation error
          description: The request is malformed or violates a business rule.
  /login/google:
    post:
      operationId: login_google_create
      description: Verifies a Google ID token, creates or links the matching customer
        account when needed, and returns an API token pair.
      summary: Sign in with Google
      tags:
      - Authorization
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GoogleAuthRequest'
            examples:
              GoogleCredential:
                value:
                  credential: google-id-token
                summary: Google credential
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/GoogleAuthRequest'
            examples:
              example:
                summary: Example request
                value:
                  credential: credential
                  client_id: 550e8400-e29b-41d4-a716-446655440001
                  select_by: select by
                  affiliate_code: affiliate code
                  referral_code: referral code
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/GoogleAuthRequest'
            examples:
              example:
                summary: Example request
                value:
                  credential: credential
                  client_id: 550e8400-e29b-41d4-a716-446655440001
                  select_by: select by
                  affiliate_code: affiliate code
                  referral_code: referral code
        required: true
      security:
      - {}
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TokenPairResponse'
              examples:
                IssuedTokens:
                  value:
                    token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbl90eXBlIjoiYWNjZXNzIiwidXNlcl9pZCI6IjU1MGU4NDAwLWUyOWItNDFkNC1hNzE2LTQ0NjY1NTQ0MDAwMSJ9.example-signature
                    refresh: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbl90eXBlIjoicmVmcmVzaCIsInVzZXJfaWQiOiI1NTBlODQwMC1lMjliLTQxZDQtYTcxNi00NDY2NTU0NDAwMDEifQ.example-signature
                  summary: Issued tokens
          description: The operation completed successfully.
        '400':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                ValidationError:
                  value:
                    non_field_errors:
                    - The request could not be processed.
                    translation: errors.request.invalid
                  summary: Validation error
          description: The request is malformed or violates a business rule.
  /news:
    get:
      operationId: news_list
      description: Returns the latest customer-facing service announcements and product
        updates, ordered from newest to oldest.
      summary: List product announcements
      parameters:
      - name: limit
        required: false
        in: query
        description: Number of results to return per page.
        schema:
          type: integer
      - name: offset
        required: false
        in: query
        description: The initial index from which to return the results.
        schema:
          type: integer
      - name: ordering
        required: false
        in: query
        description: Which field to use when ordering the results.
        schema:
          type: string
      - name: search
        required: false
        in: query
        description: 'Case-insensitive partial search across News fields: `title`
          and `content`. Separate multiple terms with spaces or commas; every term
          must match at least one listed field.'
        schema:
          type: string
      tags:
      - News
      security:
      - BearerAuth: []
      - StaticAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedNewsList'
              examples:
                example:
                  summary: Example response
                  value:
                    count: 1
                    next: null
                    previous: null
                    results:
                    - id: 550e8400-e29b-41d4-a716-446655440001
                      title: Production integration
                      content: content
                      date: '2026-07-01T12:30:00Z'
          description: The operation completed successfully.
        '400':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                ValidationError:
                  value:
                    non_field_errors:
                    - The request could not be processed.
                    translation: errors.request.invalid
                  summary: Validation error
          description: The request is malformed or violates a business rule.
        '401':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                AuthenticationRequired:
                  value:
                    detail: Authentication credentials were not provided.
                  summary: Authentication required
          description: Authentication credentials are missing, expired, or invalid.
        '403':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                PermissionDenied:
                  value:
                    detail: You do not have permission to perform this action.
                  summary: Permission denied
          description: The authenticated account cannot perform this operation.
  /orders:
    get:
      operationId: orders_list
      description: Returns active package orders owned by the authenticated account.
        Filters can narrow the result by package or user.
      summary: List active orders
      parameters:
      - name: limit
        required: false
        in: query
        description: Number of results to return per page.
        schema:
          type: integer
      - name: offset
        required: false
        in: query
        description: The initial index from which to return the results.
        schema:
          type: integer
      - name: ordering
        required: false
        in: query
        description: Which field to use when ordering the results.
        schema:
          type: string
      - in: query
        name: package__alias
        schema:
          type: string
      - in: query
        name: package__id
        schema:
          type: string
      - in: query
        name: package__type
        schema:
          type: string
          enum:
          - residential
          - static
        description: '* `static` - Static * `residential` - Residential'
      - name: search
        required: false
        in: query
        description: 'Case-insensitive partial search across Order fields: `id`, `alias`,
          `internal_id`, and `proxy_password`. Separate multiple terms with spaces
          or commas; every term must match at least one listed field.'
        schema:
          type: string
      - in: query
        name: user__email
        schema:
          type: string
      - in: query
        name: user__id
        schema:
          type: string
          format: uuid
      tags:
      - Orders
      security:
      - BearerAuth: []
      - StaticAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedOrderList'
              examples:
                example:
                  summary: Example response
                  value:
                    count: 1
                    next: null
                    previous: null
                    results:
                    - id: 550e8400-e29b-41d4-a716-446655440001
                      is_auto_renewal: true
                      auto_renewal_percentage: 1
                      auto_renewal_data: 1
                      package: {}
                      proxy_password: p9W4rT2xK7mQ
                      proxy_password_reset: '2026-07-01T12:30:00Z'
                      pools:
                      - residential
                      data: 1073741824
                      data_remaining: 1
                      data_spent: 1073741824
                      ledgers:
                      - {}
                      latest_data_top_up: 1
                      latest_data_top_up_date: '2026-07-01T12:30:00Z'
                      data_updated: '2026-07-01T12:30:00Z'
                      updated: '2026-07-01T12:30:00Z'
                      created: '2026-07-01T12:30:00Z'
          description: The operation completed successfully.
        '400':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                ValidationError:
                  value:
                    non_field_errors:
                    - The request could not be processed.
                    translation: errors.request.invalid
                  summary: Validation error
          description: The request is malformed or violates a business rule.
        '401':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                AuthenticationRequired:
                  value:
                    detail: Authentication credentials were not provided.
                  summary: Authentication required
          description: Authentication credentials are missing, expired, or invalid.
        '403':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                PermissionDenied:
                  value:
                    detail: You do not have permission to perform this action.
                  summary: Permission denied
          description: The authenticated account cannot perform this operation.
  /orders/{id}:
    get:
      operationId: orders_retrieve
      description: Returns one active order with package, usage, expiration, and proxy
        credential details.
      summary: Get an order
      parameters:
      - in: path
        name: id
        schema:
          type: string
        description: A unique value identifying this Order.
        required: true
      tags:
      - Orders
      security:
      - BearerAuth: []
      - StaticAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderDetailed'
              examples:
                example:
                  summary: Example response
                  value:
                    id: 550e8400-e29b-41d4-a716-446655440001
                    package:
                      id: 550e8400-e29b-41d4-a716-446655440001
                      name: Residential 10 GB
                      alias: residential-10gb
                      is_unlimited_data: true
                      targeting_options:
                        package: package
                        split_char: '-'
                        value_char: '-'
                        continent: continent
                        country: us
                        region: california
                        city: los_angeles
                        asn: '15169'
                        isp: comcast
                        username: developer
                        pool: residential
                        location: location
                        location_format: location format
                        session: session
                        session_mode_tag: session mode tag
                        session_ttl: session ttl
                        session_ttl_format: 1
                        os: os
                        os_combined: true
                        os_split_char: os split char
                        os_linux: os linux
                        os_windows: os windows
                        os_ios: os ios
                        os_macos: os macos
                        os_android: os android
                    is_active: true
                    is_auto_renewal: true
                    auto_renewal_percentage: 1
                    auto_renewal_data: 1
                    user_id: 550e8400-e29b-41d4-a716-446655440001
                    proxy_password: p9W4rT2xK7mQ
                    proxy_password_reset: '2026-07-01T12:30:00Z'
                    pools:
                    - residential
                    data: 1073741824
                    data_spent: 1073741824
                    latest_data_top_up: 1
                    latest_data_top_up_date: '2026-07-01T12:30:00Z'
                    data_updated: '2026-07-01T12:30:00Z'
                    expires: '2026-07-01T12:30:00Z'
          description: The operation completed successfully.
        '401':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                AuthenticationRequired:
                  value:
                    detail: Authentication credentials were not provided.
                  summary: Authentication required
          description: Authentication credentials are missing, expired, or invalid.
        '403':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                PermissionDenied:
                  value:
                    detail: You do not have permission to perform this action.
                  summary: Permission denied
          description: The authenticated account cannot perform this operation.
        '404':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                ResourceNotFound:
                  value:
                    detail: Not found.
                  summary: Resource not found
          description: The requested resource does not exist in the current account
            scope.
        '400':
          description: The request is malformed or violates a business rule.
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                example:
                  summary: Validation error
                  value:
                    non_field_errors:
                    - The request could not be processed.
                    translation: errors.request.invalid
    delete:
      operationId: orders_destroy
      description: Removes an active order owned by a managed sub-user. Remaining
        data is returned to the reseller's matching order when possible.
      summary: Delete a sub-user order
      parameters:
      - in: path
        name: id
        schema:
          type: string
        description: A unique value identifying this Order.
        required: true
      tags:
      - Orders
      security:
      - BearerAuth: []
      - StaticAuth: []
      responses:
        '204':
          description: No response body
        '401':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                AuthenticationRequired:
                  value:
                    detail: Authentication credentials were not provided.
                  summary: Authentication required
          description: Authentication credentials are missing, expired, or invalid.
        '403':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                PermissionDenied:
                  value:
                    detail: You do not have permission to perform this action.
                  summary: Permission denied
          description: The authenticated account cannot perform this operation.
        '404':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                ResourceNotFound:
                  value:
                    detail: Not found.
                  summary: Resource not found
          description: The requested resource does not exist in the current account
            scope.
        '400':
          description: The request is malformed or violates a business rule.
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                example:
                  summary: Validation error
                  value:
                    non_field_errors:
                    - The request could not be processed.
                    translation: errors.request.invalid
  /packages:
    get:
      operationId: packages_list
      description: Returns public packages and private packages already assigned to
        the authenticated account, including pricing and targeting capabilities.
      summary: List available proxy packages
      parameters:
      - in: query
        name: alias
        schema:
          type: string
      - name: limit
        required: false
        in: query
        description: Number of results to return per page.
        schema:
          type: integer
      - name: offset
        required: false
        in: query
        description: The initial index from which to return the results.
        schema:
          type: integer
      - name: ordering
        required: false
        in: query
        description: Which field to use when ordering the results.
        schema:
          type: string
      - in: query
        name: pricing_unit
        schema:
          type: string
          enum:
          - data
          - proxy
        description: Unit customers purchase — determines how the billing model amounts
          are interpreted. * `data` - Data * `proxy` - Proxy
      - name: search
        required: false
        in: query
        description: 'Case-insensitive partial search across Package fields: `name`
          and `alias`. Separate multiple terms with spaces or commas; every term must
          match at least one listed field.'
        schema:
          type: string
      - in: query
        name: type
        schema:
          type: string
          enum:
          - residential
          - static
        description: '* `static` - Static * `residential` - Residential'
      tags:
      - Packages
      security:
      - BearerAuth: []
      - StaticAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedPackageList'
              examples:
                example:
                  summary: Example response
                  value:
                    count: 1
                    next: null
                    previous: null
                    results:
                    - id: 550e8400-e29b-41d4-a716-446655440001
                      name: Residential 10 GB
                      alias: residential-10gb
                      type: static
                      order: 1
                      is_continent_targeting: true
                      is_country_targeting: true
                      is_region_targeting: true
                      is_city_targeting: true
                      is_asn_targeting: true
                      features: []
                      description: description
                      pricing: fixed
                      pricing_unit: data
                      billing_cycle: 1
                      billing_model: {}
                      commission_rate: commission rate
                      commission_type: flexible
                      targeting_options:
                        package: package
                        split_char: '-'
                        value_char: '-'
                        continent: continent
                        country: us
                        region: california
                        city: los_angeles
                        asn: '15169'
                        isp: comcast
                        username: developer
                        pool: residential
                        location: location
                        location_format: location format
                        session: session
                        session_mode_tag: session mode tag
                        session_ttl: session ttl
                        session_ttl_format: 1
                        os: os
                        os_combined: true
                        os_split_char: os split char
                        os_linux: os linux
                        os_windows: os windows
                        os_ios: os ios
                        os_macos: os macos
                        os_android: os android
          description: The operation completed successfully.
        '400':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                ValidationError:
                  value:
                    non_field_errors:
                    - The request could not be processed.
                    translation: errors.request.invalid
                  summary: Validation error
          description: The request is malformed or violates a business rule.
        '401':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                AuthenticationRequired:
                  value:
                    detail: Authentication credentials were not provided.
                  summary: Authentication required
          description: Authentication credentials are missing, expired, or invalid.
        '403':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                PermissionDenied:
                  value:
                    detail: You do not have permission to perform this action.
                  summary: Permission denied
          description: The authenticated account cannot perform this operation.
  /packages/commissions:
    get:
      operationId: packages_commissions_list
      description: Returns commission rates, paid earnings, pending earnings, and
        referred order totals for each package visible to an approved marketer.
      summary: List affiliate package commissions
      parameters:
      - in: query
        name: alias
        schema:
          type: string
      - name: limit
        required: false
        in: query
        description: Number of results to return per page.
        schema:
          type: integer
      - name: offset
        required: false
        in: query
        description: The initial index from which to return the results.
        schema:
          type: integer
      - name: ordering
        required: false
        in: query
        description: Which field to use when ordering the results.
        schema:
          type: string
      - in: query
        name: pricing_unit
        schema:
          type: string
          enum:
          - data
          - proxy
        description: Unit customers purchase — determines how the billing model amounts
          are interpreted. * `data` - Data * `proxy` - Proxy
      - in: query
        name: type
        schema:
          type: string
          enum:
          - residential
          - static
        description: '* `static` - Static * `residential` - Residential'
      tags:
      - Packages
      security:
      - BearerAuth: []
      - StaticAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedPackageCommissionList'
              examples:
                PackageCommissions:
                  value:
                    count: 1
                    next: null
                    previous: null
                    results:
                    - id: 550e8400-e29b-41d4-a716-446655440002
                      name: Residential 10 GB
                      pricing:
                        price: 25
                        currency: USD
                      commission_rate: 10
                      total_earnings: 42.5
                      total_orders: 17
                      pending: 7.5
                      billing_model:
                        type: fixed
                  summary: Package commissions
          description: The operation completed successfully.
        '401':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                AuthenticationRequired:
                  value:
                    detail: Authentication credentials were not provided.
                  summary: Authentication required
          description: Authentication credentials are missing, expired, or invalid.
        '403':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                PermissionDenied:
                  value:
                    detail: You do not have permission to perform this action.
                  summary: Permission denied
          description: The authenticated account cannot perform this operation.
        '400':
          description: The request is malformed or violates a business rule.
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                example:
                  summary: Validation error
                  value:
                    non_field_errors:
                    - The request could not be processed.
                    translation: errors.request.invalid
  /profile:
    get:
      operationId: profile_retrieve
      description: Returns the authenticated account, including contact details and
        the security state needed by account settings screens.
      summary: Get the current profile
      tags:
      - Profile
      security:
      - BearerAuth: []
      - StaticAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/User'
              examples:
                CurrentProfile:
                  value:
                    id: 550e8400-e29b-41d4-a716-446655440001
                    email: developer@example.com
                    username: developer
                    first_name: Dana
                    last_name: Morgan
                    is_active: true
                    is_reseller: false
                    otp_enabled: true
                  summary: Current profile
          description: The operation completed successfully.
        '401':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                AuthenticationRequired:
                  value:
                    detail: Authentication credentials were not provided.
                  summary: Authentication required
          description: Authentication credentials are missing, expired, or invalid.
        '403':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                PermissionDenied:
                  value:
                    detail: You do not have permission to perform this action.
                  summary: Permission denied
          description: The authenticated account cannot perform this operation.
        '400':
          description: The request is malformed or violates a business rule.
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                example:
                  summary: Validation error
                  value:
                    non_field_errors:
                    - The request could not be processed.
                    translation: errors.request.invalid
    patch:
      operationId: profile_partial_update
      description: Updates the supplied profile fields and returns the latest account
        state. Fields omitted from the request are left unchanged.
      summary: Update the current profile
      tags:
      - Profile
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchedProfileUpdateRequest'
            examples:
              UpdateProfile:
                value:
                  first_name: Dana
                  last_name: Morgan
                summary: Update profile
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/PatchedProfileUpdateRequest'
            examples:
              example:
                summary: Example request
                value:
                  email: developer@example.com
                  first_name: Dana
                  last_name: Morgan
                  country: us
                  state: state
                  city: los_angeles
                  address: address
                  zip: zip
                  company_name: company name
                  company_country: company country
                  company_city: company city
                  company_address: company address
                  company_postal_code: company postal code
                  company_vat_number: company vat number
                  blocked_domains:
                  - blocked.example
                  allowed_ips:
                  - 198.51.100.25
                  new_password: New-Secure-Password-43
                  old_password: Previous-Password-42
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/PatchedProfileUpdateRequest'
            examples:
              example:
                summary: Example request
                value:
                  email: developer@example.com
                  first_name: Dana
                  last_name: Morgan
                  country: us
                  state: state
                  city: los_angeles
                  address: address
                  zip: zip
                  company_name: company name
                  company_country: company country
                  company_city: company city
                  company_address: company address
                  company_postal_code: company postal code
                  company_vat_number: company vat number
                  blocked_domains:
                  - blocked.example
                  allowed_ips:
                  - 198.51.100.25
                  new_password: New-Secure-Password-43
                  old_password: Previous-Password-42
      security:
      - BearerAuth: []
      - StaticAuth: []
      responses:
        '202':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/User'
              examples:
                UpdatedProfile:
                  value:
                    id: 550e8400-e29b-41d4-a716-446655440001
                    email: developer@example.com
                    username: developer
                    first_name: Dana
                    last_name: Morgan
                    is_active: true
                    is_reseller: false
                    otp_enabled: true
                  summary: Updated profile
          description: The request was accepted and the updated resource is returned.
        '400':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                ValidationError:
                  value:
                    non_field_errors:
                    - The request could not be processed.
                    translation: errors.request.invalid
                  summary: Validation error
          description: The request is malformed or violates a business rule.
        '401':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                AuthenticationRequired:
                  value:
                    detail: Authentication credentials were not provided.
                  summary: Authentication required
          description: Authentication credentials are missing, expired, or invalid.
        '403':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                PermissionDenied:
                  value:
                    detail: You do not have permission to perform this action.
                  summary: Permission denied
          description: The authenticated account cannot perform this operation.
    delete:
      operationId: profile_destroy
      description: Permanently deletes the authenticated customer account. Superusers
        and reseller sub-accounts cannot delete themselves with this operation.
      summary: Delete the current account
      tags:
      - Profile
      security:
      - BearerAuth: []
      - StaticAuth: []
      responses:
        '204':
          description: No response body
        '401':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                AuthenticationRequired:
                  value:
                    detail: Authentication credentials were not provided.
                  summary: Authentication required
          description: Authentication credentials are missing, expired, or invalid.
        '403':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                PermissionDenied:
                  value:
                    detail: You do not have permission to perform this action.
                  summary: Permission denied
          description: The authenticated account cannot perform this operation.
        '400':
          description: The request is malformed or violates a business rule.
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                example:
                  summary: Validation error
                  value:
                    non_field_errors:
                    - The request could not be processed.
                    translation: errors.request.invalid
  /profile/2fa/confirm:
    post:
      operationId: profile_2fa_confirm_create
      description: Verifies a six-digit TOTP code generated from the pending secret
        and enables two-factor authentication for the account.
      summary: Confirm two-factor setup
      tags:
      - Profile
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TwoFactorConfirmRequest'
            examples:
              ConfirmTOTP:
                value:
                  code: '492031'
                summary: Confirm TOTP
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/TwoFactorConfirmRequest'
            examples:
              example:
                summary: Example request
                value:
                  code: us
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/TwoFactorConfirmRequest'
            examples:
              example:
                summary: Example request
                value:
                  code: us
        required: true
      security:
      - BearerAuth: []
      - StaticAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EnabledResponse'
              examples:
                Two-factorEnabled:
                  value:
                    enabled: true
                  summary: Two-factor enabled
          description: The operation completed successfully.
        '400':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                ValidationError:
                  value:
                    non_field_errors:
                    - The request could not be processed.
                    translation: errors.request.invalid
                  summary: Validation error
          description: The request is malformed or violates a business rule.
        '401':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                AuthenticationRequired:
                  value:
                    detail: Authentication credentials were not provided.
                  summary: Authentication required
          description: Authentication credentials are missing, expired, or invalid.
        '403':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                PermissionDenied:
                  value:
                    detail: You do not have permission to perform this action.
                  summary: Permission denied
          description: The authenticated account cannot perform this operation.
  /profile/2fa/disable:
    post:
      operationId: profile_2fa_disable_create
      description: Verifies a current TOTP code, disables two-factor authentication,
        and removes the stored TOTP secret.
      summary: Disable two-factor authentication
      tags:
      - Profile
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TwoFactorDisableRequest'
            examples:
              DisableTOTP:
                value:
                  code: '492031'
                summary: Disable TOTP
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/TwoFactorDisableRequest'
            examples:
              example:
                summary: Example request
                value:
                  code: us
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/TwoFactorDisableRequest'
            examples:
              example:
                summary: Example request
                value:
                  code: us
        required: true
      security:
      - BearerAuth: []
      - StaticAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EnabledResponse'
              examples:
                Two-factorDisabled:
                  value:
                    enabled: false
                  summary: Two-factor disabled
          description: The operation completed successfully.
        '400':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                ValidationError:
                  value:
                    non_field_errors:
                    - The request could not be processed.
                    translation: errors.request.invalid
                  summary: Validation error
          description: The request is malformed or violates a business rule.
        '401':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                AuthenticationRequired:
                  value:
                    detail: Authentication credentials were not provided.
                  summary: Authentication required
          description: Authentication credentials are missing, expired, or invalid.
        '403':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                PermissionDenied:
                  value:
                    detail: You do not have permission to perform this action.
                  summary: Permission denied
          description: The authenticated account cannot perform this operation.
  /profile/2fa/setup:
    post:
      operationId: profile_2fa_setup_create
      description: Creates a new TOTP secret and provisioning URI. Two-factor authentication
        remains disabled until the code is confirmed.
      summary: Start two-factor setup
      tags:
      - Profile
      security:
      - BearerAuth: []
      - StaticAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TwoFactorSetupResponse'
              examples:
                TOTPSetup:
                  value:
                    secret: JBSWY3DPEHPK3PXP
                    otpauth_url: otpauth://totp/PremiumPorts:developer%40example.com?secret=JBSWY3DPEHPK3PXP&issuer=PremiumPorts
                    qr_png_base64: iVBORw0KGgoAAAANSUhEUgAA...
                  summary: TOTP setup
          description: The operation completed successfully.
        '401':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                AuthenticationRequired:
                  value:
                    detail: Authentication credentials were not provided.
                  summary: Authentication required
          description: Authentication credentials are missing, expired, or invalid.
        '403':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                PermissionDenied:
                  value:
                    detail: You do not have permission to perform this action.
                  summary: Permission denied
          description: The authenticated account cannot perform this operation.
        '400':
          description: The request is malformed or violates a business rule.
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                example:
                  summary: Validation error
                  value:
                    non_field_errors:
                    - The request could not be processed.
                    translation: errors.request.invalid
  /profile/2fa/status:
    get:
      operationId: profile_2fa_status_retrieve
      description: Returns whether TOTP two-factor authentication is enabled for the
        authenticated account.
      summary: Get two-factor status
      tags:
      - Profile
      security:
      - BearerAuth: []
      - StaticAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EnabledResponse'
              examples:
                Two-factorStatus:
                  value:
                    enabled: true
                  summary: Two-factor status
          description: The operation completed successfully.
        '401':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                AuthenticationRequired:
                  value:
                    detail: Authentication credentials were not provided.
                  summary: Authentication required
          description: Authentication credentials are missing, expired, or invalid.
        '403':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                PermissionDenied:
                  value:
                    detail: You do not have permission to perform this action.
                  summary: Permission denied
          description: The authenticated account cannot perform this operation.
        '400':
          description: The request is malformed or violates a business rule.
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                example:
                  summary: Validation error
                  value:
                    non_field_errors:
                    - The request could not be processed.
                    translation: errors.request.invalid
  /profile/change-password:
    post:
      operationId: profile_change_password_create
      description: Verifies the current password, applies the new password, and keeps
        the current authenticated session active.
      summary: Change the account password
      tags:
      - Profile
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ChangePasswordRequest'
            examples:
              ChangePassword:
                value:
                  old_password: Previous-Password-42
                  new_password1: New-Secure-Password-43
                  new_password2: New-Secure-Password-43
                summary: Change password
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/ChangePasswordRequest'
            examples:
              example:
                summary: Example request
                value:
                  old_password: Previous-Password-42
                  new_password1: New-Secure-Password-43
                  new_password2: New-Secure-Password-43
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/ChangePasswordRequest'
            examples:
              example:
                summary: Example request
                value:
                  old_password: Previous-Password-42
                  new_password1: New-Secure-Password-43
                  new_password2: New-Secure-Password-43
        required: true
      security:
      - BearerAuth: []
      - StaticAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageResponse'
              examples:
                PasswordChanged:
                  value:
                    detail: Password changed successfully.
                  summary: Password changed
          description: The operation completed successfully.
        '400':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                ValidationError:
                  value:
                    non_field_errors:
                    - The request could not be processed.
                    translation: errors.request.invalid
                  summary: Validation error
          description: The request is malformed or violates a business rule.
        '401':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                AuthenticationRequired:
                  value:
                    detail: Authentication credentials were not provided.
                  summary: Authentication required
          description: Authentication credentials are missing, expired, or invalid.
        '403':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                PermissionDenied:
                  value:
                    detail: You do not have permission to perform this action.
                  summary: Permission denied
          description: The authenticated account cannot perform this operation.
  /proxies/generate:
    post:
      operationId: proxies_generate_create
      description: Creates ready-to-use proxy credentials for a purchased package.
        Use targeting to choose a location or provider scope, connection to choose
        protocol and output format, and session to control sticky session lifetime.
      summary: Generate proxy credentials
      tags:
      - Proxies
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GenerateProxyRequest'
            examples:
              GenerateHTTPProxiesForACountry:
                value:
                  package_id: 550e8400-e29b-41d4-a716-446655440002
                  quantity: 2
                  targeting:
                    country: us
                    region: california
                    city: los_angeles
                    isp: comcast
                  connection:
                    protocol: http
                    format: '{host}:{port}:{username}:{password}'
                  session:
                    ttl: 60
                summary: Generate HTTP proxies for a country
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/GenerateProxyRequest'
            examples:
              example:
                summary: Example request
                value:
                  package_id: 550e8400-e29b-41d4-a716-446655440002
                  user_id: 550e8400-e29b-41d4-a716-446655440001
                  quantity: 1
                  targeting:
                    continent: continent
                    country: us
                    region: california
                    city: los_angeles
                    pool: residential
                    asn: '15169'
                    isp: comcast
                    os: os
                  connection:
                    protocol: http
                    host: proxy.example.net
                    port: 8000
                    format: '{protocol}://{username}:{password}@{host}:{port}'
                  session:
                    ttl: 3600
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/GenerateProxyRequest'
            examples:
              example:
                summary: Example request
                value:
                  package_id: 550e8400-e29b-41d4-a716-446655440002
                  user_id: 550e8400-e29b-41d4-a716-446655440001
                  quantity: 1
                  targeting:
                    continent: continent
                    country: us
                    region: california
                    city: los_angeles
                    pool: residential
                    asn: '15169'
                    isp: comcast
                    os: os
                  connection:
                    protocol: http
                    host: proxy.example.net
                    port: 8000
                    format: '{protocol}://{username}:{password}@{host}:{port}'
                  session:
                    ttl: 3600
        required: true
      security:
      - BearerAuth: []
      - StaticAuth: []
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenerateProxyResponse'
              examples:
                GeneratedProxyCredentials:
                  value:
                    count: 2
                    proxies:
                    - host: proxy.thepremiumports.com
                      port: 8000
                      protocol: http
                      username: pkg-res-country-us-region-california
                      password: proxy-password
                      connection_string: proxy.thepremiumports.com:8000:pkg-res-country-us-region-california:proxy-password
                  summary: Generated proxy credentials
          description: The resource or action result was created successfully.
        '400':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                ValidationError:
                  value:
                    non_field_errors:
                    - The request could not be processed.
                    translation: errors.request.invalid
                  summary: Validation error
          description: The request is malformed or violates a business rule.
        '401':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                AuthenticationRequired:
                  value:
                    detail: Authentication credentials were not provided.
                  summary: Authentication required
          description: Authentication credentials are missing, expired, or invalid.
        '403':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                PermissionDenied:
                  value:
                    detail: You do not have permission to perform this action.
                  summary: Permission denied
          description: The authenticated account cannot perform this operation.
        '404':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                ResourceNotFound:
                  value:
                    detail: Not found.
                  summary: Resource not found
          description: The requested resource does not exist in the current account
            scope.
  /recover-password:
    post:
      operationId: recover_password_create
      description: Validates the anti-bot token and sends account recovery instructions
        to the supplied email address.
      summary: Send a password recovery email
      tags:
      - Authorization
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RecoverPasswordRequest'
            examples:
              RecoverAccount:
                value:
                  email: developer@example.com
                  token: turnstile-response-token
                summary: Recover account
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/RecoverPasswordRequest'
            examples:
              example:
                summary: Example request
                value:
                  email: developer@example.com
                  token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbl90eXBlIjoiYWNjZXNzIiwidXNlcl9pZCI6IjU1MGU4NDAwLWUyOWItNDFkNC1hNzE2LTQ0NjY1NTQ0MDAwMSJ9.example-signature
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/RecoverPasswordRequest'
            examples:
              example:
                summary: Example request
                value:
                  email: developer@example.com
                  token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbl90eXBlIjoiYWNjZXNzIiwidXNlcl9pZCI6IjU1MGU4NDAwLWUyOWItNDFkNC1hNzE2LTQ0NjY1NTQ0MDAwMSJ9.example-signature
        required: true
      security:
      - {}
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PasswordRecoveryResponse'
              examples:
                RecoveryEmailSent:
                  value:
                    message: Password recovery instructions were sent.
                    email: developer@example.com
                  summary: Recovery email sent
          description: The operation completed successfully.
        '400':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                ValidationError:
                  value:
                    non_field_errors:
                    - The request could not be processed.
                    translation: errors.request.invalid
                  summary: Validation error
          description: The request is malformed or violates a business rule.
  /refresh:
    post:
      operationId: refresh_create
      description: Uses a valid refresh token to issue a new short-lived access token
        for the same account session.
      summary: Refresh an access token
      tags:
      - Authorization
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TokenRefreshRequestRequest'
            examples:
              RefreshToken:
                value:
                  refresh: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbl90eXBlIjoicmVmcmVzaCIsInVzZXJfaWQiOiI1NTBlODQwMC1lMjliLTQxZDQtYTcxNi00NDY2NTU0NDAwMDEifQ.example-signature
                summary: Refresh token
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/TokenRefreshRequestRequest'
            examples:
              example:
                summary: Example request
                value:
                  refresh: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbl90eXBlIjoicmVmcmVzaCIsInVzZXJfaWQiOiI1NTBlODQwMC1lMjliLTQxZDQtYTcxNi00NDY2NTU0NDAwMDEifQ.example-signature
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/TokenRefreshRequestRequest'
            examples:
              example:
                summary: Example request
                value:
                  refresh: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbl90eXBlIjoicmVmcmVzaCIsInVzZXJfaWQiOiI1NTBlODQwMC1lMjliLTQxZDQtYTcxNi00NDY2NTU0NDAwMDEifQ.example-signature
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TokenRefreshResponse'
              examples:
                NewAccessToken:
                  value:
                    access: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbl90eXBlIjoiYWNjZXNzIiwidXNlcl9pZCI6IjU1MGU4NDAwLWUyOWItNDFkNC1hNzE2LTQ0NjY1NTQ0MDAwMSJ9.example-signature
                  summary: New access token
          description: The operation completed successfully.
        '400':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                ValidationError:
                  value:
                    non_field_errors:
                    - The request could not be processed.
                    translation: errors.request.invalid
                  summary: Validation error
          description: The request is malformed or violates a business rule.
        '401':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                AuthenticationRequired:
                  value:
                    detail: Authentication credentials were not provided.
                  summary: Authentication required
          description: Authentication credentials are missing, expired, or invalid.
  /reset-password:
    post:
      operationId: reset_password_create
      description: Rotates the proxy password for the order identified by order_id.
        Existing proxy connection strings stop working after the rotation; use the
        updated proxy password for all new connections.
      summary: Reset an order's proxy password
      tags:
      - Orders
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ResetPasswordRequest'
            examples:
              ResetOrderPassword:
                value:
                  order_id: 550e8400-e29b-41d4-a716-446655440003
                summary: Reset order password
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/ResetPasswordRequest'
            examples:
              example:
                summary: Example request
                value:
                  order_id: 550e8400-e29b-41d4-a716-446655440003
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/ResetPasswordRequest'
            examples:
              example:
                summary: Example request
                value:
                  order_id: 550e8400-e29b-41d4-a716-446655440003
        required: true
      security:
      - {}
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProxyPasswordResetResponse'
              examples:
                PasswordReset:
                  value:
                    message: Password reset successfully.
                    success: true
                  summary: Password reset
          description: The operation completed successfully.
        '400':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                ValidationError:
                  value:
                    non_field_errors:
                    - The request could not be processed.
                    translation: errors.request.invalid
                  summary: Validation error
          description: The request is malformed or violates a business rule.
        '404':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                ResourceNotFound:
                  value:
                    detail: Not found.
                  summary: Resource not found
          description: The requested resource does not exist in the current account
            scope.
  /rewards:
    get:
      operationId: rewards_list
      description: Returns referral and campaign rewards earned by the authenticated
        account, ordered from newest to oldest.
      summary: List account rewards
      parameters:
      - in: query
        name: level
        schema:
          type: string
          enum:
          - diamond
          - gold
          - silver
          - standard
        description: '* `standard` - Standard * `silver` - Silver * `gold` - Gold
          * `diamond` - Diamond'
      - name: limit
        required: false
        in: query
        description: Number of results to return per page.
        schema:
          type: integer
      - name: offset
        required: false
        in: query
        description: The initial index from which to return the results.
        schema:
          type: integer
      - name: ordering
        required: false
        in: query
        description: Which field to use when ordering the results.
        schema:
          type: string
      - in: query
        name: user__email
        schema:
          type: string
      - in: query
        name: user__id
        schema:
          type: string
          format: uuid
      tags:
      - Rewards
      security:
      - BearerAuth: []
      - StaticAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedRewardList'
              examples:
                example:
                  summary: Example response
                  value:
                    count: 1
                    next: null
                    previous: null
                    results:
                    - id: 550e8400-e29b-41d4-a716-446655440001
                      email: developer@example.com
                      created: '2026-07-01T12:30:00Z'
                      balance: 1
                      data: 1073741824
                      status: pending
                      description: description
                      level: standard
          description: The operation completed successfully.
        '400':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                ValidationError:
                  value:
                    non_field_errors:
                    - The request could not be processed.
                    translation: errors.request.invalid
                  summary: Validation error
          description: The request is malformed or violates a business rule.
        '401':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                AuthenticationRequired:
                  value:
                    detail: Authentication credentials were not provided.
                  summary: Authentication required
          description: Authentication credentials are missing, expired, or invalid.
        '403':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                PermissionDenied:
                  value:
                    detail: You do not have permission to perform this action.
                  summary: Permission denied
          description: The authenticated account cannot perform this operation.
  /rewards/claim:
    post:
      operationId: rewards_claim_create
      description: Moves an eligible reward balance or data reward into the customer
        account. Minimum claim thresholds and reward state are validated.
      summary: Claim available rewards
      tags:
      - Rewards
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RewardClaimRequestRequest'
            examples:
              ClaimDataReward:
                value:
                  type: data
                  description: Transfer referral data reward
                summary: Claim data reward
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/RewardClaimRequestRequest'
            examples:
              example:
                summary: Example request
                value:
                  type: type
                  description: description
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/RewardClaimRequestRequest'
            examples:
              example:
                summary: Example request
                value:
                  type: type
                  description: description
        required: true
      security:
      - BearerAuth: []
      - StaticAuth: []
      responses:
        '201':
          description: No response body
        '400':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                ValidationError:
                  value:
                    non_field_errors:
                    - The request could not be processed.
                    translation: errors.request.invalid
                  summary: Validation error
          description: The request is malformed or violates a business rule.
        '401':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                AuthenticationRequired:
                  value:
                    detail: Authentication credentials were not provided.
                  summary: Authentication required
          description: Authentication credentials are missing, expired, or invalid.
        '403':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                PermissionDenied:
                  value:
                    detail: You do not have permission to perform this action.
                  summary: Permission denied
          description: The authenticated account cannot perform this operation.
  /sessions:
    get:
      operationId: sessions_list
      description: Returns sticky proxy session identifiers owned by the authenticated
        username. At most the configured safety limit is returned.
      summary: List active proxy sessions
      tags:
      - Sessions
      security:
      - BearerAuth: []
      - StaticAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/SessionListResponse'
              examples:
                ActiveSessions:
                  value:
                  - count: 2
                    results:
                    - session:developer:residential-us:7f6c1d
                    - session:developer:residential-us:08b3a2
                  summary: Active sessions
          description: The operation completed successfully.
        '400':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                ValidationError:
                  value:
                    non_field_errors:
                    - The request could not be processed.
                    translation: errors.request.invalid
                  summary: Validation error
          description: The request is malformed or violates a business rule.
        '401':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                AuthenticationRequired:
                  value:
                    detail: Authentication credentials were not provided.
                  summary: Authentication required
          description: Authentication credentials are missing, expired, or invalid.
        '403':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                PermissionDenied:
                  value:
                    detail: You do not have permission to perform this action.
                  summary: Permission denied
          description: The authenticated account cannot perform this operation.
  /sessions/{id}:
    delete:
      operationId: sessions_destroy
      description: Deletes matching sticky-session keys owned by the authenticated
        username. The path value is treated as the session identifier fragment.
      summary: Revoke a proxy session
      parameters:
      - in: path
        name: id
        schema:
          type: string
        description: Sticky session identifier or unique suffix.
        required: true
        examples:
          SessionSuffix:
            value: 7f6c1d
            summary: Session suffix
      tags:
      - Sessions
      security:
      - BearerAuth: []
      - StaticAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SessionDeleteResponse'
              examples:
                SessionRevoked:
                  value:
                    deleted: true
                  summary: Session revoked
          description: The operation completed successfully.
        '400':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                ValidationError:
                  value:
                    non_field_errors:
                    - The request could not be processed.
                    translation: errors.request.invalid
                  summary: Validation error
          description: The request is malformed or violates a business rule.
        '401':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                AuthenticationRequired:
                  value:
                    detail: Authentication credentials were not provided.
                  summary: Authentication required
          description: Authentication credentials are missing, expired, or invalid.
        '403':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                PermissionDenied:
                  value:
                    detail: You do not have permission to perform this action.
                  summary: Permission denied
          description: The authenticated account cannot perform this operation.
        '404':
          description: The requested resource does not exist in the current account
            scope.
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                example:
                  summary: Resource not found
                  value:
                    detail: Not found.
  /settings:
    get:
      operationId: settings_retrieve
      description: Returns proxy gateway addresses, account usage totals, referral
        thresholds, and supported crypto currencies for the authenticated account.
      summary: Get account settings
      tags:
      - Settings
      security:
      - BearerAuth: []
      - StaticAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SettingsResponse'
              examples:
                AccountSettings:
                  value:
                    gateways:
                    - id: 550e8400-e29b-41d4-a716-446655440020
                      name: US East
                      region: us-east
                      hostname: proxy.thepremiumports.com
                      hostnames:
                      - us-east-1.proxy.thepremiumports.com
                      - us-east-2.proxy.thepremiumports.com
                      port_http: 8000
                      port_socks5: 1080
                      port_auto: 9000
                      port_haproxy: 9000
                    spent_total: 125.5
                    orders_total: 4
                    orders_active: 2
                    data_available: 10737418240
                    data_spent: 2147483648
                    referrals:
                      reward_balance_percentage: 10
                      reward_data_percentage: 5
                      reward_min_balance: 25
                      reward_min_data: 1073741824
                    crypto:
                      currencies:
                      - BTC
                      - USDT
                  summary: Account settings
          description: The operation completed successfully.
        '401':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                AuthenticationRequired:
                  value:
                    detail: Authentication credentials were not provided.
                  summary: Authentication required
          description: Authentication credentials are missing, expired, or invalid.
        '403':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                PermissionDenied:
                  value:
                    detail: You do not have permission to perform this action.
                  summary: Permission denied
          description: The authenticated account cannot perform this operation.
        '500':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                InternalServiceError:
                  value:
                    non_field_errors:
                    - Internal server error.
                  summary: Internal service error
          description: The service could not complete the operation.
        '400':
          description: The request is malformed or violates a business rule.
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                example:
                  summary: Validation error
                  value:
                    non_field_errors:
                    - The request could not be processed.
                    translation: errors.request.invalid
  /signup:
    post:
      operationId: signup_create
      description: Creates an account after validating the email, password, and Cloudflare
        Turnstile token. Referral and affiliate codes are optional.
      summary: Create a customer account
      tags:
      - Authorization
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SignUpRequest'
            examples:
              CreateAccount:
                value:
                  email: developer@example.com
                  password: Correct-Horse-Battery-Staple-42
                  token: turnstile-response-token
                  referral_code: FRIEND2026
                  affiliate_code: DEVCOMMUNITY
                summary: Create account
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/SignUpRequest'
            examples:
              example:
                summary: Example request
                value:
                  email: developer@example.com
                  password: Correct-Horse-Battery-Staple-42
                  token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbl90eXBlIjoiYWNjZXNzIiwidXNlcl9pZCI6IjU1MGU4NDAwLWUyOWItNDFkNC1hNzE2LTQ0NjY1NTQ0MDAwMSJ9.example-signature
                  affiliate_code: affiliate code
                  referral_code: referral code
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/SignUpRequest'
            examples:
              example:
                summary: Example request
                value:
                  email: developer@example.com
                  password: Correct-Horse-Battery-Staple-42
                  token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbl90eXBlIjoiYWNjZXNzIiwidXNlcl9pZCI6IjU1MGU4NDAwLWUyOWItNDFkNC1hNzE2LTQ0NjY1NTQ0MDAwMSJ9.example-signature
                  affiliate_code: affiliate code
                  referral_code: referral code
        required: true
      security:
      - {}
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TokenPairResponse'
              examples:
                IssuedTokens:
                  value:
                    token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbl90eXBlIjoiYWNjZXNzIiwidXNlcl9pZCI6IjU1MGU4NDAwLWUyOWItNDFkNC1hNzE2LTQ0NjY1NTQ0MDAwMSJ9.example-signature
                    refresh: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbl90eXBlIjoicmVmcmVzaCIsInVzZXJfaWQiOiI1NTBlODQwMC1lMjliLTQxZDQtYTcxNi00NDY2NTU0NDAwMDEifQ.example-signature
                  summary: Issued tokens
          description: The resource or action result was created successfully.
        '400':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                ValidationError:
                  value:
                    non_field_errors:
                    - The request could not be processed.
                    translation: errors.request.invalid
                  summary: Validation error
          description: The request is malformed or violates a business rule.
  /users:
    get:
      operationId: users_list
      description: Returns users visible to the caller. Resellers see their sub-users,
        regular customers see only themselves, and administrators can see all users.
      summary: List users in the current account
      parameters:
      - in: query
        name: email
        schema:
          type: string
      - in: query
        name: id
        schema:
          type: string
          format: uuid
      - name: limit
        required: false
        in: query
        description: Number of results to return per page.
        schema:
          type: integer
      - name: offset
        required: false
        in: query
        description: The initial index from which to return the results.
        schema:
          type: integer
      - name: ordering
        required: false
        in: query
        description: Which field to use when ordering the results.
        schema:
          type: string
      - in: query
        name: package__id
        schema:
          type: string
          format: uuid
        description: Filters the visible user list to accounts that have at least
          one stored order for this package UUID. Orders are matched regardless of
          whether they are active or expired; this filter never expands the caller's
          normal account scope.
        examples:
          ResidentialPackage:
            value: 550e8400-e29b-41d4-a716-446655440002
            summary: Residential package
      - name: search
        required: false
        in: query
        description: 'Case-insensitive partial search across user fields: `email`,
          `username`, `first_name`, and `last_name`. Separate multiple terms with
          spaces or commas; every term must match at least one listed field.'
        schema:
          type: string
      - in: query
        name: username
        schema:
          type: string
      tags:
      - Users
      security:
      - BearerAuth: []
      - StaticAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedUserList'
              examples:
                example:
                  summary: Example response
                  value:
                    count: 1
                    next: null
                    previous: null
                    results:
                    - id: 550e8400-e29b-41d4-a716-446655440001
                      username: developer
                      email: developer@example.com
                      is_reseller: true
                      is_marketer: true
                      is_superuser: true
                      date_joined: '2026-07-01T12:30:00Z'
                      date_joined_ts: 1
                      first_name: Dana
                      last_name: Morgan
                      balance: 1
                      language: en
                      country: us
                      state: state
                      city: los_angeles
                      address: address
                      zip: zip
                      company_name: company name
                      company_address: company address
                      company_city: company city
                      company_postal_code: company postal code
                      company_country: company country
                      company_vat_number: company vat number
                      allowed_ips:
                      - 198.51.100.25
                      blocked_domains:
                      - blocked.example
                      connection_limit: 1
                      parent_id: 550e8400-e29b-41d4-a716-446655440001
                      sub_users: 1
                      referrals: 1
                      referral_id: 550e8400-e29b-41d4-a716-446655440001
                      referral_code: referral code
                      referral_data_earned: 1
                      referral_data_pending: 1
                      referral_balance_pending: 1
                      referral_balance_earned: 1
                      currency: USD
                      coupons:
                      - {}
                      data: 1073741824
                      data_spent: 1073741824
                      data_updated: '2026-07-01T12:30:00Z'
                      proxy_password: p9W4rT2xK7mQ
                      proxy_password_reset: '2026-07-01T12:30:00Z'
          description: The operation completed successfully.
        '400':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                ValidationError:
                  value:
                    non_field_errors:
                    - The request could not be processed.
                    translation: errors.request.invalid
                  summary: Validation error
          description: The request is malformed or violates a business rule.
        '401':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                AuthenticationRequired:
                  value:
                    detail: Authentication credentials were not provided.
                  summary: Authentication required
          description: Authentication credentials are missing, expired, or invalid.
        '403':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                PermissionDenied:
                  value:
                    detail: You do not have permission to perform this action.
                  summary: Permission denied
          description: The authenticated account cannot perform this operation.
    post:
      operationId: users_create
      description: Creates a user owned by the authenticated reseller and returns
        the new account. The caller must be allowed to manage sub-users.
      summary: Create a sub-user
      tags:
      - Users
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserCreateRequest'
            examples:
              example:
                summary: Example request
                value:
                  email: developer@example.com
                  username: developer
                  password: Correct-Horse-Battery-Staple-42
                  first_name: Dana
                  last_name: Morgan
                  country: us
                  state: state
                  city: los_angeles
                  address: address
                  zip: zip
                  blocked_domains:
                  - blocked.example
                  allowed_ips:
                  - 198.51.100.25
                  connection_limit: 1
                  is_reseller: false
                  is_top_level: false
                  data: 1073741824
                  package_id: 550e8400-e29b-41d4-a716-446655440002
                  meta: {}
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/UserCreateRequest'
            examples:
              example:
                summary: Example request
                value:
                  email: developer@example.com
                  username: developer
                  password: Correct-Horse-Battery-Staple-42
                  first_name: Dana
                  last_name: Morgan
                  country: us
                  state: state
                  city: los_angeles
                  address: address
                  zip: zip
                  blocked_domains:
                  - blocked.example
                  allowed_ips:
                  - 198.51.100.25
                  connection_limit: 1
                  is_reseller: false
                  is_top_level: false
                  data: 1073741824
                  package_id: 550e8400-e29b-41d4-a716-446655440002
                  meta: {}
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/UserCreateRequest'
            examples:
              example:
                summary: Example request
                value:
                  email: developer@example.com
                  username: developer
                  password: Correct-Horse-Battery-Staple-42
                  first_name: Dana
                  last_name: Morgan
                  country: us
                  state: state
                  city: los_angeles
                  address: address
                  zip: zip
                  blocked_domains:
                  - blocked.example
                  allowed_ips:
                  - 198.51.100.25
                  connection_limit: 1
                  is_reseller: false
                  is_top_level: false
                  data: 1073741824
                  package_id: 550e8400-e29b-41d4-a716-446655440002
                  meta: {}
        required: true
      security:
      - BearerAuth: []
      - StaticAuth: []
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/User'
              examples:
                CreatedUser:
                  value:
                    id: 550e8400-e29b-41d4-a716-446655440001
                    email: developer@example.com
                    username: developer
                    first_name: Dana
                    last_name: Morgan
                    is_active: true
                    is_reseller: false
                    otp_enabled: true
                  summary: Created user
          description: The resource or action result was created successfully.
        '400':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                ValidationError:
                  value:
                    non_field_errors:
                    - The request could not be processed.
                    translation: errors.request.invalid
                  summary: Validation error
          description: The request is malformed or violates a business rule.
        '401':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                AuthenticationRequired:
                  value:
                    detail: Authentication credentials were not provided.
                  summary: Authentication required
          description: Authentication credentials are missing, expired, or invalid.
        '403':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                PermissionDenied:
                  value:
                    detail: You do not have permission to perform this action.
                  summary: Permission denied
          description: The authenticated account cannot perform this operation.
  /users/{id}:
    get:
      operationId: users_retrieve
      description: Returns a user that is visible within the caller's account scope.
      summary: Get a user
      parameters:
      - in: path
        name: id
        schema:
          type: string
          format: uuid
        description: A UUID string identifying this user.
        required: true
      tags:
      - Users
      security:
      - BearerAuth: []
      - StaticAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/User'
              examples:
                UserDetails:
                  value:
                    id: 550e8400-e29b-41d4-a716-446655440001
                    email: developer@example.com
                    username: developer
                    first_name: Dana
                    last_name: Morgan
                    is_active: true
                    is_reseller: false
                    otp_enabled: true
                  summary: User details
          description: The operation completed successfully.
        '401':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                AuthenticationRequired:
                  value:
                    detail: Authentication credentials were not provided.
                  summary: Authentication required
          description: Authentication credentials are missing, expired, or invalid.
        '403':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                PermissionDenied:
                  value:
                    detail: You do not have permission to perform this action.
                  summary: Permission denied
          description: The authenticated account cannot perform this operation.
        '404':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                ResourceNotFound:
                  value:
                    detail: Not found.
                  summary: Resource not found
          description: The requested resource does not exist in the current account
            scope.
        '400':
          description: The request is malformed or violates a business rule.
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                example:
                  summary: Validation error
                  value:
                    non_field_errors:
                    - The request could not be processed.
                    translation: errors.request.invalid
    patch:
      operationId: users_partial_update
      description: Updates selected fields for a visible user and returns the latest
        account state.
      summary: Update a user
      parameters:
      - in: path
        name: id
        schema:
          type: string
          format: uuid
        description: A UUID string identifying this user.
        required: true
      tags:
      - Users
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchedUserUpdateRequest'
            examples:
              example:
                summary: Example request
                value:
                  email: developer@example.com
                  first_name: Dana
                  last_name: Morgan
                  country: us
                  state: state
                  city: los_angeles
                  address: address
                  zip: zip
                  company_name: company name
                  company_country: company country
                  company_city: company city
                  company_address: company address
                  company_postal_code: company postal code
                  company_vat_number: company vat number
                  is_reseller: true
                  blocked_domains:
                  - blocked.example
                  allowed_ips:
                  - 198.51.100.25
                  connection_limit: 1
                  new_password: New-Secure-Password-43
                  meta: {}
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/PatchedUserUpdateRequest'
            examples:
              example:
                summary: Example request
                value:
                  email: developer@example.com
                  first_name: Dana
                  last_name: Morgan
                  country: us
                  state: state
                  city: los_angeles
                  address: address
                  zip: zip
                  company_name: company name
                  company_country: company country
                  company_city: company city
                  company_address: company address
                  company_postal_code: company postal code
                  company_vat_number: company vat number
                  is_reseller: true
                  blocked_domains:
                  - blocked.example
                  allowed_ips:
                  - 198.51.100.25
                  connection_limit: 1
                  new_password: New-Secure-Password-43
                  meta: {}
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/PatchedUserUpdateRequest'
            examples:
              example:
                summary: Example request
                value:
                  email: developer@example.com
                  first_name: Dana
                  last_name: Morgan
                  country: us
                  state: state
                  city: los_angeles
                  address: address
                  zip: zip
                  company_name: company name
                  company_country: company country
                  company_city: company city
                  company_address: company address
                  company_postal_code: company postal code
                  company_vat_number: company vat number
                  is_reseller: true
                  blocked_domains:
                  - blocked.example
                  allowed_ips:
                  - 198.51.100.25
                  connection_limit: 1
                  new_password: New-Secure-Password-43
                  meta: {}
      security:
      - BearerAuth: []
      - StaticAuth: []
      responses:
        '202':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/User'
              examples:
                UpdatedUser:
                  value:
                    id: 550e8400-e29b-41d4-a716-446655440001
                    email: developer@example.com
                    username: developer
                    first_name: Dana
                    last_name: Morgan
                    is_active: true
                    is_reseller: false
                    otp_enabled: true
                  summary: Updated user
          description: The request was accepted and the updated resource is returned.
        '400':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                ValidationError:
                  value:
                    non_field_errors:
                    - The request could not be processed.
                    translation: errors.request.invalid
                  summary: Validation error
          description: The request is malformed or violates a business rule.
        '401':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                AuthenticationRequired:
                  value:
                    detail: Authentication credentials were not provided.
                  summary: Authentication required
          description: Authentication credentials are missing, expired, or invalid.
        '403':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                PermissionDenied:
                  value:
                    detail: You do not have permission to perform this action.
                  summary: Permission denied
          description: The authenticated account cannot perform this operation.
        '404':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                ResourceNotFound:
                  value:
                    detail: Not found.
                  summary: Resource not found
          description: The requested resource does not exist in the current account
            scope.
    delete:
      operationId: users_destroy
      description: Deletes a user that the authenticated account is allowed to manage.
      summary: Delete a user
      parameters:
      - in: path
        name: id
        schema:
          type: string
          format: uuid
        description: A UUID string identifying this user.
        required: true
      tags:
      - Users
      security:
      - BearerAuth: []
      - StaticAuth: []
      responses:
        '204':
          description: No response body
        '401':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                AuthenticationRequired:
                  value:
                    detail: Authentication credentials were not provided.
                  summary: Authentication required
          description: Authentication credentials are missing, expired, or invalid.
        '403':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                PermissionDenied:
                  value:
                    detail: You do not have permission to perform this action.
                  summary: Permission denied
          description: The authenticated account cannot perform this operation.
        '404':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                ResourceNotFound:
                  value:
                    detail: Not found.
                  summary: Resource not found
          description: The requested resource does not exist in the current account
            scope.
        '400':
          description: The request is malformed or violates a business rule.
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                example:
                  summary: Validation error
                  value:
                    non_field_errors:
                    - The request could not be processed.
                    translation: errors.request.invalid
  /users/{id}/data/add:
    post:
      operationId: users_data_add_create
      description: Adds the requested number of bytes to the selected sub-user's order
        for the supplied package and returns the updated order.
      summary: Add data to a sub-user order
      parameters:
      - in: path
        name: id
        schema:
          type: string
          format: uuid
        description: A UUID string identifying this user.
        required: true
      tags:
      - Users
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AddDataRequest'
            examples:
              AddDataRequest:
                value:
                  package_id: 550e8400-e29b-41d4-a716-446655440002
                  data: 1073741824
                summary: Add data request
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/AddDataRequest'
            examples:
              example:
                summary: Example request
                value:
                  package_id: 550e8400-e29b-41d4-a716-446655440002
                  data: 1073741824
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/AddDataRequest'
            examples:
              example:
                summary: Example request
                value:
                  package_id: 550e8400-e29b-41d4-a716-446655440002
                  data: 1073741824
        required: true
      security:
      - BearerAuth: []
      - StaticAuth: []
      responses:
        '202':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Order'
              examples:
                example:
                  summary: Example response
                  value:
                    id: 550e8400-e29b-41d4-a716-446655440001
                    is_auto_renewal: true
                    auto_renewal_percentage: 1
                    auto_renewal_data: 1
                    package: {}
                    proxy_password: p9W4rT2xK7mQ
                    proxy_password_reset: '2026-07-01T12:30:00Z'
                    pools:
                    - residential
                    data: 1073741824
                    data_remaining: 1
                    data_spent: 1073741824
                    ledgers:
                    - {}
                    latest_data_top_up: 1
                    latest_data_top_up_date: '2026-07-01T12:30:00Z'
                    data_updated: '2026-07-01T12:30:00Z'
                    updated: '2026-07-01T12:30:00Z'
                    created: '2026-07-01T12:30:00Z'
          description: The request was accepted and the updated resource is returned.
        '400':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                ValidationError:
                  value:
                    non_field_errors:
                    - The request could not be processed.
                    translation: errors.request.invalid
                  summary: Validation error
          description: The request is malformed or violates a business rule.
        '401':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                AuthenticationRequired:
                  value:
                    detail: Authentication credentials were not provided.
                  summary: Authentication required
          description: Authentication credentials are missing, expired, or invalid.
        '403':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                PermissionDenied:
                  value:
                    detail: You do not have permission to perform this action.
                  summary: Permission denied
          description: The authenticated account cannot perform this operation.
        '404':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                ResourceNotFound:
                  value:
                    detail: Not found.
                  summary: Resource not found
          description: The requested resource does not exist in the current account
            scope.
  /users/{id}/data/subtract:
    post:
      operationId: users_data_subtract_create
      description: Subtracts the requested number of bytes from the selected sub-user's
        order for the supplied package and returns the updated order.
      summary: Subtract data from a sub-user order
      parameters:
      - in: path
        name: id
        schema:
          type: string
          format: uuid
        description: A UUID string identifying this user.
        required: true
      tags:
      - Users
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SubtractDataRequest'
            examples:
              SubtractDataRequest:
                value:
                  package_id: 550e8400-e29b-41d4-a716-446655440002
                  data: 1073741824
                summary: Subtract data request
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/SubtractDataRequest'
            examples:
              example:
                summary: Example request
                value:
                  package_id: 550e8400-e29b-41d4-a716-446655440002
                  data: 1073741824
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/SubtractDataRequest'
            examples:
              example:
                summary: Example request
                value:
                  package_id: 550e8400-e29b-41d4-a716-446655440002
                  data: 1073741824
        required: true
      security:
      - BearerAuth: []
      - StaticAuth: []
      responses:
        '202':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Order'
              examples:
                example:
                  summary: Example response
                  value:
                    id: 550e8400-e29b-41d4-a716-446655440001
                    is_auto_renewal: true
                    auto_renewal_percentage: 1
                    auto_renewal_data: 1
                    package: {}
                    proxy_password: p9W4rT2xK7mQ
                    proxy_password_reset: '2026-07-01T12:30:00Z'
                    pools:
                    - residential
                    data: 1073741824
                    data_remaining: 1
                    data_spent: 1073741824
                    ledgers:
                    - {}
                    latest_data_top_up: 1
                    latest_data_top_up_date: '2026-07-01T12:30:00Z'
                    data_updated: '2026-07-01T12:30:00Z'
                    updated: '2026-07-01T12:30:00Z'
                    created: '2026-07-01T12:30:00Z'
          description: The request was accepted and the updated resource is returned.
        '400':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                ValidationError:
                  value:
                    non_field_errors:
                    - The request could not be processed.
                    translation: errors.request.invalid
                  summary: Validation error
          description: The request is malformed or violates a business rule.
        '401':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                AuthenticationRequired:
                  value:
                    detail: Authentication credentials were not provided.
                  summary: Authentication required
          description: Authentication credentials are missing, expired, or invalid.
        '403':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                PermissionDenied:
                  value:
                    detail: You do not have permission to perform this action.
                  summary: Permission denied
          description: The authenticated account cannot perform this operation.
        '404':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                ResourceNotFound:
                  value:
                    detail: Not found.
                  summary: Resource not found
          description: The requested resource does not exist in the current account
            scope.
  /users/{id}/orders:
    get:
      operationId: users_orders_list
      description: Returns active package orders allocated to the selected sub-user.
        This operation is available when package-based authentication is enabled.
      summary: List a sub-user's orders
      parameters:
      - in: query
        name: email
        schema:
          type: string
      - in: path
        name: id
        schema:
          type: string
          format: uuid
        description: A UUID string identifying this user.
        required: true
      - in: query
        name: id
        schema:
          type: string
          format: uuid
      - name: limit
        required: false
        in: query
        description: Number of results to return per page.
        schema:
          type: integer
      - name: offset
        required: false
        in: query
        description: The initial index from which to return the results.
        schema:
          type: integer
      - name: ordering
        required: false
        in: query
        description: Which field to use when ordering the results.
        schema:
          type: string
      - in: query
        name: username
        schema:
          type: string
      tags:
      - Users
      security:
      - BearerAuth: []
      - StaticAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedOrderList'
              examples:
                example:
                  summary: Example response
                  value:
                    count: 1
                    next: null
                    previous: null
                    results:
                    - id: 550e8400-e29b-41d4-a716-446655440001
                      is_auto_renewal: true
                      auto_renewal_percentage: 1
                      auto_renewal_data: 1
                      package: {}
                      proxy_password: p9W4rT2xK7mQ
                      proxy_password_reset: '2026-07-01T12:30:00Z'
                      pools:
                      - residential
                      data: 1073741824
                      data_remaining: 1
                      data_spent: 1073741824
                      ledgers:
                      - {}
                      latest_data_top_up: 1
                      latest_data_top_up_date: '2026-07-01T12:30:00Z'
                      data_updated: '2026-07-01T12:30:00Z'
                      updated: '2026-07-01T12:30:00Z'
                      created: '2026-07-01T12:30:00Z'
          description: The operation completed successfully.
        '400':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                ValidationError:
                  value:
                    non_field_errors:
                    - The request could not be processed.
                    translation: errors.request.invalid
                  summary: Validation error
          description: The request is malformed or violates a business rule.
        '401':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                AuthenticationRequired:
                  value:
                    detail: Authentication credentials were not provided.
                  summary: Authentication required
          description: Authentication credentials are missing, expired, or invalid.
        '403':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                PermissionDenied:
                  value:
                    detail: You do not have permission to perform this action.
                  summary: Permission denied
          description: The authenticated account cannot perform this operation.
        '404':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                ResourceNotFound:
                  value:
                    detail: Not found.
                  summary: Resource not found
          description: The requested resource does not exist in the current account
            scope.
  /users/{id}/password:
    post:
      operationId: users_password_create
      description: Rotates the proxy password for the selected user. When package-based
        authentication is enabled, send package_id to select the affected order.
      summary: Rotate a sub-user proxy password
      parameters:
      - in: path
        name: id
        schema:
          type: string
          format: uuid
        description: A UUID string identifying this user.
        required: true
      tags:
      - Users
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserPasswordResetRequestRequest'
            examples:
              RotatePackagePassword:
                value:
                  package_id: 550e8400-e29b-41d4-a716-446655440002
                summary: Rotate package password
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/UserPasswordResetRequestRequest'
            examples:
              example:
                summary: Example request
                value:
                  package_id: 550e8400-e29b-41d4-a716-446655440002
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/UserPasswordResetRequestRequest'
            examples:
              example:
                summary: Example request
                value:
                  package_id: 550e8400-e29b-41d4-a716-446655440002
      security:
      - BearerAuth: []
      - StaticAuth: []
      responses:
        '202':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/User'
              examples:
                UpdatedUser:
                  value:
                    id: 550e8400-e29b-41d4-a716-446655440001
                    email: developer@example.com
                    username: developer
                    first_name: Dana
                    last_name: Morgan
                    is_active: true
                    is_reseller: false
                    otp_enabled: true
                  summary: Updated user
          description: The request was accepted and the updated resource is returned.
        '400':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                ValidationError:
                  value:
                    non_field_errors:
                    - The request could not be processed.
                    translation: errors.request.invalid
                  summary: Validation error
          description: The request is malformed or violates a business rule.
        '401':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                AuthenticationRequired:
                  value:
                    detail: Authentication credentials were not provided.
                  summary: Authentication required
          description: Authentication credentials are missing, expired, or invalid.
        '403':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                PermissionDenied:
                  value:
                    detail: You do not have permission to perform this action.
                  summary: Permission denied
          description: The authenticated account cannot perform this operation.
        '404':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                ResourceNotFound:
                  value:
                    detail: Not found.
                  summary: Resource not found
          description: The requested resource does not exist in the current account
            scope.
  /webhooks:
    get:
      operationId: webhooks_list
      description: Returns webhook destinations configured by the authenticated account,
        including delivery timeouts and retry settings.
      summary: List customer webhooks
      parameters:
      - name: limit
        required: false
        in: query
        description: Number of results to return per page.
        schema:
          type: integer
      - name: offset
        required: false
        in: query
        description: The initial index from which to return the results.
        schema:
          type: integer
      tags:
      - Webhooks
      security:
      - BearerAuth: []
      - StaticAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedWebhookListList'
              examples:
                example:
                  summary: Example response
                  value:
                    count: 1
                    next: null
                    previous: null
                    results:
                    - id: 550e8400-e29b-41d4-a716-446655440001
                      type: user
                      endpoint: https://developer.example.com/webhooks/proxy-events
                      read_timeout: 1
                      write_timeout: 1
                      retries: 1
                      retry_timeout: 1
                      created: '2026-07-01T12:30:00Z'
          description: The operation completed successfully.
        '401':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                AuthenticationRequired:
                  value:
                    detail: Authentication credentials were not provided.
                  summary: Authentication required
          description: Authentication credentials are missing, expired, or invalid.
        '403':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                PermissionDenied:
                  value:
                    detail: You do not have permission to perform this action.
                  summary: Permission denied
          description: The authenticated account cannot perform this operation.
        '400':
          description: The request is malformed or violates a business rule.
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                example:
                  summary: Validation error
                  value:
                    non_field_errors:
                    - The request could not be processed.
                    translation: errors.request.invalid
    post:
      operationId: webhooks_create
      description: Registers an HTTPS destination for a supported event type. Private,
        loopback, and otherwise unsafe destinations are rejected.
      summary: Create a customer webhook
      tags:
      - Webhooks
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookCreateRequest'
            examples:
              CreateDeliveryEndpoint:
                value:
                  type: user
                  endpoint: https://developer.example.com/webhooks/proxy-events
                  read_timeout: 5
                  write_timeout: 5
                  retries: 3
                  retry_timeout: 10
                summary: Create delivery endpoint
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/WebhookCreateRequest'
            examples:
              example:
                summary: Example request
                value:
                  type: user
                  endpoint: https://developer.example.com/webhooks/proxy-events
                  read_timeout: 5
                  write_timeout: 5
                  retries: 3
                  retry_timeout: 10
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/WebhookCreateRequest'
            examples:
              example:
                summary: Example request
                value:
                  type: user
                  endpoint: https://developer.example.com/webhooks/proxy-events
                  read_timeout: 5
                  write_timeout: 5
                  retries: 3
                  retry_timeout: 10
        required: true
      security:
      - BearerAuth: []
      - StaticAuth: []
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookCreated'
              examples:
                example:
                  summary: Example response
                  value:
                    id: 550e8400-e29b-41d4-a716-446655440001
                    type: user
                    endpoint: https://developer.example.com/webhooks/proxy-events
                    secret: secret
                    read_timeout: 1
                    write_timeout: 1
                    retries: 1
                    retry_timeout: 1
                    created: '2026-07-01T12:30:00Z'
          description: The resource or action result was created successfully.
        '400':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                ValidationError:
                  value:
                    non_field_errors:
                    - The request could not be processed.
                    translation: errors.request.invalid
                  summary: Validation error
          description: The request is malformed or violates a business rule.
        '401':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                AuthenticationRequired:
                  value:
                    detail: Authentication credentials were not provided.
                  summary: Authentication required
          description: Authentication credentials are missing, expired, or invalid.
        '403':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                PermissionDenied:
                  value:
                    detail: You do not have permission to perform this action.
                  summary: Permission denied
          description: The authenticated account cannot perform this operation.
  /webhooks/{id}:
    get:
      operationId: webhooks_retrieve
      description: Returns one webhook destination owned by the authenticated account.
      summary: Get a customer webhook
      parameters:
      - in: path
        name: id
        schema:
          type: string
        description: A unique value identifying this Webhook.
        required: true
      tags:
      - Webhooks
      security:
      - BearerAuth: []
      - StaticAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookList'
              examples:
                example:
                  summary: Example response
                  value:
                    id: 550e8400-e29b-41d4-a716-446655440001
                    type: user
                    endpoint: https://developer.example.com/webhooks/proxy-events
                    read_timeout: 1
                    write_timeout: 1
                    retries: 1
                    retry_timeout: 1
                    created: '2026-07-01T12:30:00Z'
          description: The operation completed successfully.
        '401':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                AuthenticationRequired:
                  value:
                    detail: Authentication credentials were not provided.
                  summary: Authentication required
          description: Authentication credentials are missing, expired, or invalid.
        '403':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                PermissionDenied:
                  value:
                    detail: You do not have permission to perform this action.
                  summary: Permission denied
          description: The authenticated account cannot perform this operation.
        '404':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                ResourceNotFound:
                  value:
                    detail: Not found.
                  summary: Resource not found
          description: The requested resource does not exist in the current account
            scope.
        '400':
          description: The request is malformed or violates a business rule.
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                example:
                  summary: Validation error
                  value:
                    non_field_errors:
                    - The request could not be processed.
                    translation: errors.request.invalid
    delete:
      operationId: webhooks_destroy
      description: Stops future event delivery to the selected destination and removes
        the webhook configuration.
      summary: Delete a customer webhook
      parameters:
      - in: path
        name: id
        schema:
          type: string
        description: A unique value identifying this Webhook.
        required: true
      tags:
      - Webhooks
      security:
      - BearerAuth: []
      - StaticAuth: []
      responses:
        '204':
          description: No response body
        '401':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                AuthenticationRequired:
                  value:
                    detail: Authentication credentials were not provided.
                  summary: Authentication required
          description: Authentication credentials are missing, expired, or invalid.
        '403':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                PermissionDenied:
                  value:
                    detail: You do not have permission to perform this action.
                  summary: Permission denied
          description: The authenticated account cannot perform this operation.
        '404':
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                ResourceNotFound:
                  value:
                    detail: Not found.
                  summary: Resource not found
          description: The requested resource does not exist in the current account
            scope.
        '400':
          description: The request is malformed or violates a business rule.
          content:
            application/json:
              schema:
                type: object
                description: Validation and API error payload. Field names may be
                  added dynamically; field errors are returned as arrays of human-readable
                  messages.
                properties:
                  detail:
                    type: string
                  non_field_errors:
                    type: array
                    items:
                      type: string
                  translation:
                    type: string
                    description: Stable translation key suitable for client localisation.
                additionalProperties:
                  oneOf:
                  - type: string
                  - type: array
                    items:
                      type: string
              examples:
                example:
                  summary: Validation error
                  value:
                    non_field_errors:
                    - The request could not be processed.
                    translation: errors.request.invalid
components:
  schemas:
    APIKeyCreate:
      type: object
      properties:
        id:
          type: string
          maxLength: 36
        title:
          type: string
          readOnly: true
        key:
          type: string
          readOnly: true
        allowed_ips:
          type: array
          items:
            type: string
            description: Public IP address or CIDR subnet.
        created:
          type: string
          format: date-time
          readOnly: true
      required:
      - created
      - key
      - title
    APIKeyCreateRequest:
      type: object
      properties:
        id:
          type: string
          minLength: 1
          maxLength: 36
        allowed_ips:
          type: array
          items:
            type: string
            minLength: 1
            description: Public IP address or CIDR subnet.
    APIKeyList:
      type: object
      properties:
        id:
          type: string
          maxLength: 36
        title:
          type: string
          description: Descriptive label that identifies the purpose or owner of this
            API key. Mobile App Dashboard Integration CI Pipeline
          maxLength: 255
        prefix:
          type: string
          readOnly: true
        key:
          type: string
          title: API Key
          description: The API key value used for authentication. Leave blank to have
            it generated automatically on save. Store this value securely.
          maxLength: 500
        allowed_ips:
          type: array
          items:
            type: string
            description: Public IP address or CIDR subnet.
          readOnly: true
        created:
          type: string
          format: date-time
          readOnly: true
        updated:
          type: string
          format: date-time
          readOnly: true
      required:
      - allowed_ips
      - created
      - prefix
      - title
      - updated
    AddDataRequest:
      type: object
      properties:
        package_id:
          type: string
          format: uuid
        data:
          type: integer
          minimum: 1
      required:
      - data
      - package_id
    Affiliate:
      type: object
      properties:
        id:
          type: string
          format: uuid
        email:
          type: string
          readOnly: true
        signup_ip:
          type: string
          nullable: true
          description: IP address from which the user signed up. This field is optional
            and can be used for tracking purposes.
        signup_country:
          type: string
          description: Country from which the user signed up. This field is optional
            and can be used for tracking purposes.
          maxLength: 255
        date_joined:
          type: string
          format: date-time
      required:
      - email
    AffiliateReward:
      type: object
      properties:
        id:
          type: string
          maxLength: 36
        email:
          type: string
          readOnly: true
        status:
          allOf:
          - $ref: '#/components/schemas/RewardStatusEnum'
          description: After changing invoice status to PAID, the invoice will be
            processed and user package created in case none exists. If you need to
            cancel the invoice, make sure to subtract data from the user package after
            changing the invoice status. Changing the status from PAID to any other
            will not affect the user package's data or proxies. * `pending` - Pending
            * `paid` - Paid * `review` - Review * `cancelled` - Cancelled
        package:
          allOf:
          - $ref: '#/components/schemas/PackageShort'
          readOnly: true
        price_total:
          type: integer
          readOnly: true
        data:
          type: integer
          maximum: 1000000000000000
          minimum: 0
          format: int64
          title: Data (bytes)
          description: The amount of data in bytes.
        commission_amount:
          type: integer
          readOnly: true
        created:
          type: string
          format: date-time
          readOnly: true
      required:
      - commission_amount
      - created
      - email
      - package
      - price_total
    AffiliateStatsPoint:
      type: object
      properties:
        date:
          type: string
          format: date
        balance:
          type: number
          format: double
        data:
          type: integer
        count:
          type: integer
    AffiliateStatsResponse:
      type: object
      properties:
        results:
          type: array
          items:
            $ref: '#/components/schemas/AffiliateStatsPoint'
      required:
      - results
    ChangePasswordRequest:
      type: object
      properties:
        old_password:
          type: string
          writeOnly: true
          minLength: 1
        new_password1:
          type: string
          writeOnly: true
          minLength: 1
        new_password2:
          type: string
          writeOnly: true
          minLength: 1
      required:
      - new_password1
      - new_password2
      - old_password
    City:
      type: object
      properties:
        id:
          type: string
          maxLength: 36
        code:
          type: string
          description: Raw city code as it appears in the source data. los_angeles
            paris
          maxLength: 255
        name:
          type: string
          description: English display name of the city used across the admin and
            API responses.
          maxLength: 255
        country:
          allOf:
          - $ref: '#/components/schemas/LocationCountrySummary'
          readOnly: true
        region:
          allOf:
          - $ref: '#/components/schemas/LocationRegionSummary'
          readOnly: true
        isps:
          type: array
          items:
            $ref: '#/components/schemas/LocationCodeName'
          readOnly: true
        asns:
          type: array
          items:
            $ref: '#/components/schemas/LocationCodeName'
          readOnly: true
      required:
      - asns
      - code
      - country
      - isps
      - name
      - region
    CommissionTypeEnum:
      enum:
      - flexible
      - percentage
      - fixed
      type: string
      description: '* `flexible` - Flexible * `percentage` - Percentage * `fixed`
        - Fixed'
    ConnectionRecord:
      type: object
      properties:
        user_id:
          type: string
          format: uuid
        package_id:
          type: string
          format: uuid
        connections:
          type: integer
        server_ip:
          type: string
      required:
      - connections
      - package_id
      - server_ip
      - user_id
    ConnectionsResponse:
      type: object
      properties:
        count:
          type: integer
        next:
          type: string
          format: uri
          nullable: true
        previous:
          type: string
          format: uri
          nullable: true
        results:
          type: array
          items:
            $ref: '#/components/schemas/ConnectionRecord'
      required:
      - count
      - next
      - previous
      - results
    Continent:
      type: object
      properties:
        id:
          type: string
          maxLength: 36
        code:
          type: string
          title: Continent Code
          description: Two-letter ISO 3166-1 alpha-2 country code. Must be unique.
            us de fr
          maxLength: 16
        name:
          type: string
          description: English display name of the country used across the admin and
            API responses.
          maxLength: 255
      required:
      - code
      - name
    Country:
      type: object
      properties:
        id:
          type: string
          maxLength: 36
        code:
          type: string
          title: ISO 3166-1 Alpha-2 Code
          description: Two-letter ISO 3166-1 alpha-2 country code. Must be unique.
            us de fr
          maxLength: 10
        name:
          type: string
          description: English display name of the country used across the admin and
            API responses.
          maxLength: 255
        original_name:
          type: string
          description: Native-language name of the country as it appears in the source
            data. Deutschland Français
          maxLength: 255
        isps:
          type: array
          items:
            $ref: '#/components/schemas/LocationCodeName'
          readOnly: true
        asns:
          type: array
          items:
            $ref: '#/components/schemas/LocationCodeName'
          readOnly: true
      required:
      - asns
      - code
      - isps
      - name
    Coupon:
      type: object
      properties:
        id:
          type: string
          maxLength: 36
        redeemed_count:
          type: integer
          readOnly: true
        is_expired:
          type: boolean
          readOnly: true
        is_redeemed:
          type: boolean
          readOnly: true
        packages:
          type: array
          items:
            $ref: '#/components/schemas/PackageShort'
          readOnly: true
        stats:
          type: object
          additionalProperties: {}
          nullable: true
          readOnly: true
        created:
          type: string
          format: date-time
          readOnly: true
        value:
          type: integer
          maximum: 9223372036854775807
          minimum: -9223372036854775808
          format: int64
          description: Arbitrary coupon value
        code:
          type: string
          readOnly: true
          description: Leaving this field empty will generate a random code.
        is_multi_use:
          type: boolean
          title: Multi-use
          description: If true, coupon can be used multiple times.
        is_available_to_one_time:
          type: boolean
          title: Available for One-Time Purchases
          description: If true, coupon can not be used for one-time package tiers.
        type:
          $ref: '#/components/schemas/CouponTypeEnum'
        limit:
          type: integer
          maximum: 2147483647
          minimum: -2147483648
          description: Number of times coupon can be used
        valid_until:
          type: string
          format: date-time
          nullable: true
          description: Leave empty for coupons that never expire
        marketer:
          type: string
          format: uuid
          nullable: true
          description: The marketer who owns this coupon. Required if is_marketer
            is true.
        user:
          type: string
          format: uuid
          readOnly: true
          nullable: true
          description: The user who created this coupon.
      required:
      - code
      - created
      - is_expired
      - is_redeemed
      - packages
      - redeemed_count
      - stats
      - type
      - user
      - value
    CouponCalculatePriceRequest:
      type: object
      properties:
        package_id:
          type: string
          format: uuid
        coupon_code:
          type: string
          minLength: 1
          maxLength: 64
        data:
          type: integer
          minimum: 1
      required:
      - coupon_code
      - data
    CouponCreateRequest:
      type: object
      properties:
        value:
          type: integer
          maximum: 9223372036854775807
          minimum: -9223372036854775808
          format: int64
          description: Arbitrary coupon value
        code:
          type: string
          description: Leave empty to auto-generate a code
          maxLength: 30
        is_multi_use:
          type: boolean
          title: Multi-use
          description: If true, coupon can be used multiple times.
        is_available_to_one_time:
          type: boolean
          title: Available for One-Time Purchases
          description: If true, coupon can not be used for one-time package tiers.
        marketer:
          type: string
          format: uuid
          nullable: true
          description: The marketer who owns this coupon. Required if is_marketer
            is true.
        type:
          $ref: '#/components/schemas/CouponTypeEnum'
        limit:
          type: integer
          maximum: 2147483647
          minimum: -2147483648
          description: Number of times coupon can be used
        valid_until:
          type: string
          format: date-time
          nullable: true
          description: Leave empty for coupons that never expire
        packages:
          type: array
          items:
            type: string
            minLength: 1
            title: Available for specific packages
          title: Available for specific packages
          description: Select packages for which this coupon is available. If no packages
            are selected, the coupon is available to all packages.
      required:
      - type
      - value
    CouponPriceResponse:
      type: object
      properties:
        price_original:
          type: integer
          description: Original price in the service's smallest currency unit.
        price_discounted:
          type: integer
          description: Price after applying the coupon, in the smallest currency unit.
        discount_percentage:
          type: number
          format: double
      required:
      - discount_percentage
      - price_discounted
      - price_original
    CouponRedeem:
      type: object
      properties:
        id:
          type: string
          maxLength: 36
        user:
          type: string
          format: uuid
        invoice:
          type: string
          nullable: true
        invoice_amount:
          type: number
          format: double
          nullable: true
          readOnly: true
        discount_applied:
          type: number
          format: double
          nullable: true
          readOnly: true
        redeemed_at:
          type: string
          format: date-time
          nullable: true
        created:
          type: string
          format: date-time
          readOnly: true
      required:
      - created
      - discount_applied
      - invoice_amount
      - user
    CouponShort:
      type: object
      properties:
        id:
          type: string
          maxLength: 36
        is_expired:
          type: boolean
          readOnly: true
        is_redeemed:
          type: boolean
          readOnly: true
        packages:
          type: array
          items:
            type: object
            additionalProperties: {}
          readOnly: true
        created:
          type: string
          format: date-time
          readOnly: true
        value:
          type: integer
          maximum: 9223372036854775807
          minimum: -9223372036854775808
          format: int64
          description: Arbitrary coupon value
        code:
          type: string
          readOnly: true
          description: Leaving this field empty will generate a random code.
        is_multi_use:
          type: boolean
          title: Multi-use
          description: If true, coupon can be used multiple times.
        is_available_to_one_time:
          type: boolean
          title: Available for One-Time Purchases
          description: If true, coupon can not be used for one-time package tiers.
        type:
          $ref: '#/components/schemas/CouponTypeEnum'
        limit:
          type: integer
          maximum: 2147483647
          minimum: -2147483648
          description: Number of times coupon can be used
        valid_until:
          type: string
          format: date-time
          nullable: true
          description: Leave empty for coupons that never expire
        marketer:
          type: string
          format: uuid
          nullable: true
          description: The marketer who owns this coupon. Required if is_marketer
            is true.
        user:
          type: string
          format: uuid
          readOnly: true
          nullable: true
          description: The user who created this coupon.
      required:
      - code
      - created
      - is_expired
      - is_redeemed
      - packages
      - type
      - user
      - value
    CouponTypeEnum:
      enum:
      - free_data
      - monetary
      - percentage
      type: string
      description: '* `free_data` - Free Data * `monetary` - Money * `percentage`
        - Percentage'
    CouponUpdateRequest:
      type: object
      properties:
        value:
          type: integer
          maximum: 9223372036854775807
          minimum: -9223372036854775808
          format: int64
          description: Arbitrary coupon value
        code:
          type: string
          minLength: 1
          description: Coupon code cannot be changed if already set
          maxLength: 30
        is_multi_use:
          type: boolean
          title: Multi-use
          description: If true, coupon can be used multiple times.
        is_available_to_one_time:
          type: boolean
          title: Available for One-Time Purchases
          description: If true, coupon can not be used for one-time package tiers.
        marketer:
          type: string
          format: uuid
          nullable: true
          description: The marketer who owns this coupon. Required if is_marketer
            is true.
        type:
          $ref: '#/components/schemas/CouponTypeEnum'
        limit:
          type: integer
          maximum: 2147483647
          minimum: -2147483648
          description: Number of times coupon can be used
        valid_until:
          type: string
          format: date-time
          nullable: true
          description: Leave empty for coupons that never expire
        packages:
          type: array
          items:
            type: string
            minLength: 1
            title: Available for specific packages
          title: Available for specific packages
          description: Select packages for which this coupon is available. If no packages
            are selected, the coupon is available to all packages.
      required:
      - type
      - value
    DomainRecord:
      type: object
      properties:
        hostname:
          type: string
        requests:
          type: integer
        data:
          type: integer
      required:
      - data
      - hostname
      - requests
    DomainsResponse:
      type: object
      properties:
        count:
          type: integer
        next:
          type: string
          format: uri
          nullable: true
        previous:
          type: string
          format: uri
          nullable: true
        timezone:
          type: string
        start:
          type: string
          format: date-time
        end:
          type: string
          format: date-time
        results:
          type: array
          items:
            $ref: '#/components/schemas/DomainRecord'
      required:
      - count
      - end
      - next
      - previous
      - results
      - start
      - timezone
    EnabledResponse:
      type: object
      properties:
        enabled:
          type: boolean
      required:
      - enabled
    FeedRecord:
      type: object
      properties:
        id:
          type: integer
        established_connections:
          type: integer
        reseller_id:
          type: string
        user_id:
          type: string
        package_id:
          type: string
        ledger_id:
          type: string
        username:
          type: string
        user_ip:
          type: string
        server_ip:
          type: string
        data:
          type: integer
        hostname:
          type: string
        protocol:
          type: string
        method:
          type: string
        pool:
          type: string
        is_session:
          type: boolean
        country:
          type: string
        region:
          type: string
        city:
          type: string
        asn:
          type: string
        timestamp:
          type: string
          format: date-time
          nullable: true
      required:
      - asn
      - city
      - country
      - data
      - established_connections
      - hostname
      - id
      - is_session
      - ledger_id
      - method
      - package_id
      - pool
      - protocol
      - region
      - reseller_id
      - server_ip
      - timestamp
      - user_id
      - user_ip
      - username
    FeedResponse:
      type: object
      properties:
        count:
          type: integer
        next:
          type: string
          format: uri
          nullable: true
        previous:
          type: string
          format: uri
          nullable: true
        timezone:
          type: string
        start:
          type: string
          format: date-time
        end:
          type: string
          format: date-time
        results:
          type: array
          items:
            $ref: '#/components/schemas/FeedRecord'
      required:
      - count
      - end
      - next
      - previous
      - results
      - start
      - timezone
    GenerateProxyRequest:
      type: object
      description: Validates proxy generation request data and builds generator config.
      properties:
        package_id:
          type: string
          format: uuid
          description: Package used to generate credentials.
        user_id:
          type: string
          format: uuid
          description: Sub-user that will use the generated credentials.
        quantity:
          type: integer
          description: Number of proxies to generate
          minimum: 1
          maximum: 5000
        targeting:
          $ref: '#/components/schemas/ProxyGenerationTargetingRequest'
        connection:
          $ref: '#/components/schemas/ProxyGenerationConnectionRequest'
        session:
          $ref: '#/components/schemas/ProxyGenerationSessionRequest'
      required:
      - quantity
    GenerateProxyResponse:
      type: object
      properties:
        count:
          type: integer
        proxies:
          type: array
          items:
            $ref: '#/components/schemas/GeneratedProxy'
      required:
      - count
      - proxies
    GeneratedProxy:
      type: object
      properties:
        host:
          type: string
        port:
          type: integer
        protocol:
          type: string
        username:
          type: string
        password:
          type: string
        connection_string:
          type: string
      required:
      - connection_string
      - host
      - password
      - port
      - protocol
      - username
    GoogleAuthRequest:
      type: object
      description: Enhanced Google OAuth authentication with comprehensive security
        validation and user management.
      properties:
        credential:
          type: string
          minLength: 1
          description: Google ID token credential
        client_id:
          type: string
          minLength: 1
          description: Google OAuth client ID
        select_by:
          type: string
          minLength: 1
          description: User selection method
        affiliate_code:
          type: string
          description: Optional affiliate code
          maxLength: 50
        referral_code:
          type: string
          description: Optional referral code
          maxLength: 50
      required:
      - credential
    ISP:
      type: object
      properties:
        code:
          type: string
          title: ISP Code
          description: Unique internal code used to identify this ISP in location
            vocabulary entries and provider routing rules. comcast att deutsche_telekom
          maxLength: 255
        name:
          type: string
          title: ISP Name
          description: Full display name of the Internet Service Provider. Comcast
            Cable Communications AT&T Services
          maxLength: 255
      required:
      - code
      - name
    Invoice:
      type: object
      properties:
        id:
          type: string
          maxLength: 36
        package:
          allOf:
          - $ref: '#/components/schemas/PackageShort'
          readOnly: true
        country:
          allOf:
          - $ref: '#/components/schemas/Country'
          readOnly: true
        user_id:
          type: string
          format: uuid
          readOnly: true
        coupon:
          allOf:
          - $ref: '#/components/schemas/CouponShort'
          readOnly: true
        updated:
          type: string
          format: date-time
          readOnly: true
        created:
          type: string
          format: date-time
          readOnly: true
        type:
          allOf:
          - $ref: '#/components/schemas/InvoiceTypeEnum'
          description: 'The type of invoice, indicating the type of proxy service.
            Options include: RESIDENTIAL: Residential proxies. STATIC: Static proxies.
            * `static` - Static * `residential` - Residential * `balance` - Balance'
        is_one_time:
          type: boolean
          title: One-Time Purchase
          description: Indicates whether this invoice is for a one-time purchase.
            Default is False, meaning it is a recurring invoice.
        is_payout:
          type: boolean
          title: Payout
          description: Indicates whether this invoice is a payout to the marketer.
            Default is False.
        internal_id:
          type: string
          description: A unique identifier for the invoice, generated automatically.
          maxLength: 25
        status:
          allOf:
          - $ref: '#/components/schemas/InvoiceStatusEnum'
          description: After changing invoice status to PAID, the invoice will be
            processed and user package created in case none exists. If you need to
            cancel the invoice, make sure to subtract data from the user package after
            changing the invoice status. Changing the status from PAID to any other
            will not affect the user package's data or proxies. * `pending` - Pending
            * `paid` - Paid * `unpaid` - Unpaid * `error` - Error
        description:
          type: string
          description: A description of the invoice. This field is optional and can
            be left blank.
        connection_limit:
          type: integer
          maximum: 2147483647
          minimum: -1
          description: The maximum number of concurrent connections allowed for this
            package.
        quantity:
          type: integer
          maximum: 2147483647
          minimum: 0
          description: The number of proxies to assign.
        data:
          type: integer
          maximum: 1000000000000000
          minimum: 0
          format: int64
          title: Data (bytes)
          description: The amount of data in bytes.
        balance:
          type: integer
          maximum: 10000000000
          minimum: 0
          format: int64
          title: Balance Top Up (cents)
          description: The balance to top up for the user. Must be zero or positive.
        price_total:
          type: integer
          maximum: 10000000000
          minimum: 1
          format: int64
          title: Price (cents)
          description: The total price of the invoice, including any discounts. Must
            be at least 1 cent.
        gateway:
          allOf:
          - $ref: '#/components/schemas/InvoiceGatewayEnum'
          title: Payment Gateway
          description: The payment gateway used for processing the payment. * `coinbase`
            - Coinbase * `cryptomus` - Cryptomus * `stripe` - Stripe * `coingate`
            - Coingate * `wallet` - Wallet * `manual` - Manual
        payment_url:
          type: string
          format: uri
          description: The URL for making the payment. Optional field with a maximum
            length of 500 characters.
          maxLength: 500
        coingate_order_token:
          type: string
          description: The Coingate order token for the payment. Optional field with
            a maximum length of 255 characters.
          maxLength: 255
        coinbase_charge_id:
          type: string
          description: The Coinbase charge ID for the payment. Optional field with
            a maximum length of 255 characters.
          maxLength: 255
        vat:
          type: number
          format: double
          maximum: 100.0
          minimum: 0.0
          title: VAT (%)
          description: The VAT percentage applied to the invoice. Must be between
            0 and 100.
        company_name:
          type: string
          maxLength: 255
        company_address:
          type: string
          maxLength: 255
        company_city:
          type: string
          maxLength: 255
        company_postal_code:
          type: string
          maxLength: 255
        company_registration_number:
          type: string
          maxLength: 255
        company_vat_number:
          type: string
          maxLength: 255
        paid:
          type: string
          format: date-time
          nullable: true
          description: The date and time when the invoice was paid.
      required:
      - country
      - coupon
      - created
      - package
      - updated
      - user_id
    InvoiceCreateRequestGatewayEnum:
      enum:
      - crypto
      - wallet
      - manual
      - stripe
      type: string
      description: '* `crypto` - crypto * `wallet` - wallet * `manual` - manual *
        `stripe` - stripe'
    InvoiceCreateRequestRequest:
      type: object
      properties:
        package_id:
          type: string
          format: uuid
          description: Package to purchase. Required for package purchases.
        user_id:
          type: string
          format: uuid
          description: Managed sub-user that should receive the purchase.
        gateway:
          $ref: '#/components/schemas/InvoiceCreateRequestGatewayEnum'
        crypto_currency:
          type: string
          minLength: 1
        coupon_code:
          type: string
        country_code:
          type: string
          minLength: 1
          maxLength: 2
        data:
          type: integer
          description: Residential proxy data to purchase, in bytes.
        quantity:
          type: integer
          description: Number of static proxies to purchase.
        amount:
          type: integer
          description: Account balance amount to purchase, in the smallest currency
            unit.
        connection_limit:
          type: integer
          minimum: -1
        expires:
          type: integer
          description: Optional expiration as a Unix timestamp in seconds.
        company_name:
          type: string
          minLength: 1
        company_registration_number:
          type: string
          minLength: 1
        company_vat_number:
          type: string
          minLength: 1
      required:
      - gateway
    InvoiceGatewayEnum:
      enum:
      - coinbase
      - cryptomus
      - stripe
      - coingate
      - wallet
      - manual
      type: string
      description: '* `coinbase` - Coinbase * `cryptomus` - Cryptomus * `stripe` -
        Stripe * `coingate` - Coingate * `wallet` - Wallet * `manual` - Manual'
    InvoiceStatusEnum:
      enum:
      - pending
      - paid
      - unpaid
      - error
      type: string
      description: '* `pending` - Pending * `paid` - Paid * `unpaid` - Unpaid * `error`
        - Error'
    InvoiceTypeEnum:
      enum:
      - static
      - residential
      - balance
      type: string
      description: '* `static` - Static * `residential` - Residential * `balance`
        - Balance'
    LanguageEnum:
      enum:
      - en
      - de
      - fr
      - it
      - ru
      type: string
      description: '* `en` - EN * `de` - DE * `fr` - FR * `it` - IT * `ru` - RU'
    LevelEnum:
      enum:
      - standard
      - silver
      - gold
      - diamond
      type: string
      description: '* `standard` - Standard * `silver` - Silver * `gold` - Gold *
        `diamond` - Diamond'
    LocationASNGeoItem:
      type: object
      properties:
        country:
          $ref: '#/components/schemas/LocationCodeName'
        region:
          $ref: '#/components/schemas/LocationCodeName'
        city:
          $ref: '#/components/schemas/LocationCodeName'
      required:
      - country
    LocationASNRecord:
      type: object
      properties:
        code:
          type: string
        name:
          type: string
        geo:
          type: array
          items:
            $ref: '#/components/schemas/LocationASNGeoItem'
      required:
      - code
      - name
    LocationCodeName:
      type: object
      properties:
        code:
          type: string
        name:
          type: string
      required:
      - code
      - name
    LocationCountrySummary:
      type: object
      properties:
        code:
          type: string
        name:
          type: string
        original_name:
          type: string
      required:
      - code
      - name
    LocationRegionSummary:
      type: object
      properties:
        code:
          type: string
        name:
          type: string
        original_name:
          type: string
      required:
      - code
      - name
    LogRecord:
      type: object
      properties:
        id:
          type: integer
        server_ip:
          type: string
          nullable: true
        user_ip:
          type: string
          nullable: true
        protocol:
          type: string
        method:
          type: string
        user_id:
          type: string
        reseller_id:
          type: string
        username:
          type: string
        hostname:
          type: string
        status_code:
          type: integer
        error_code:
          type: integer
        error_message:
          type: string
        country:
          type: string
        region:
          type: string
        city:
          type: string
        asn:
          type: string
        level:
          type: string
        is_session:
          type: boolean
        timestamp:
          type: string
          format: date-time
        package_id:
          type: string
        package_alias:
          type: string
        ledger_id:
          type: string
      required:
      - asn
      - city
      - country
      - error_code
      - error_message
      - hostname
      - id
      - is_session
      - level
      - method
      - protocol
      - region
      - reseller_id
      - server_ip
      - status_code
      - timestamp
      - user_id
      - user_ip
      - username
    LoginRequestRequest:
      type: object
      properties:
        email:
          type: string
          format: email
          minLength: 1
          description: Account email. Send either email or username.
        username:
          type: string
          minLength: 1
          description: Account username. Send either username or email.
        password:
          type: string
          writeOnly: true
          minLength: 1
          description: Current account password.
      required:
      - password
    LogsResponse:
      type: object
      properties:
        count:
          type: integer
        next:
          type: string
          format: uri
          nullable: true
        previous:
          type: string
          format: uri
          nullable: true
        timezone:
          type: string
        start:
          type: string
          format: date-time
        end:
          type: string
          format: date-time
        results:
          type: array
          items:
            $ref: '#/components/schemas/LogRecord'
      required:
      - count
      - end
      - next
      - previous
      - results
      - start
      - timezone
    MessageResponse:
      type: object
      properties:
        detail:
          type: string
      required:
      - detail
    News:
      type: object
      properties:
        id:
          type: string
          maxLength: 36
        title:
          type: string
          maxLength: 255
        content:
          type: string
          description: The content of the news item. HTML is allowed.
        date:
          type: string
          format: date-time
          title: Publish Date
          description: The date and time when the news item is published.
      required:
      - content
      - title
    Order:
      type: object
      properties:
        id:
          type: string
          maxLength: 36
        is_auto_renewal:
          type: boolean
          readOnly: true
        auto_renewal_percentage:
          type: integer
          maximum: 70
          minimum: 0
          title: Auto Renewal Threshold (%)
          description: When this percentage of the data allowance has been consumed,
            the order is automatically renewed if the user has sufficient balance.
            Set to 0 to disable auto-renewal. 80 → renew when 80% of data is used
        auto_renewal_data:
          type: integer
          maximum: 10000
          minimum: 0
          title: Auto Renewal Data (GB)
          description: Amount of data in GB to add when auto-renewal is triggered.
            Set to 0 to use the package default.
        package:
          type: object
          additionalProperties: {}
          readOnly: true
        proxy_password:
          type: string
          description: Password used by the customer to authenticate proxy connections.
            Auto-generated by default — change only if a custom value is needed. Must
            be between 4 and 64 characters.
          maxLength: 64
        proxy_password_reset:
          type: string
          format: date-time
          nullable: true
          title: Password Last Changed
          description: Timestamp of the last proxy password change. Read-only — updated
            automatically whenever the password is rotated.
        pools:
          type: array
          items:
            type: string
          description: Private proxy pools assigned to this order. Pools restrict
            which proxy IPs are available to this customer. Leave blank to use the
            full provider pool.
        data:
          type: integer
          maximum: 1000000000000000
          minimum: 0
          format: int64
          title: Data Allowance (bytes)
          description: Total data allowance for this order in bytes. 1073741824 =
            1 GiB 10737418240 = 10 GiB
        data_remaining:
          type: integer
          readOnly: true
        data_spent:
          type: integer
          maximum: 9223372036854775807
          minimum: -9223372036854775808
          format: int64
          title: Data Spent (bytes)
          description: Total bytes consumed from this order's data allowance so far.
            Updated in real time as the customer uses the proxy.
        ledgers:
          type: array
          items:
            type: object
            additionalProperties: {}
          readOnly: true
        latest_data_top_up:
          type: integer
          maximum: 9223372036854775807
          minimum: -9223372036854775808
          format: int64
          title: Latest Top-up (bytes)
          description: Amount of data added to this order in bytes during the most
            recent top-up.
        latest_data_top_up_date:
          type: string
          format: date-time
          nullable: true
          title: Latest Top-up Date
          description: Timestamp of the most recent data top-up, set when an invoice
            is fulfilled.
        data_updated:
          type: string
          format: date-time
          readOnly: true
          title: Last Used
        updated:
          type: string
          format: date-time
          readOnly: true
        created:
          type: string
          format: date-time
          readOnly: true
      required:
      - created
      - data_remaining
      - data_updated
      - is_auto_renewal
      - ledgers
      - package
      - updated
    OrderDetailed:
      type: object
      properties:
        id:
          type: string
          maxLength: 36
        package:
          $ref: '#/components/schemas/PackageShort'
        is_active:
          type: boolean
          title: Active
          description: When enabled, the customer can actively use proxies on this
            order. Disable to suspend access without deleting the order.
        is_auto_renewal:
          type: boolean
          readOnly: true
        auto_renewal_percentage:
          type: integer
          maximum: 70
          minimum: 0
          title: Auto Renewal Threshold (%)
          description: When this percentage of the data allowance has been consumed,
            the order is automatically renewed if the user has sufficient balance.
            Set to 0 to disable auto-renewal. 80 → renew when 80% of data is used
        auto_renewal_data:
          type: integer
          maximum: 10000
          minimum: 0
          title: Auto Renewal Data (GB)
          description: Amount of data in GB to add when auto-renewal is triggered.
            Set to 0 to use the package default.
        user_id:
          type: string
          format: uuid
        proxy_password:
          type: string
          description: Password used by the customer to authenticate proxy connections.
            Auto-generated by default — change only if a custom value is needed. Must
            be between 4 and 64 characters.
          maxLength: 64
        proxy_password_reset:
          type: string
          format: date-time
          nullable: true
          title: Password Last Changed
          description: Timestamp of the last proxy password change. Read-only — updated
            automatically whenever the password is rotated.
        pools:
          type: array
          items:
            type: string
          description: Private proxy pools assigned to this order. Pools restrict
            which proxy IPs are available to this customer. Leave blank to use the
            full provider pool.
        data:
          type: integer
          maximum: 1000000000000000
          minimum: 0
          format: int64
          title: Data Allowance (bytes)
          description: Total data allowance for this order in bytes. 1073741824 =
            1 GiB 10737418240 = 10 GiB
        data_spent:
          type: integer
          maximum: 9223372036854775807
          minimum: -9223372036854775808
          format: int64
          title: Data Spent (bytes)
          description: Total bytes consumed from this order's data allowance so far.
            Updated in real time as the customer uses the proxy.
        latest_data_top_up:
          type: integer
          maximum: 9223372036854775807
          minimum: -9223372036854775808
          format: int64
          title: Latest Top-up (bytes)
          description: Amount of data added to this order in bytes during the most
            recent top-up.
        latest_data_top_up_date:
          type: string
          format: date-time
          nullable: true
          title: Latest Top-up Date
          description: Timestamp of the most recent data top-up, set when an invoice
            is fulfilled.
        data_updated:
          type: string
          format: date-time
          readOnly: true
          title: Last Used
        expires:
          type: string
          format: date-time
          nullable: true
          description: Date and time when this order expires and access is revoked.
            Leave blank for orders that do not expire.
      required:
      - data_updated
      - is_auto_renewal
      - package
      - user_id
    OverallPoint:
      type: object
      properties:
        data:
          type: integer
        requests:
          type: integer
        timestamp:
          type: string
          format: date-time
      required:
      - data
      - requests
      - timestamp
    OverallResponse:
      type: object
      properties:
        count:
          type: integer
        next:
          type: string
          format: uri
          nullable: true
        previous:
          type: string
          format: uri
          nullable: true
        timezone:
          type: string
        start:
          type: string
          format: date-time
        end:
          type: string
          format: date-time
        results:
          type: array
          items:
            $ref: '#/components/schemas/OverallPoint'
      required:
      - count
      - end
      - next
      - previous
      - results
      - start
      - timezone
    Package:
      type: object
      properties:
        id:
          type: string
          maxLength: 36
        name:
          type: string
          description: Unique display name for this package shown to customers and
            in the admin. Residential Starter Business Pro
          maxLength: 255
          minLength: 2
        alias:
          type: string
          description: Lowercase alphanumeric identifier used internally for package
            resolution and proxy username routing. Cannot be changed without affecting
            active connections. residential01 bizpro
          pattern: ^[a-z0-9]+$
          maxLength: 255
          minLength: 2
        type:
          $ref: '#/components/schemas/ProxyTypeEnum'
        order:
          type: integer
          maximum: 2147483647
          minimum: 0
          description: Display order in the UI. Lower values appear first.
        is_continent_targeting:
          type: boolean
          title: Continent Targeting
          description: When enabled, users on this package can target proxies by continent.
            If disabled, they will only be able to target by country or city.
        is_country_targeting:
          type: boolean
          title: Country Targeting
          description: Allow users to target a specific country in their proxy username.
            country-us country-de
        is_region_targeting:
          type: boolean
          title: Region Targeting
          description: Allow users to target a specific region in their proxy username.
            Requires country targeting to be enabled. country-us-region-california
        is_city_targeting:
          type: boolean
          title: City Targeting
          description: Allow users to target a specific city in their proxy username.
            Requires country and region targeting to be enabled. country-us-region-california-city-los_angeles
        is_asn_targeting:
          type: boolean
          title: ASN Targeting
          description: Allow users to target a specific ASN in their proxy username.
            ASNs must be configured in the provider's location vocabulary. country-us-asn-3602
        features:
          type: array
          items: {}
          readOnly: true
        description:
          type: string
          description: Customer-facing description shown on the package listing page.
        pricing:
          allOf:
          - $ref: '#/components/schemas/PricingEnum'
          description: Pricing model applied when customers purchase data on this
            package. Fixed a fixed price per data amount — 10 GB for $10, 50 GB for
            $50 Range tiered pricing where the unit price decreases as quantity increases
            * `fixed` - Fixed * `range` - Range
        pricing_unit:
          allOf:
          - $ref: '#/components/schemas/PricingUnitEnum'
          description: Unit customers purchase — determines how the billing model
            amounts are interpreted. * `data` - Data * `proxy` - Proxy
        billing_cycle:
          type: integer
          maximum: 365
          minimum: -1
          title: Billing Cycle (days)
          description: Number of days before purchased data expires. Set to -1 for
            data that never expires. 30 monthly -1 never expires
        billing_model:
          type: object
          additionalProperties: {}
          readOnly: true
        commission_rate:
          type: string
          format: decimal
          pattern: ^-?\d{0,3}(?:\.\d{0,2})?$
          title: Commission Rate (%)
          description: Reseller commission rate as a percentage of the sale price.
            Applies to all purchases of this package. 10.00 → 10% commission on every
            purchase
        commission_type:
          allOf:
          - $ref: '#/components/schemas/CommissionTypeEnum'
          description: How the commission rate is applied to reseller sales. Fixed
            a fixed percentage regardless of sale amount Flexible rate may vary based
            on negotiated reseller terms * `flexible` - Flexible * `percentage` -
            Percentage * `fixed` - Fixed
        targeting_options:
          allOf:
          - $ref: '#/components/schemas/TargetingOptions'
          readOnly: true
      required:
      - alias
      - billing_cycle
      - billing_model
      - features
      - name
      - targeting_options
    PackageCommission:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        pricing: {}
        commission_rate:
          type: number
          format: double
        total_earnings:
          type: number
          format: double
        total_orders:
          type: integer
        pending:
          type: number
          format: double
        billing_model: {}
      required:
      - billing_model
      - commission_rate
      - id
      - name
      - pending
      - pricing
      - total_earnings
      - total_orders
    PackageShort:
      type: object
      properties:
        id:
          type: string
          maxLength: 36
        name:
          type: string
          description: Unique display name for this package shown to customers and
            in the admin. Residential Starter Business Pro
          maxLength: 255
          minLength: 2
        alias:
          type: string
          description: Lowercase alphanumeric identifier used internally for package
            resolution and proxy username routing. Cannot be changed without affecting
            active connections. residential01 bizpro
          pattern: ^[a-z0-9]+$
          maxLength: 255
          minLength: 2
        is_unlimited_data:
          type: boolean
          title: Unlimited Data
          description: When enabled, users on this package have no data cap. The proxy
            will not enforce any bandwidth limit.
        targeting_options:
          allOf:
          - $ref: '#/components/schemas/TargetingOptions'
          readOnly: true
      required:
      - alias
      - name
      - targeting_options
    PaginatedAPIKeyListList:
      type: object
      required:
      - count
      - results
      properties:
        count:
          type: integer
          example: 1
        next:
          type: string
          nullable: true
          format: uri
          example: null
        previous:
          type: string
          nullable: true
          format: uri
          example: null
        results:
          type: array
          items:
            $ref: '#/components/schemas/APIKeyList'
    PaginatedAffiliateList:
      type: object
      required:
      - count
      - results
      properties:
        count:
          type: integer
          example: 1
        next:
          type: string
          nullable: true
          format: uri
          example: null
        previous:
          type: string
          nullable: true
          format: uri
          example: null
        results:
          type: array
          items:
            $ref: '#/components/schemas/Affiliate'
    PaginatedAffiliateRewardList:
      type: object
      required:
      - count
      - results
      properties:
        count:
          type: integer
          example: 1
        next:
          type: string
          nullable: true
          format: uri
          example: null
        previous:
          type: string
          nullable: true
          format: uri
          example: null
        results:
          type: array
          items:
            $ref: '#/components/schemas/AffiliateReward'
    PaginatedCityList:
      type: object
      required:
      - count
      - results
      properties:
        count:
          type: integer
          example: 1
        next:
          type: string
          nullable: true
          format: uri
          example: null
        previous:
          type: string
          nullable: true
          format: uri
          example: null
        results:
          type: array
          items:
            $ref: '#/components/schemas/City'
    PaginatedContinentList:
      type: object
      required:
      - count
      - results
      properties:
        count:
          type: integer
          example: 1
        next:
          type: string
          nullable: true
          format: uri
          example: null
        previous:
          type: string
          nullable: true
          format: uri
          example: null
        results:
          type: array
          items:
            $ref: '#/components/schemas/Continent'
    PaginatedCountryList:
      type: object
      required:
      - count
      - results
      properties:
        count:
          type: integer
          example: 1
        next:
          type: string
          nullable: true
          format: uri
          example: null
        previous:
          type: string
          nullable: true
          format: uri
          example: null
        results:
          type: array
          items:
            $ref: '#/components/schemas/Country'
    PaginatedCouponRedeemList:
      type: object
      required:
      - count
      - results
      properties:
        count:
          type: integer
          example: 1
        next:
          type: string
          nullable: true
          format: uri
          example: null
        previous:
          type: string
          nullable: true
          format: uri
          example: null
        results:
          type: array
          items:
            $ref: '#/components/schemas/CouponRedeem'
    PaginatedCouponShortList:
      type: object
      required:
      - count
      - results
      properties:
        count:
          type: integer
          example: 1
        next:
          type: string
          nullable: true
          format: uri
          example: null
        previous:
          type: string
          nullable: true
          format: uri
          example: null
        results:
          type: array
          items:
            $ref: '#/components/schemas/CouponShort'
    PaginatedISPList:
      type: object
      required:
      - count
      - results
      properties:
        count:
          type: integer
          example: 1
        next:
          type: string
          nullable: true
          format: uri
          example: null
        previous:
          type: string
          nullable: true
          format: uri
          example: null
        results:
          type: array
          items:
            $ref: '#/components/schemas/ISP'
    PaginatedInvoiceList:
      type: object
      required:
      - count
      - results
      properties:
        count:
          type: integer
          example: 1
        next:
          type: string
          nullable: true
          format: uri
          example: null
        previous:
          type: string
          nullable: true
          format: uri
          example: null
        results:
          type: array
          items:
            $ref: '#/components/schemas/Invoice'
    PaginatedLocationASNRecordList:
      type: object
      required:
      - count
      - results
      properties:
        count:
          type: integer
          example: 1
        next:
          type: string
          nullable: true
          format: uri
          example: null
        previous:
          type: string
          nullable: true
          format: uri
          example: null
        results:
          type: array
          items:
            $ref: '#/components/schemas/LocationASNRecord'
    PaginatedNewsList:
      type: object
      required:
      - count
      - results
      properties:
        count:
          type: integer
          example: 1
        next:
          type: string
          nullable: true
          format: uri
          example: null
        previous:
          type: string
          nullable: true
          format: uri
          example: null
        results:
          type: array
          items:
            $ref: '#/components/schemas/News'
    PaginatedOrderList:
      type: object
      required:
      - count
      - results
      properties:
        count:
          type: integer
          example: 1
        next:
          type: string
          nullable: true
          format: uri
          example: null
        previous:
          type: string
          nullable: true
          format: uri
          example: null
        results:
          type: array
          items:
            $ref: '#/components/schemas/Order'
    PaginatedPackageCommissionList:
      type: object
      required:
      - count
      - results
      properties:
        count:
          type: integer
          example: 1
        next:
          type: string
          nullable: true
          format: uri
          example: null
        previous:
          type: string
          nullable: true
          format: uri
          example: null
        results:
          type: array
          items:
            $ref: '#/components/schemas/PackageCommission'
    PaginatedPackageList:
      type: object
      required:
      - count
      - results
      properties:
        count:
          type: integer
          example: 1
        next:
          type: string
          nullable: true
          format: uri
          example: null
        previous:
          type: string
          nullable: true
          format: uri
          example: null
        results:
          type: array
          items:
            $ref: '#/components/schemas/Package'
    PaginatedRegionList:
      type: object
      required:
      - count
      - results
      properties:
        count:
          type: integer
          example: 1
        next:
          type: string
          nullable: true
          format: uri
          example: null
        previous:
          type: string
          nullable: true
          format: uri
          example: null
        results:
          type: array
          items:
            $ref: '#/components/schemas/Region'
    PaginatedRewardList:
      type: object
      required:
      - count
      - results
      properties:
        count:
          type: integer
          example: 1
        next:
          type: string
          nullable: true
          format: uri
          example: null
        previous:
          type: string
          nullable: true
          format: uri
          example: null
        results:
          type: array
          items:
            $ref: '#/components/schemas/Reward'
    PaginatedUserList:
      type: object
      required:
      - count
      - results
      properties:
        count:
          type: integer
          example: 1
        next:
          type: string
          nullable: true
          format: uri
          example: null
        previous:
          type: string
          nullable: true
          format: uri
          example: null
        results:
          type: array
          items:
            $ref: '#/components/schemas/User'
    PaginatedWebhookListList:
      type: object
      required:
      - count
      - results
      properties:
        count:
          type: integer
          example: 1
        next:
          type: string
          nullable: true
          format: uri
          example: null
        previous:
          type: string
          nullable: true
          format: uri
          example: null
        results:
          type: array
          items:
            $ref: '#/components/schemas/WebhookList'
    PasswordRecoveryResponse:
      type: object
      properties:
        message:
          type: string
        email:
          type: string
          format: email
      required:
      - email
      - message
    PatchedCouponUpdateRequest:
      type: object
      properties:
        value:
          type: integer
          maximum: 9223372036854775807
          minimum: -9223372036854775808
          format: int64
          description: Arbitrary coupon value
        code:
          type: string
          minLength: 1
          description: Coupon code cannot be changed if already set
          maxLength: 30
        is_multi_use:
          type: boolean
          title: Multi-use
          description: If true, coupon can be used multiple times.
        is_available_to_one_time:
          type: boolean
          title: Available for One-Time Purchases
          description: If true, coupon can not be used for one-time package tiers.
        marketer:
          type: string
          format: uuid
          nullable: true
          description: The marketer who owns this coupon. Required if is_marketer
            is true.
        type:
          $ref: '#/components/schemas/CouponTypeEnum'
        limit:
          type: integer
          maximum: 2147483647
          minimum: -2147483648
          description: Number of times coupon can be used
        valid_until:
          type: string
          format: date-time
          nullable: true
          description: Leave empty for coupons that never expire
        packages:
          type: array
          items:
            type: string
            minLength: 1
            title: Available for specific packages
          title: Available for specific packages
          description: Select packages for which this coupon is available. If no packages
            are selected, the coupon is available to all packages.
    PatchedProfileUpdateRequest:
      type: object
      description: for updating user profile information with comprehensive validation.
        Handles personal profile data, company information, security settings, and
        password changes. All fields are optional, but at least one field must be
        provided for the update to be valid. Includes validation for domain patterns
        with support for wildcards (*.example.com) and subdomains.
      properties:
        email:
          type: string
          format: email
          minLength: 6
        first_name:
          type: string
          maxLength: 128
        last_name:
          type: string
          maxLength: 128
        country:
          type: string
          maxLength: 128
        state:
          type: string
          maxLength: 128
        city:
          type: string
          maxLength: 128
        address:
          type: string
          maxLength: 128
        zip:
          type: string
          maxLength: 128
        company_name:
          type: string
          maxLength: 128
        company_country:
          type: string
          maxLength: 128
        company_city:
          type: string
          maxLength: 128
        company_address:
          type: string
          maxLength: 128
        company_postal_code:
          type: string
          maxLength: 128
        company_vat_number:
          type: string
          maxLength: 128
        blocked_domains:
          type: array
          items:
            type: string
            minLength: 1
            maxLength: 128
        allowed_ips:
          type: array
          items:
            type: string
            minLength: 1
            maxLength: 128
        new_password:
          type: string
          minLength: 8
          maxLength: 128
        old_password:
          type: string
          minLength: 8
          maxLength: 128
    PatchedUserUpdateRequest:
      type: object
      description: Optional fields accepted when updating part of an existing customer
        account.
      properties:
        email:
          type: string
          format: email
          minLength: 6
          description: User's email address. Must be unique across the system.
        first_name:
          type: string
          description: User's first name.
          maxLength: 128
        last_name:
          type: string
          description: User's last name.
          maxLength: 128
        country:
          type: string
          description: User's country of residence.
          maxLength: 128
        state:
          type: string
          description: User's state or province.
          maxLength: 128
        city:
          type: string
          description: User's city.
          maxLength: 128
        address:
          type: string
          description: User's street address.
          maxLength: 128
        zip:
          type: string
          description: User's postal/ZIP code.
          maxLength: 128
        company_name:
          type: string
          description: Name of the user's company.
          maxLength: 128
        company_country:
          type: string
          description: Country where the company is located.
          maxLength: 128
        company_city:
          type: string
          description: City where the company is located.
          maxLength: 128
        company_address:
          type: string
          description: Company's street address.
          maxLength: 128
        company_postal_code:
          type: string
          description: Company's postal code.
          maxLength: 128
        company_vat_number:
          type: string
          description: Company's VAT number.
          maxLength: 128
        is_reseller:
          type: boolean
          description: Whether the user has reseller privileges. Only superusers can
            modify.
        blocked_domains:
          type: array
          items:
            type: string
            minLength: 1
            maxLength: 128
          description: List of domains to block for this user.
        allowed_ips:
          type: array
          items:
            type: string
            minLength: 1
            maxLength: 128
          description: List of IP addresses allowed for this user. Maximum 10 IPs.
        connection_limit:
          type: integer
          description: Maximum number of concurrent connections allowed for the user.
          minimum: -1
          maximum: 1000000
        new_password:
          type: string
          writeOnly: true
          minLength: 8
          description: New password for the user. Must be 8-128 characters long.
          maxLength: 128
        meta:
          type: object
          additionalProperties: {}
          description: Additional metadata for the user. Maximum 50 fields.
    PaymentLinkResponse:
      type: object
      properties:
        payment_url:
          type: string
          format: uri
          description: Hosted checkout URL for the pending invoice.
      required:
      - payment_url
    PricingEnum:
      enum:
      - fixed
      - range
      type: string
      description: '* `fixed` - Fixed * `range` - Range'
    PricingUnitEnum:
      enum:
      - data
      - proxy
      type: string
      description: '* `data` - Data * `proxy` - Proxy'
    ProtocolEnum:
      enum:
      - http
      - socks5
      - auto
      type: string
      description: '* `http` - http * `socks5` - socks5 * `auto` - auto'
    ProxyGenerationConnectionRequest:
      type: object
      properties:
        protocol:
          allOf:
          - $ref: '#/components/schemas/ProtocolEnum'
          default: http
          description: Proxy protocol. * `http` - http * `socks5` - socks5 * `auto`
            - auto
        host:
          type: string
          description: Gateway host. Leave empty to use the default gateway.
          maxLength: 255
        port:
          type: integer
          description: Gateway port. Leave empty to use the port for the selected
            protocol.
          minimum: 1
          maximum: 65535
        format:
          type: string
          minLength: 1
          default: '{protocol}://{username}:{password}@{host}:{port}'
          description: Connection string format.
    ProxyGenerationSessionRequest:
      type: object
      properties:
        ttl:
          type: integer
          default: 3600
          description: Sticky session lifetime in minutes. Use 0 for rotating sessions.
          minimum: 30
          maximum: 86400
    ProxyGenerationTargetingRequest:
      type: object
      properties:
        continent:
          type: string
          description: Target continent code.
          maxLength: 255
        country:
          type: string
          description: Target country code.
          maxLength: 255
        region:
          type: string
          description: Target region or state code.
          maxLength: 255
        city:
          type: string
          description: Target city code.
          maxLength: 255
        pool:
          type: string
          description: Proxy pool identifier.
          maxLength: 255
        asn:
          type: integer
          description: Target autonomous system number.
          minimum: 0
          maximum: 65536
        isp:
          type: string
          description: Target internet service provider.
          maxLength: 255
        os:
          type: string
          description: 'Target operating system: linux, windows, ios, macos, android.
            Use comma-separated values only when combined OS targeting is enabled.'
          maxLength: 255
    ProxyPasswordResetResponse:
      type: object
      properties:
        message:
          type: string
        success:
          type: boolean
      required:
      - message
      - success
    ProxyTypeEnum:
      enum:
      - static
      - residential
      type: string
      description: '* `static` - Static * `residential` - Residential'
    RecoverPasswordRequest:
      type: object
      description: Password recovery with enhanced security and comprehensive error
        handling.
      properties:
        email:
          type: string
          format: email
          minLength: 1
          description: Email address for password recovery
          maxLength: 255
        token:
          type: string
          writeOnly: true
          description: Cloudflare Turnstile security token
      required:
      - email
      - token
    Region:
      type: object
      properties:
        id:
          type: string
          maxLength: 36
        code:
          type: string
          description: Raw region code as it appears in the source data. Used together
            with country to form a unique identifier. california ile_de_france
          maxLength: 255
        iso31662:
          type: string
          title: ISO 3166-2
          description: ISO 3166-2 subdivision code for this region. US-CA FR-IDF
          maxLength: 10
        name:
          type: string
          description: English display name of the region used across the admin and
            API responses.
          maxLength: 255
        original_name:
          type: string
          description: Native-language name of the region as it appears in the source
            data.
          maxLength: 255
        country:
          allOf:
          - $ref: '#/components/schemas/LocationCountrySummary'
          readOnly: true
        isps:
          type: array
          items:
            $ref: '#/components/schemas/LocationCodeName'
          readOnly: true
        asns:
          type: array
          items:
            $ref: '#/components/schemas/LocationCodeName'
          readOnly: true
      required:
      - asns
      - code
      - country
      - isps
      - name
    ResetPasswordRequest:
      type: object
      properties:
        order_id:
          type: string
          format: uuid
      required:
      - order_id
    Reward:
      type: object
      properties:
        id:
          type: string
          maxLength: 36
        email:
          type: string
          readOnly: true
        created:
          type: string
          format: date-time
          readOnly: true
        balance:
          type: integer
          maximum: 2147483647
          minimum: 0
          title: Balance (cents)
        data:
          type: integer
          maximum: 1000000000000000
          minimum: 0
          format: int64
          title: Data (bytes)
          description: The amount of data in bytes.
        status:
          allOf:
          - $ref: '#/components/schemas/RewardStatusEnum'
          description: After changing invoice status to PAID, the invoice will be
            processed and user package created in case none exists. If you need to
            cancel the invoice, make sure to subtract data from the user package after
            changing the invoice status. Changing the status from PAID to any other
            will not affect the user package's data or proxies. * `pending` - Pending
            * `paid` - Paid * `review` - Review * `cancelled` - Cancelled
        description:
          type: string
          description: Description of the reward, used to include payout details.
        level:
          $ref: '#/components/schemas/LevelEnum'
      required:
      - created
      - email
    RewardClaimRequestRequest:
      type: object
      properties:
        type:
          type: string
          minLength: 1
          description: Reward balance to claim, for example balance or data.
        description:
          type: string
          description: Optional note stored with the claim.
      required:
      - type
    RewardStatusEnum:
      enum:
      - pending
      - paid
      - review
      - cancelled
      type: string
      description: '* `pending` - Pending * `paid` - Paid * `review` - Review * `cancelled`
        - Cancelled'
    SessionDeleteResponse:
      type: object
      properties:
        deleted:
          type: boolean
      required:
      - deleted
    SessionListResponse:
      type: object
      properties:
        count:
          type: integer
        results:
          type: array
          items:
            type: string
      required:
      - count
      - results
    SettingsCrypto:
      type: object
      properties:
        currencies:
          type: array
          items:
            type: string
      required:
      - currencies
    SettingsGateway:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        region:
          type: string
        hostname:
          type: string
        hostnames:
          type: array
          items:
            type: string
        port_http:
          type: integer
        port_socks5:
          type: integer
        port_auto:
          type: integer
        port_haproxy:
          type: integer
      required:
      - hostname
      - hostnames
      - id
      - name
      - port_auto
      - port_haproxy
      - port_http
      - port_socks5
      - region
    SettingsReferral:
      type: object
      properties:
        reward_balance_percentage:
          type: number
          format: double
        reward_data_percentage:
          type: number
          format: double
        reward_min_balance:
          type: number
          format: double
        reward_min_data:
          type: number
          format: double
      required:
      - reward_balance_percentage
      - reward_data_percentage
      - reward_min_balance
      - reward_min_data
    SettingsResponse:
      type: object
      properties:
        gateways:
          type: array
          items:
            $ref: '#/components/schemas/SettingsGateway'
        spent_total:
          type: number
          format: double
        orders_total:
          type: integer
        orders_active:
          type: integer
        data_available:
          type: integer
        data_spent:
          type: integer
        referrals:
          $ref: '#/components/schemas/SettingsReferral'
        crypto:
          $ref: '#/components/schemas/SettingsCrypto'
      required:
      - crypto
      - data_available
      - data_spent
      - gateways
      - orders_active
      - orders_total
      - referrals
      - spent_total
    SignUpRequest:
      type: object
      description: Comprehensive user registration with enhanced validation, security
        measures, and referral/affiliate code handling.
      properties:
        email:
          type: string
          format: email
          minLength: 1
          description: Valid email address for account creation
          maxLength: 255
        password:
          type: string
          writeOnly: true
          minLength: 1
          description: Strong password meeting security requirements
        token:
          type: string
          writeOnly: true
          minLength: 1
          description: Cloudflare Turnstile security token
        affiliate_code:
          type: string
          description: Optional affiliate referral code
          maxLength: 50
        referral_code:
          type: string
          description: Optional user referral code
          maxLength: 50
      required:
      - email
      - password
      - token
    SubtractDataRequest:
      type: object
      properties:
        package_id:
          type: string
          format: uuid
        data:
          type: integer
          minimum: 1
      required:
      - data
      - package_id
    TargetingOptions:
      type: object
      properties:
        package:
          type: string
        split_char:
          type: string
        value_char:
          type: string
        continent:
          type: string
        country:
          type: string
        region:
          type: string
        city:
          type: string
        asn:
          type: string
        isp:
          type: string
        username:
          type: string
        pool:
          type: string
        location:
          type: string
        location_format:
          type: string
        session:
          type: string
        session_mode_tag:
          type: string
        session_ttl:
          type: string
        session_ttl_format:
          type: integer
        os:
          type: string
        os_combined:
          type: boolean
        os_split_char:
          type: string
        os_linux:
          type: string
        os_windows:
          type: string
        os_ios:
          type: string
        os_macos:
          type: string
        os_android:
          type: string
      required:
      - asn
      - city
      - continent
      - country
      - isp
      - location
      - location_format
      - os
      - os_android
      - os_combined
      - os_ios
      - os_linux
      - os_macos
      - os_split_char
      - os_windows
      - package
      - pool
      - region
      - session
      - session_mode_tag
      - session_ttl
      - session_ttl_format
      - split_char
      - username
      - value_char
    TokenPairResponse:
      type: object
      properties:
        token:
          type: string
          description: Short-lived access token used in the Authorization header.
        refresh:
          type: string
          description: Long-lived token used to request a new access token.
      required:
      - refresh
      - token
    TokenRefreshRequestRequest:
      type: object
      properties:
        refresh:
          type: string
          minLength: 1
          description: A valid refresh token.
      required:
      - refresh
    TokenRefreshResponse:
      type: object
      properties:
        access:
          type: string
          description: New access token for the same account session.
      required:
      - access
    TransactionRecord:
      type: object
      properties:
        sender_uuid:
          type: string
          nullable: true
        recipient_uuid:
          type: string
          nullable: true
        type:
          type: integer
        amount:
          type: integer
        package_uuid:
          type: string
          nullable: true
        details:
          type: string
          nullable: true
        date:
          type: string
          format: date-time
          nullable: true
        timestamp:
          type: string
          format: date-time
          nullable: true
      required:
      - amount
      - date
      - details
      - package_uuid
      - recipient_uuid
      - sender_uuid
      - timestamp
      - type
    TransactionsResponse:
      type: object
      properties:
        count:
          type: integer
        next:
          type: string
          format: uri
          nullable: true
        previous:
          type: string
          format: uri
          nullable: true
        timezone:
          type: string
        start:
          type: string
          format: date-time
        end:
          type: string
          format: date-time
        results:
          type: array
          items:
            $ref: '#/components/schemas/TransactionRecord'
      required:
      - count
      - end
      - next
      - previous
      - results
      - start
      - timezone
    TwoFactorConfirmRequest:
      type: object
      properties:
        code:
          type: string
          minLength: 6
          maxLength: 8
      required:
      - code
    TwoFactorDisableRequest:
      type: object
      properties:
        code:
          type: string
          minLength: 6
          maxLength: 8
      required:
      - code
    TwoFactorSetupResponse:
      type: object
      properties:
        secret:
          type: string
        otpauth_url:
          type: string
        qr_png_base64:
          type: string
      required:
      - otpauth_url
      - secret
    User:
      type: object
      description: Customer account with contact details, security settings, package
        data, referral information, and managed sub-users visible to the caller.
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
        username:
          type: string
          description: Value must contain only letters, numbers, and underscores.
            It must not start or end with an underscore.
          maxLength: 150
        email:
          type: string
          format: email
          maxLength: 254
        is_reseller:
          type: boolean
          title: Reseller
          description: Reseller can create sub-users and manage their data.
        is_marketer:
          type: boolean
          title: Marketer
          description: Marketer can manage marketing campaigns and view analytics.
        is_superuser:
          type: boolean
          title: Superuser status
          description: Designates that this user has all permissions without explicitly
            assigning them.
        date_joined:
          type: string
          format: date-time
          readOnly: true
        date_joined_ts:
          type: integer
          description: Timestamp of when the user joined
          readOnly: true
        first_name:
          type: string
          maxLength: 150
        last_name:
          type: string
          maxLength: 150
        balance:
          type: integer
          maximum: 2147483647
          minimum: 0
        language:
          $ref: '#/components/schemas/LanguageEnum'
        country:
          type: string
          maxLength: 255
        state:
          type: string
          maxLength: 255
        city:
          type: string
          maxLength: 255
        address:
          type: string
          maxLength: 255
        zip:
          type: string
          maxLength: 255
        company_name:
          type: string
          maxLength: 255
        company_address:
          type: string
          maxLength: 255
        company_city:
          type: string
          maxLength: 255
        company_postal_code:
          type: string
          maxLength: 255
        company_country:
          type: string
          maxLength: 255
        company_vat_number:
          type: string
          maxLength: 255
        allowed_ips:
          type: array
          items:
            type: string
          description: List of IP addresses allowed for this user
          readOnly: true
        blocked_domains:
          type: array
          items:
            type: string
          description: List of domains blocked for this user
          readOnly: true
        connection_limit:
          type: integer
          maximum: 2147483647
          minimum: -1
          description: The maximum number of concurrent connections allowed for this
            package.
        parent_id:
          type: string
          description: ID of the parent user (for sub-accounts)
          readOnly: true
        sub_users:
          type: integer
          description: Number of sub-users managed by this reseller
          readOnly: true
        referrals:
          type: integer
          description: Number of users referred by this user
          readOnly: true
        referral_id:
          type: string
          maxLength: 255
        referral_code:
          type: string
          readOnly: true
        referral_data_earned:
          type: integer
          readOnly: true
        referral_data_pending:
          type: integer
          readOnly: true
        referral_balance_pending:
          type: integer
          readOnly: true
        referral_balance_earned:
          type: integer
          readOnly: true
        currency:
          type: object
          additionalProperties:
            type: string
          description: Currency information for the user's transactions
          readOnly: true
        coupons:
          type: array
          items:
            type: object
            additionalProperties: {}
          description: Available coupons for this user
          readOnly: true
        data:
          type: integer
          nullable: true
          description: Available data allowance for the user
          readOnly: true
        data_spent:
          type: integer
          nullable: true
          description: Amount of data consumed by the user
          readOnly: true
        data_updated:
          type: string
          format: date-time
          nullable: true
          description: Last update timestamp for user's data
          readOnly: true
        proxy_password:
          type: string
          nullable: true
          description: Proxy authentication password
          readOnly: true
        proxy_password_reset:
          type: string
          format: date-time
          nullable: true
          description: Last proxy password reset timestamp
          readOnly: true
      required:
      - allowed_ips
      - blocked_domains
      - coupons
      - currency
      - data
      - data_spent
      - data_updated
      - date_joined
      - date_joined_ts
      - email
      - id
      - parent_id
      - proxy_password
      - proxy_password_reset
      - referral_balance_earned
      - referral_balance_pending
      - referral_code
      - referral_data_earned
      - referral_data_pending
      - referrals
      - sub_users
      - username
    UserCreateRequest:
      type: object
      description: Fields accepted when a reseller or administrator creates a customer
        account.
      properties:
        email:
          type: string
          format: email
          description: User's email address. Must be unique if provided.
        username:
          type: string
          minLength: 4
          description: Unique username for the account. Must be 4-128 characters.
          maxLength: 128
        password:
          type: string
          writeOnly: true
          minLength: 8
          description: Account password. Must be 8-128 characters long.
          maxLength: 128
        first_name:
          type: string
          description: User's first name.
          maxLength: 128
        last_name:
          type: string
          description: User's last name.
          maxLength: 128
        country:
          type: string
          description: User's country of residence.
          maxLength: 128
        state:
          type: string
          description: User's state or province.
          maxLength: 128
        city:
          type: string
          description: User's city.
          maxLength: 128
        address:
          type: string
          description: User's street address.
          maxLength: 128
        zip:
          type: string
          description: User's postal/ZIP code.
          maxLength: 128
        blocked_domains:
          type: array
          items:
            type: string
            minLength: 1
            maxLength: 128
          description: List of domains to block for this user.
        allowed_ips:
          type: array
          items:
            type: string
            minLength: 1
            maxLength: 128
          description: List of IP addresses allowed for this user. Maximum 10 IPs.
        connection_limit:
          type: integer
          description: Maximum number of concurrent connections allowed for the user.
          minimum: -1
          maximum: 1000000
        is_reseller:
          type: boolean
          default: false
          description: Whether the user should have reseller privileges. Only superusers
            can create resellers.
        is_top_level:
          type: boolean
          default: false
          description: Whether the user is a sub-user under the parent account.
        data:
          type: integer
          minimum: 0
          description: Initial data allocation for the user (traditional auth mode
            only).
        package_id:
          type: string
          format: uuid
          description: Package ID to assign to the user (package-based auth mode only).
        meta:
          type: object
          additionalProperties: {}
          description: Additional metadata for the user. Maximum 50 fields.
      required:
      - password
      - username
    UserPasswordResetRequestRequest:
      type: object
      properties:
        package_id:
          type: string
          format: uuid
          description: Package whose proxy password should be rotated. Required only
            when package-based authentication is enabled.
    WebhookCreateRequest:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/WebhookScopeEnum'
        endpoint:
          type: string
          format: uri
          minLength: 1
          maxLength: 500
        read_timeout:
          type: integer
          maximum: 60
          minimum: 1
          default: 5
        write_timeout:
          type: integer
          maximum: 60
          minimum: 1
          default: 5
        retries:
          type: integer
          maximum: 10
          minimum: 0
          default: 3
        retry_timeout:
          type: integer
          maximum: 300
          minimum: 1
          default: 10
      required:
      - endpoint
      - type
    WebhookCreated:
      type: object
      properties:
        id:
          type: string
          maxLength: 36
        type:
          allOf:
          - $ref: '#/components/schemas/WebhookScopeEnum'
          description: Context in which this webhook operates. Determines which events
            are delivered. User events scoped to the associated user account Reseller
            events scoped to the reseller and their sub-accounts System platform-wide
            system events * `user` - User * `reseller` - Reseller * `system` - System
        endpoint:
          type: string
          format: uri
          title: Endpoint URL
          description: HTTPS URL that receives webhook POST requests when events are
            triggered. https://example.com/webhooks/proxy The endpoint must be publicly
            accessible and respond within the configured read timeout.
          maxLength: 500
        secret:
          type: string
          title: Signing Secret
          description: Secret used to sign each webhook payload. The receiving endpoint
            should verify the signature to confirm the request originated from this
            platform. Auto-generated if left blank. Store this value securely on the
            receiving end.
          maxLength: 255
        read_timeout:
          type: integer
          maximum: 60
          minimum: 1
          title: Read Timeout (seconds)
          description: Maximum time to wait for the endpoint to return a response.
            Requests that exceed this limit are treated as failed and may be retried.
        write_timeout:
          type: integer
          maximum: 60
          minimum: 1
          title: Write Timeout (seconds)
          description: Maximum time to wait while sending the payload to the endpoint.
            Requests that exceed this limit are treated as failed and may be retried.
        retries:
          type: integer
          maximum: 10
          minimum: 0
          description: Number of additional delivery attempts after an initial failure.
            Set to 0 to disable retries. 3 → up to 4 total delivery attempts
        retry_timeout:
          type: integer
          maximum: 300
          minimum: 1
          title: Retry Interval (seconds)
          description: How long to wait before each retry attempt after a failed delivery.
            10 → retry after 10 seconds
        created:
          type: string
          format: date-time
          readOnly: true
      required:
      - created
      - endpoint
    WebhookList:
      type: object
      properties:
        id:
          type: string
          maxLength: 36
        type:
          allOf:
          - $ref: '#/components/schemas/WebhookScopeEnum'
          description: Context in which this webhook operates. Determines which events
            are delivered. User events scoped to the associated user account Reseller
            events scoped to the reseller and their sub-accounts System platform-wide
            system events * `user` - User * `reseller` - Reseller * `system` - System
        endpoint:
          type: string
          format: uri
          title: Endpoint URL
          description: HTTPS URL that receives webhook POST requests when events are
            triggered. https://example.com/webhooks/proxy The endpoint must be publicly
            accessible and respond within the configured read timeout.
          maxLength: 500
        read_timeout:
          type: integer
          maximum: 60
          minimum: 1
          title: Read Timeout (seconds)
          description: Maximum time to wait for the endpoint to return a response.
            Requests that exceed this limit are treated as failed and may be retried.
        write_timeout:
          type: integer
          maximum: 60
          minimum: 1
          title: Write Timeout (seconds)
          description: Maximum time to wait while sending the payload to the endpoint.
            Requests that exceed this limit are treated as failed and may be retried.
        retries:
          type: integer
          maximum: 10
          minimum: 0
          description: Number of additional delivery attempts after an initial failure.
            Set to 0 to disable retries. 3 → up to 4 total delivery attempts
        retry_timeout:
          type: integer
          maximum: 300
          minimum: 1
          title: Retry Interval (seconds)
          description: How long to wait before each retry attempt after a failed delivery.
            10 → retry after 10 seconds
        created:
          type: string
          format: date-time
          readOnly: true
      required:
      - created
      - endpoint
    WebhookScopeEnum:
      enum:
      - user
      - reseller
      - system
      type: string
      description: '* `user` - User * `reseller` - Reseller * `system` - System'
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: 'Send `Authorization: Bearer YOUR_JWT`. API keys are also accepted
        with the Bearer prefix for compatibility with server integrations.'
    StaticAuth:
      type: apiKey
      in: header
      name: Authorization
      description: 'Send `Authorization: Static YOUR_API_KEY`.'
servers:
- url: https://{host}/api/v1
  description: API endpoint for the selected deployment.
  variables:
    host:
      default: api.proxyrequest.com
      description: API hostname assigned to the deployment.
tags:
- name: Authorization
  description: Sign in, create accounts, recover access, and refresh access tokens.
- name: Users
  description: Manage users and sub-users that belong to the current account.
- name: Profile
  description: Read and update the authenticated account and its security settings.
- name: Orders
  description: Review purchased packages, allocated data, and proxy credentials.
- name: Proxies
  description: Generate ready-to-use proxy credentials for an active order.
- name: Analytics
  description: Inspect proxy traffic, connections, domains, errors, and data transactions.
- name: Invoices
  description: Create purchases and inspect invoices, payment links, and receipts.
- name: Coupons
  description: Create, validate, redeem, and inspect discount coupons.
- name: Rewards
  description: Inspect and claim account rewards.
- name: Affiliates
  description: Inspect referred accounts and affiliate earnings.
- name: Packages
  description: Browse available proxy products, pricing, and targeting capabilities.
- name: Locations
  description: Browse locations, networks, and providers available for proxy targeting.
- name: API Keys
  description: Create and revoke API keys for server-to-server integrations.
- name: Webhooks
  description: Configure customer webhook destinations and delivery behaviour.
- name: Sessions
  description: Inspect and revoke active sticky proxy sessions.
- name: Settings
  description: Read gateway addresses, usage totals, and account-wide configuration.
- name: News
  description: Read product and service announcements.
