UserTold.ai Billing API

The Billing API from UserTold.ai, for billing.

GitHub OpenAPI

Operations 4

GET /api/billing Billing Status #
GET /api/billing/events Billing Events #
GET /api/billing/interviews Billing Interviews #
POST /api/billing/checkout Billing Checkout #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/usertold-ai:usertold-ai-billing-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

usertold-ai-billing-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: UserTold.ai Billing API
  version: 1.0.0
  description: The /api/... routes are stable major version 1 without a version-selection header. Backward-compatible additions remain in v1; breaking changes require /api/v2. Before removal, migration guidance and Deprecation plus Link rel=deprecation are published; scheduled removal includes Sunset at least 90 days ahead. No REST route is currently deprecated.
tags:
- name: Billing
paths:
  /api/billing:
    get:
      operationId: billingStatus
      summary: Billing Status
      description: Execute the UserTold billing status operation.
      tags:
      - Billing
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  prepaid_balance_cents:
                    type: number
                  ledger_balance_cents:
                    type: number
                  reconciliation_difference_cents:
                    type: number
                  ledger_reconciled:
                    type: boolean
                  managed_rate_cents_per_minute:
                    type: number
                  byok_rate_cents_per_minute:
                    type: number
                  has_payment_method:
                    type: boolean
                  billed_interview_count:
                    type: number
                  gross_interview_charges_cents:
                    type: number
                  interview_refunds_cents:
                    type: number
                  net_interview_charges_cents:
                    type: number
                  polar_configured:
                    type: boolean
                  project_billing_modes:
                    type: array
                    items:
                      type: object
                      properties:
                        project_ref:
                          type:
                          - string
                          - 'null'
                        project_name:
                          type: string
                        project_handle:
                          type: string
                        org_handle:
                          type:
                          - string
                          - 'null'
                        canonical_path:
                          type:
                          - string
                          - 'null'
                        billing_mode:
                          type: string
                          enum:
                          - managed
                          - byok
                      required:
                      - project_ref
                      - project_name
                      - project_handle
                      - org_handle
                      - canonical_path
                      - billing_mode
                required:
                - prepaid_balance_cents
                - ledger_balance_cents
                - reconciliation_difference_cents
                - ledger_reconciled
                - managed_rate_cents_per_minute
                - byok_rate_cents_per_minute
                - has_payment_method
                - billed_interview_count
                - gross_interview_charges_cents
                - interview_refunds_cents
                - net_interview_charges_cents
                - polar_configured
                - project_billing_modes
        '401':
          description: Not authenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '422':
          description: Domain error (non-retryable)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '503':
          description: Domain error (retryable)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
  /api/billing/events:
    get:
      operationId: billingEvents
      summary: Billing Events
      description: Execute the UserTold billing events operation.
      tags:
      - Billing
      parameters:
      - schema:
          type: string
        required: false
        name: limit
        in: query
      - schema:
          type: string
        required: false
        name: offset
        in: query
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  events:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        user_id:
                          type: number
                        session_id:
                          type:
                          - string
                          - 'null'
                        project_ref:
                          type:
                          - string
                          - 'null'
                        event_type:
                          type: string
                        display_label:
                          type: string
                        display_kind:
                          type: string
                          enum:
                          - purchase
                          - bonus
                          - usage
                          - refund
                          - opening
                          - other
                        amount_direction:
                          type: string
                          enum:
                          - credit
                          - debit
                          - neutral
                        balance_delta_cents:
                          type: number
                        signed_amount_cents:
                          type: number
                        external_reference:
                          type:
                          - string
                          - 'null'
                        created_at:
                          type: string
                      required:
                      - id
                      - user_id
                      - session_id
                      - project_ref
                      - event_type
                      - display_label
                      - display_kind
                      - amount_direction
                      - balance_delta_cents
                      - signed_amount_cents
                      - external_reference
                      - created_at
                  total:
                    type: number
                required:
                - events
                - total
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                - error
        '401':
          description: Not authenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '422':
          description: Domain error (non-retryable)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '503':
          description: Domain error (retryable)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
  /api/billing/interviews:
    get:
      operationId: billingInterviews
      summary: Billing Interviews
      description: Execute the UserTold billing interviews operation.
      tags:
      - Billing
      parameters:
      - schema:
          type: string
        required: false
        name: limit
        in: query
      - schema:
          type: string
        required: false
        name: offset
        in: query
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  interviews:
                    type: array
                    items:
                      type: object
                      properties:
                        session_id:
                          type: string
                        project_ref:
                          type:
                          - string
                          - 'null'
                        billing_mode:
                          type: string
                          enum:
                          - managed
                          - byok
                        duration_seconds:
                          type:
                          - number
                          - 'null'
                        billable_seconds:
                          type:
                          - number
                          - 'null'
                        rate_cents_per_minute:
                          type: number
                        minimum_charge_cents:
                          type: number
                        subtotal_cents:
                          type:
                          - number
                          - 'null'
                        charge_cents:
                          type:
                          - number
                          - 'null'
                        refund_cents:
                          type:
                          - number
                          - 'null'
                        minimum_adjustment_cents:
                          type:
                          - number
                          - 'null'
                        net_charge_cents:
                          type:
                          - number
                          - 'null'
                        status:
                          type: string
                          enum:
                          - pending
                          - charged
                          - refunded
                          - excluded
                        exclusion_reason:
                          type:
                          - string
                          - 'null'
                          enum:
                          - abandoned
                          - error
                          - missing_transcript
                          - missing_duration
                          - null
                        quoted_at:
                          type: string
                        charged_at:
                          type:
                          - string
                          - 'null'
                      required:
                      - session_id
                      - project_ref
                      - billing_mode
                      - duration_seconds
                      - billable_seconds
                      - rate_cents_per_minute
                      - minimum_charge_cents
                      - subtotal_cents
                      - charge_cents
                      - refund_cents
                      - minimum_adjustment_cents
                      - net_charge_cents
                      - status
                      - exclusion_reason
                      - quoted_at
                      - charged_at
                  total:
                    type: number
                required:
                - interviews
                - total
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                - error
        '401':
          description: Not authenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '422':
          description: Domain error (non-retryable)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '503':
          description: Domain error (retryable)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
  /api/billing/checkout:
    post:
      operationId: billingCheckout
      summary: Billing Checkout
      description: Execute the UserTold billing checkout operation.
      tags:
      - Billing
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                success_url:
                  type: string
                pack:
                  type: number
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  url:
                    type: string
                required:
                - url
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                - error
        '401':
          description: Not authenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '422':
          description: Domain error (non-retryable)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '503':
          description: Domain error (retryable)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
components:
  schemas:
    ApiErrorResponse:
      type: object
      properties:
        error:
          type: string
        code:
          type: string
        retryable:
          type: boolean
        action:
          type: string
        requestId:
          type: string
      required:
      - error
externalDocs:
  description: REST versioning, deprecation, and rate-limit policy
  url: https://usertold.ai/docs/api#versioning-and-deprecation
x-api-lifecycle:
  majorVersion: 1
  versioning: implicit
  currentPathPrefix: /api
  nextBreakingPathPrefix: /api/v2
  versionSelectionHeader: null
  deprecated: false
  minimumSunsetNoticeDays: 90
  deprecationHeaders:
  - Deprecation
  - Link
  - Sunset
  policyUrl: https://usertold.ai/docs/api#versioning-and-deprecation