> ## Documentation Index
> Fetch the complete documentation index at: https://docs.getcurrent.ca/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Search

> Create a new business verification search. Plural-form alias of
`POST /search` — identical request and response. See `POST /search` for
the full set of request examples (website analysis, sanctions, etc.).




## OpenAPI

````yaml /openapi.yaml post /searches
openapi: 3.1.0
info:
  title: Current Business Verification API
  version: 1.0.0
  description: >
    The Current API provides programmatic access to Canadian business
    verification services.


    ## Authentication

    All API requests require authentication via API key. Include your key using
    one of these methods:

    - `Authorization: Bearer cur_live_xxxxx` (recommended)

    - `X-API-Key: cur_live_xxxxx`


    ## Rate Limits

    All endpoints are rate limited to **60 requests per minute** per API key.


    Rate limit headers are included in all responses:

    - `X-RateLimit-Limit`: Maximum requests allowed in current window

    - `X-RateLimit-Remaining`: Remaining requests in current window

    - `X-RateLimit-Reset`: Unix timestamp when the rate limit resets


    ## Request IDs

    All responses include an `X-Request-Id` header for traceability.

    You can provide your own via the `X-Request-Id` request header; otherwise
    one is generated automatically.

    Include this ID when contacting support about a specific request.
  contact:
    name: Current Support
    url: https://getcurrent.ca
  license:
    name: Proprietary
servers:
  - url: https://api.getcurrent.ca/v1
    description: Production
security:
  - bearerAuth: []
  - apiKeyHeader: []
tags:
  - name: Search
    description: Business verification search operations
  - name: Pre-fill
    description: Fast typeahead lookup of canonical business candidates
  - name: Generate PDF
    description: PDF report generation
  - name: Business Reports
    description: Business report operations
  - name: Sanctions
    description: Standalone sanctions screening operations
  - name: Verification
    description: Business verification operations
  - name: Businesses
    description: >-
      Business record sync (list/read as a change feed, upsert to keep records
      current)
paths:
  /searches:
    post:
      tags:
        - Search
      summary: Create Search
      description: |
        Create a new business verification search. Plural-form alias of
        `POST /search` — identical request and response. See `POST /search` for
        the full set of request examples (website analysis, sanctions, etc.).
      operationId: createSearchAlias
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SearchRequest'
            examples:
              basic:
                summary: Basic search (defaults applied)
                value:
                  name: Shopify Inc
              byBusinessId:
                summary: Search a stored business record by ID
                value:
                  businessId: f47ac10b-58cc-4372-a567-0e02b2c3d479
      responses:
        '200':
          description: Search result
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
      security:
        - bearerAuth: []
        - apiKeyHeader: []
components:
  schemas:
    SearchRequest:
      type: object
      anyOf:
        - required:
            - name
        - required:
            - businessId
        - required:
            - businessExternalId
      description: >
        Provide a `name` to search, or a `businessId` / `businessExternalId` to
        run the search against one of your stored business records. Any check
        flag omitted from the request falls back to your account's configured
        search settings (managed by an owner or admin in the dashboard); an
        explicit value in the request overrides that default.
      properties:
        name:
          type: string
          description: >
            Name of the company to search. Required unless `businessId` is
            provided, in which case it is taken from that record. A `name` in
            the request overrides the record's name for this search only.
          example: Shopify Inc
        website:
          type: string
          format: uri
          description: >
            Company website URL for additional analysis. When `businessId` is
            provided and this is omitted, the record's website is used.
          example: https://shopify.com
        businessId:
          type: string
          format: uuid
          description: >
            Run the search against one of your existing business records. Its
            name and website are used when omitted from the request, and the
            full record is snapshotted so the search's comparison / discrepancy
            view diffs the registry results against it. Must reference a
            business owned by your tenant, otherwise the request fails with `404
            NOT_FOUND`.
        businessExternalId:
          type: string
          description: >
            Your own id for one of your stored business records (the
            `external_id` you set via CSV import or the businesses API).
            Resolves to that record exactly like `businessId` does —
            name/website are hydrated from it and the record is snapshotted for
            comparison. Unknown id → `404 NOT_FOUND`. If both `businessId` and
            `businessExternalId` are supplied they must point at the same
            record, otherwise `400`.
        businessRegistry:
          type: boolean
          description: >
            Enable business registry search (provincial and federal). If
            omitted, uses your account's configured search settings.
        regulatoryRegistry:
          type: boolean
          description: >
            Enable regulatory registry search (charities, MSB, cannabis). If
            omitted, uses your account's configured search settings.
        regulatoryRegistryThreshold:
          type: integer
          minimum: 70
          maximum: 100
          description: >
            Minimum confidence score (70-100) for regulatory registry matches.
            If omitted, uses your account's configured search settings.
        sanctionsScreening:
          type: boolean
          description: >
            Enable sanctions screening against global watchlists. If omitted,
            uses your account's configured search settings.
        sanctionsThreshold:
          type: integer
          minimum: 70
          maximum: 100
          description: >
            Minimum confidence score (70-100) for sanctions matches. If omitted,
            uses your account's configured search settings.
        websiteAnalysis:
          type: boolean
          description: >
            Enable website scraping and analysis. If omitted, uses your
            account's configured search settings.
    SearchResponse:
      type: object
      required:
        - meta
        - businesses
        - regulatory
      properties:
        meta:
          $ref: '#/components/schemas/SearchMeta'
        businesses:
          type: array
          items:
            $ref: '#/components/schemas/BusinessResult'
          description: Business registry results sorted by match confidence
        regulatory:
          $ref: '#/components/schemas/RegulatoryRegistrations'
        sanctions:
          type: object
          nullable: true
          description: >-
            Sanctions screening results — null when sanctionsScreening is not
            enabled
          required:
            - query
            - totalMatches
            - matches
          properties:
            query:
              type: string
              description: The name that was screened
            totalMatches:
              type: integer
              minimum: 0
              description: Total number of matched entities
            matches:
              type: array
              items:
                $ref: '#/components/schemas/SanctionsMatch'
              description: Matched entities sorted by match confidence (highest first)
        website:
          $ref: '#/components/schemas/WebsiteAnalysis'
        errors:
          $ref: '#/components/schemas/SearchErrors'
    SearchMeta:
      type: object
      required:
        - searchId
        - searchedAt
        - submitted
        - status
      properties:
        searchId:
          type: string
          format: uuid
          description: >-
            Unique search identifier — use with GET /search/{id} to retrieve
            this result later
        searchedBy:
          type: string
          format: email
          nullable: true
          description: >-
            Email address of the user who ran the search (API key searches may
            be null)
        searchedAt:
          type: string
          format: date-time
          description: When the search was executed
        submitted:
          type: object
          required:
            - name
            - params
          properties:
            name:
              type: string
              description: Original search query
            website:
              type: string
              format: uri
              nullable: true
              description: Website URL if provided
            params:
              $ref: '#/components/schemas/SearchParams'
        status:
          type: string
          enum:
            - completed
            - loading
            - error
            - completed-with-errors
          description: >-
            'completed-with-errors' means at least one source succeeded; check
            errors for details
        duration:
          type: integer
          description: Search duration in milliseconds
    BusinessResult:
      type: object
      description: Business registry result
      required:
        - legalName
        - match
        - registrationNumbers
      properties:
        legalName:
          $ref: '#/components/schemas/LegalName'
        match:
          $ref: '#/components/schemas/BusinessMatch'
        entityType:
          type: string
          description: Type of business entity (e.g., Corporation, Partnership)
        jurisdiction:
          type: string
          description: Registration jurisdiction (e.g., "Federal", "Ontario")
        status:
          type: string
          description: Entity status (e.g., "Active", "Dissolved")
        incorporationDate:
          type: string
          description: Date of incorporation (YYYY-MM-DD)
        registrationNumbers:
          type: array
          items:
            $ref: '#/components/schemas/RegistrationNumber'
        addresses:
          type: array
          items:
            $ref: '#/components/schemas/Address'
        alternateNames:
          type: array
          items:
            type: string
          description: Operating names, DBA names, and aliases
        people:
          type: array
          items:
            $ref: '#/components/schemas/BusinessPerson'
          description: Named individuals associated with this registry record
        sourceUrl:
          type: string
          format: uri
          nullable: true
          description: Direct link to the official registry record
        businessReport:
          type:
            - object
            - 'null'
          description: Embedded business report data (when available for this business)
          required:
            - people
            - addresses
            - details
            - reportUrl
          properties:
            people:
              type: array
              items:
                $ref: '#/components/schemas/BusinessReportPerson'
              description: Directors, officers, and shareholders (empty array if none)
            addresses:
              type: array
              items:
                $ref: '#/components/schemas/Address'
              description: Business addresses with type labels (empty array if none)
            details:
              $ref: '#/components/schemas/BusinessReportDetails'
            reportUrl:
              type:
                - string
                - 'null'
              description: >-
                Persistent URL to download the business report PDF (requires API
                key auth)
            reportUrlExpiresAt:
              type:
                - string
                - 'null'
              format: date-time
              description: >-
                ISO 8601 timestamp when the reportUrl signed URL expires (~5
                years from generation)
    RegulatoryRegistrations:
      type: object
      description: >-
        Regulatory registry matches — each key is a flat array (empty when no
        matches)
      required:
        - craCharities
        - fintracMsb
        - agcoCannabis
        - healthCanadaCannabis
        - mohServiceProviders
        - bankOfCanadaRps
        - wsibClassifications
        - onBusinessLicences
        - torontoBusinessLicences
        - vancouverBusinessLicences
        - rbqLicences
      properties:
        craCharities:
          type: array
          items:
            $ref: '#/components/schemas/RegulatoryResult'
          description: CRA registered charities
        fintracMsb:
          type: array
          items:
            $ref: '#/components/schemas/RegulatoryResult'
          description: FINTRAC registered money services businesses
        agcoCannabis:
          type: array
          items:
            $ref: '#/components/schemas/RegulatoryResult'
          description: AGCO licensed cannabis retailers (Ontario)
        healthCanadaCannabis:
          type: array
          items:
            $ref: '#/components/schemas/RegulatoryResult'
          description: Health Canada licensed cannabis producers
        mohServiceProviders:
          type: array
          items:
            $ref: '#/components/schemas/RegulatoryResult'
          description: Ontario Ministry of Health regulated health service providers
        bankOfCanadaRps:
          type: array
          items:
            $ref: '#/components/schemas/RegulatoryResult'
          description: Bank of Canada Retail Payments Supervision (RPS) registry
        wsibClassifications:
          type: array
          items:
            $ref: '#/components/schemas/RegulatoryResult'
          description: WSIB (Ontario) business classifications
        onBusinessLicences:
          type: array
          items:
            $ref: '#/components/schemas/RegulatoryResult'
          description: Ontario business licences and registrations
        torontoBusinessLicences:
          type: array
          items:
            $ref: '#/components/schemas/RegulatoryResult'
          description: City of Toronto business licences and permits
        vancouverBusinessLicences:
          type: array
          items:
            $ref: '#/components/schemas/RegulatoryResult'
          description: City of Vancouver business licences
        rbqLicences:
          type: array
          items:
            $ref: '#/components/schemas/RegulatoryResult'
          description: Régie du bâtiment du Québec (RBQ) active licences
    SanctionsMatch:
      type: object
      description: >-
        A sanctions database match (same shape as the standalone `/sanctions`
        result)
      properties:
        legalName:
          $ref: '#/components/schemas/SanctionsLegalName'
        alternateNames:
          type: array
          items:
            type: string
          description: Alternate names for the sanctioned entity
        entityType:
          type: string
          nullable: true
          description: Type of entity (individual, entity, vessel, aircraft)
        details:
          $ref: '#/components/schemas/SanctionsDetails'
        sourceUrls:
          type: array
          items:
            type: string
            format: uri
          description: Direct links to the entity record for human review
    WebsiteAnalysis:
      type: object
      description: >-
        Website analysis results — only present when websiteAnalysis is true or
        website URL was provided
      properties:
        status:
          type: string
          enum:
            - success
            - skipped
            - error
            - empty
          description: >-
            'success': data extracted; 'skipped': not requested; 'empty':
            reachable but no structured data; 'error': scraping failed
        url:
          type: string
          format: uri
        scrapedAt:
          type: string
          format: date-time
        extracted:
          type: object
          properties:
            legalName:
              type: string
              nullable: true
              description: Legal name found on the website
            descriptions:
              type: array
              items:
                type: string
              description: Business description text
            addresses:
              type: array
              items:
                $ref: '#/components/schemas/Address'
            people:
              type: array
              items:
                $ref: '#/components/schemas/BusinessPerson'
              description: >-
                Named individuals found on the site (merged into top-level
                people on the parent response)
            registrations:
              type: array
              items:
                $ref: '#/components/schemas/ExtractedRegistration'
            contactInfo:
              $ref: '#/components/schemas/ExtractedContact'
        industry:
          $ref: '#/components/schemas/IndustryClassification'
        domain:
          $ref: '#/components/schemas/DomainInfo'
        error:
          type: string
          nullable: true
          description: Error message when status is error
    SearchErrors:
      type: object
      description: >-
        Per-source errors — only present when one or more sources failed.
        Presence does not mean the search failed overall.
      properties:
        businessRegistry:
          $ref: '#/components/schemas/APIError'
        regulatoryRegistry:
          $ref: '#/components/schemas/APIError'
        sanctionsScreening:
          $ref: '#/components/schemas/APIError'
        websiteAnalysis:
          $ref: '#/components/schemas/APIError'
        general:
          allOf:
            - $ref: '#/components/schemas/APIError'
          description: >-
            Search-wide failure not tied to a single source (e.g. the search
            timed out or hit an unexpected error). When present, `meta.status`
            is `completed-with-errors` and there may be no per-source results.
    ErrorResponse:
      type: object
      required:
        - error
        - code
      properties:
        error:
          type: string
          description: Human-readable error message
        code:
          type: string
          description: >
            Machine-readable error code. Present on every error response.
            Distinct from the per-source `APIError.code` values that appear
            inside a successful response's `meta.errors` object.
          enum:
            - MISSING_API_KEY
            - INVALID_API_KEY
            - REVOKED_API_KEY
            - EXPIRED_API_KEY
            - RATE_LIMITED
            - VALIDATION_ERROR
            - INVALID_JSON
            - NOT_FOUND
            - STALE_WRITE
            - CONFLICT
            - METHOD_NOT_ALLOWED
            - UNAUTHORIZED
            - SERVER_ERROR
            - INTERNAL_ERROR
          example: VALIDATION_ERROR
    SearchParams:
      type: object
      description: Search parameters that were used (with defaults applied)
      properties:
        businessRegistry:
          type: boolean
        regulatoryRegistry:
          type: boolean
        regulatoryRegistryThreshold:
          type: integer
          minimum: 70
          maximum: 100
        sanctionsScreening:
          type: boolean
        sanctionsThreshold:
          type: integer
          minimum: 70
          maximum: 100
        websiteAnalysis:
          type: boolean
    LegalName:
      type: object
      required:
        - name
      properties:
        name:
          type: string
          description: The legal name
        matchScore:
          type: number
          minimum: 0
          maximum: 1
          nullable: true
          description: >
            Name-only match confidence against the search query (0–1). For the
            aggregate identity match (name plus registration/business number and
            jurisdiction), use the sibling `match` object.
    BusinessMatch:
      type: object
      description: >
        Aggregate identity match of the result against the search baseline. When
        the search was linked to one of your business records (via
        `businessId`), results are scored against that record's name,
        registration number, business number, and jurisdiction; otherwise they
        are scored against the search query (name only). This is the same
        aggregate score shown on each result in the Current app, and a richer
        signal than the name-only `legalName.matchScore`.
      required:
        - score
        - baseline
        - fields
      properties:
        score:
          type: number
          minimum: 0
          maximum: 1
          nullable: true
          description: >
            Weighted 0–1 average over the fields present on BOTH the baseline
            and the result (a result is not penalized for a field it simply
            omits). Null only when nothing was comparable.
        baseline:
          type: string
          enum:
            - record
            - query
            - none
          description: >
            What the result was scored against — `record` (a linked business),
            `query` (the search term, name only), or `none`.
        fields:
          type: array
          description: Per-field breakdown for the fields that were actually compared.
          items:
            type: object
            required:
              - field
              - label
              - score
              - status
            properties:
              field:
                type: string
                enum:
                  - name
                  - registrationNumber
                  - businessNumber
                  - jurisdiction
              label:
                type: string
                description: Human-readable field label (e.g. "Reg
              score:
                type: number
                minimum: 0
                maximum: 1
              status:
                type: string
                enum:
                  - matched
                  - all_matched
                  - partial_match
                  - not_matched
                  - not_submitted
    RegistrationNumber:
      type: object
      description: Registration number with human-readable label
      required:
        - label
        - value
      properties:
        label:
          type: string
          description: >-
            Human-readable label (e.g., "Federal Corporation Number", "Business
            Number (CRA)")
        value:
          type: string
          description: The registration number value
    Address:
      type: object
      description: Business address with structured nullable fields
      properties:
        street:
          type:
            - string
            - 'null'
        city:
          type:
            - string
            - 'null'
        province:
          type:
            - string
            - 'null'
          description: Full province name (e.g., "Ontario", "British Columbia")
        postalCode:
          type:
            - string
            - 'null'
        country:
          type:
            - string
            - 'null'
          description: Full country name (e.g., "Canada")
        raw:
          type:
            - string
            - 'null'
          description: Original unstructured address string from the source
    BusinessPerson:
      $ref: '#/components/schemas/BusinessReportPerson'
    BusinessReportPerson:
      type: object
      required:
        - name
        - titles
        - addresses
      properties:
        name:
          type: string
          description: Full name
        titles:
          type: array
          items:
            type: string
          description: Roles (e.g., "Director", "Officer", "Shareholder")
        ownership:
          type:
            - string
            - 'null'
          description: >-
            Equity/ownership details for ISC parties (e.g., "At least 25% and up
            to 50% of the shares")
        addresses:
          type: array
          items:
            $ref: '#/components/schemas/Address'
          description: Person's addresses (empty array if none)
    BusinessReportDetails:
      type: object
      required:
        - goodStanding
        - nameHistory
        - naicsClassification
      properties:
        goodStanding:
          type:
            - boolean
            - 'null'
          description: Whether the business is in good standing
        nameHistory:
          type: array
          items:
            $ref: '#/components/schemas/NameHistoryEntry'
          description: Trade names and name changes (empty array if none)
        naicsClassification:
          type: array
          items:
            $ref: '#/components/schemas/NaicsEntry'
          description: NAICS industry codes from the business report (empty array if none)
    RegulatoryResult:
      type: object
      properties:
        legalName:
          $ref: '#/components/schemas/LegalName'
        alternateNames:
          type: array
          items:
            type: string
          description: Operating names, DBA names, and aliases
        registrationNumber:
          type: string
        status:
          type: string
        addresses:
          type: array
          items:
            $ref: '#/components/schemas/Address'
        details:
          type: object
          additionalProperties: true
          description: Registry-specific details (fields vary by registry)
        sourceUrl:
          type: string
          format: uri
          description: Direct link to the official registry record
    SanctionsLegalName:
      type: object
      description: >
        Legal name for a sanctions match. Extends the base name/score with the
        specific alias that matched and per-name breakdown scores.
      required:
        - name
      properties:
        name:
          type: string
          description: The entity's primary name
        matchScore:
          type: number
          minimum: 0
          maximum: 1
          description: Best match confidence against the screened query (0–1)
        matchedName:
          type: string
          nullable: true
          description: The specific name/alias that produced the best score
        nameScores:
          type: array
          description: Per-name score breakdown across the entity's names and aliases
          items:
            type: object
            properties:
              name:
                type: string
              score:
                type: number
                minimum: 0
                maximum: 1
    SanctionsDetails:
      type: object
      description: Sanctions metadata for a match
      properties:
        source:
          type: string
          description: >-
            Sanctions list that flagged this entity (e.g.,
            "us-sanctions-ofac-sdn")
        countries:
          type: array
          items:
            type: string
          description: Countries associated with the sanctioned entity
        programs:
          type: array
          items:
            type: string
          description: Sanctions programs the entity is listed under
        identifiers:
          type: array
          items:
            type: string
          description: Passport numbers, tax IDs, and other identifying documents
        listingDate:
          type: string
          nullable: true
          description: When the entity was added to the sanctions list
        dateOfBirth:
          type: string
          nullable: true
          description: Date of birth (for individuals) — may be partial (YYYY or YYYY-MM)
        remarks:
          type: string
          nullable: true
          description: Additional notes from the sanctions source
        datasets:
          type: array
          items:
            type: string
          description: Legacy OpenSanctions field — datasets that flagged this entity
        topics:
          type: array
          items:
            type: string
          description: Legacy OpenSanctions field — sanctions topic classifications
        legalForm:
          type: string
          nullable: true
          description: Legacy OpenSanctions field — legal form of the entity
    ExtractedRegistration:
      type: object
      properties:
        label:
          type: string
          description: Description of registration type (e.g., "GST/HST Number")
        value:
          type: string
          description: Registration number
    ExtractedContact:
      type: object
      properties:
        emails:
          type: array
          items:
            type: string
            format: email
        phoneNumbers:
          type: array
          items:
            type: string
            description: E.164 format (e.g., "+14165551234")
    IndustryClassification:
      type: object
      properties:
        naicsCode:
          type: string
          description: 6-digit NAICS industry code
        naicsDescription:
          type: string
          description: Human-readable industry description
        reasoning:
          type: string
          description: Explanation of how the classification was determined
    DomainInfo:
      type: object
      properties:
        url:
          type: string
          format: uri
        createdAt:
          type: string
          format: date-time
          description: Domain registration date
    APIError:
      type: object
      properties:
        code:
          type: string
          enum:
            - TIMEOUT
            - RATE_LIMITED
            - NOT_FOUND
            - INVALID_INPUT
            - UPSTREAM_ERROR
            - PARSE_ERROR
            - AUTH_ERROR
            - UNAVAILABLE
            - UNKNOWN
          description: Error classification code
        message:
          type: string
          description: Human-readable error message
        retryable:
          type: boolean
          description: Whether the request can be retried
    NameHistoryEntry:
      type: object
      required:
        - type
        - name
      properties:
        type:
          type: string
          description: Relationship type (e.g., "Trade Name", "Former Name")
        name:
          type: string
        effectiveDate:
          type:
            - string
            - 'null'
        endDate:
          type:
            - string
            - 'null'
    NaicsEntry:
      type: object
      required:
        - code
      properties:
        code:
          type: string
          description: NAICS industry code
        description:
          type: string
          description: NAICS description
  headers:
    X-Request-Id:
      description: >-
        Unique request identifier for traceability. Echoes client-provided value
        or auto-generated UUID.
      schema:
        type: string
        format: uuid
        example: a1b2c3d4-e5f6-7890-abcd-ef1234567890
    X-RateLimit-Limit:
      description: Maximum requests per minute
      schema:
        type: integer
        example: 60
    X-RateLimit-Remaining:
      description: Remaining requests in current window
      schema:
        type: integer
        example: 58
    X-RateLimit-Reset:
      description: Unix timestamp when rate limit resets
      schema:
        type: integer
        example: 1702915200
  responses:
    BadRequest:
      description: Invalid request parameters
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error: name is required and must be a non-empty string
            code: VALIDATION_ERROR
    Unauthorized:
      description: Missing or invalid API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            missing:
              value:
                error: >-
                  Missing API key. Provide via Authorization: Bearer <key> or
                  X-API-Key header.
                code: MISSING_API_KEY
            invalid:
              value:
                error: Invalid API key
                code: INVALID_API_KEY
            revoked:
              value:
                error: API key has been revoked
                code: REVOKED_API_KEY
            expired:
              value:
                error: API key has expired
                code: EXPIRED_API_KEY
    RateLimited:
      description: Rate limit exceeded
      headers:
        X-RateLimit-Limit:
          $ref: '#/components/headers/X-RateLimit-Limit'
        X-RateLimit-Remaining:
          schema:
            type: integer
            example: 0
        X-RateLimit-Reset:
          $ref: '#/components/headers/X-RateLimit-Reset'
        Retry-After:
          description: Seconds until rate limit resets
          schema:
            type: integer
            example: 60
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error: Rate limit exceeded. Try again in 60 seconds.
            code: RATE_LIMITED
    InternalError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error: Internal server error
            code: SERVER_ERROR
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'API key as Bearer token: `Authorization: Bearer cur_live_xxxxx`'
    apiKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key
      description: 'API key in header: `X-API-Key: cur_live_xxxxx`'

````