# Generated from api/_lib/rights-api/schemas.ts. Do not edit.
# Regenerate with npm run openapi
openapi: 3.1.0
info:
  title: Valaritas Rights API
  version: 2026-11-02
  summary: "Clear, quote, and request a licence for an athlete's name, face and voice."
servers:
  - url: "https://www.valaritasports.com"
tags:
  - name: API
  - name: Sandbox
  - name: Athletes
  - name: Clearances
  - name: Quotes
  - name: Matches
  - name: Licenses
  - name: Generations
  - name: Events
  - name: Receipts
  - name: Provenance
paths:
  "/v1":
    get:
      operationId: retrieveApi
      summary: Confirm the key and the pinned version.
      tags:
        - API
      parameters:
        - "$ref": "#/components/parameters/ValaritasVersion"
      responses:
        200:
          description: Success
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/ApiPing"
        default:
          description: Error
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/ErrorBody"
      security:
        - bearerAuth:
            []
  "/v1/ping":
    post:
      operationId: createPing
      summary: Echo a JSON body. Requires Idempotency-Key.
      tags:
        - API
      parameters:
        - "$ref": "#/components/parameters/ValaritasVersion"
        - "$ref": "#/components/parameters/IdempotencyKey"
      responses:
        200:
          description: Success
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/ApiPing"
        default:
          description: Error
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/ErrorBody"
      security:
        - bearerAuth:
            []
  "/v1/sandbox/signup":
    post:
      operationId: signup
      summary: Create a test key. Shown once.
      tags:
        - Sandbox
      parameters:
        - "$ref": "#/components/parameters/IdempotencyKey"
      responses:
        200:
          description: Success
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/ApiKeyIssued"
        default:
          description: Error
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/ErrorBody"
      security:
        []
      requestBody:
        required: true
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/SignupCreate"
  "/v1/athletes":
    get:
      operationId: listAthletes
      summary: List athletes available to this key.
      tags:
        - Athletes
      parameters:
        - "$ref": "#/components/parameters/ValaritasVersion"
        - name: query
          in: query
          required: false
          schema:
            type: string
        - name: sport
          in: query
          required: false
          schema:
            type: string
        - name: category
          in: query
          required: false
          schema:
            type: string
        - name: available_for
          in: query
          required: false
          schema:
            type: string
        - name: min_price
          in: query
          required: false
          schema:
            type: string
        - name: max_price
          in: query
          required: false
          schema:
            type: string
      responses:
        200:
          description: Success
          content:
            "application/json":
              schema:
                type: object
                properties:
                  object:
                    const: list
                  data:
                    type: array
                    items:
                      "$ref": "#/components/schemas/Athlete"
                  has_more:
                    type: boolean
                  url:
                    type: string
                required:
                  - object
                  - data
                  - has_more
        default:
          description: Error
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/ErrorBody"
      security:
        - bearerAuth:
            []
  "/v1/athletes/{id}":
    get:
      operationId: retrieveAthlete
      summary: Retrieve one athlete.
      tags:
        - Athletes
      parameters:
        - "$ref": "#/components/parameters/ValaritasVersion"
        - name: id
          in: path
          required: true
          description: "Public athlete id (`ath_`)."
          schema:
            type: string
      responses:
        200:
          description: Success
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/Athlete"
        default:
          description: Error
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/ErrorBody"
      security:
        - bearerAuth:
            []
  "/v1/athletes/{id}/value":
    get:
      operationId: retrieveAthleteValue
      summary: "The athlete's value score, share of the roster pool and unit prices, with the reason."
      tags:
        - Athletes
      parameters:
        - "$ref": "#/components/parameters/ValaritasVersion"
        - name: id
          in: path
          required: true
          description: "Public athlete id (`ath_`)."
          schema:
            type: string
      responses:
        200:
          description: Success
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/AthleteValue"
        default:
          description: Error
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/ErrorBody"
      security:
        - bearerAuth:
            []
  "/v1/clearances":
    post:
      operationId: createClearance
      summary: Clear a use. Does not grant a licence.
      tags:
        - Clearances
      parameters:
        - "$ref": "#/components/parameters/ValaritasVersion"
        - "$ref": "#/components/parameters/IdempotencyKey"
      responses:
        200:
          description: Success
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/Clearance"
        default:
          description: Error
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/ErrorBody"
      security:
        - bearerAuth:
            []
      requestBody:
        required: true
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/ClearanceCreate"
  "/v1/quotes":
    post:
      operationId: createQuote
      summary: "Price a use from the rate card, with the athlete's value score and pool share."
      tags:
        - Quotes
      parameters:
        - "$ref": "#/components/parameters/ValaritasVersion"
        - "$ref": "#/components/parameters/IdempotencyKey"
      responses:
        200:
          description: Success
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/Quote"
        default:
          description: Error
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/ErrorBody"
      security:
        - bearerAuth:
            []
      requestBody:
        required: true
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/QuoteCreate"
  "/v1/quotes/{id}":
    get:
      operationId: retrieveQuote
      summary: Retrieve a quote.
      tags:
        - Quotes
      parameters:
        - "$ref": "#/components/parameters/ValaritasVersion"
        - name: id
          in: path
          required: true
          description: "Quote id (`quo_`)."
          schema:
            type: string
      responses:
        200:
          description: Success
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/Quote"
        default:
          description: Error
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/ErrorBody"
      security:
        - bearerAuth:
            []
  "/v1/matches":
    post:
      operationId: createMatchingBrief
      summary: "Rank licensed adult athletes for a brief. Live organization key; matches:write scope."
      tags:
        - Matches
      parameters:
        - "$ref": "#/components/parameters/ValaritasVersion"
        - "$ref": "#/components/parameters/IdempotencyKey"
      responses:
        201:
          description: Success
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/MatchingBrief"
        default:
          description: Error
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/ErrorBody"
      security:
        - bearerAuth:
            []
      requestBody:
        required: true
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/MatchingCreate"
  "/v1/matches/{id}":
    get:
      operationId: retrieveMatchingBrief
      summary: "Retrieve the organization’s ranked shortlist. Live organization key; matches:read scope."
      tags:
        - Matches
      parameters:
        - "$ref": "#/components/parameters/ValaritasVersion"
        - name: id
          in: path
          required: true
          description: Matching brief UUID.
          schema:
            type: string
      responses:
        200:
          description: Success
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/MatchingBrief"
        default:
          description: Error
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/ErrorBody"
      security:
        - bearerAuth:
            []
  "/v1/matches/{id}/book":
    post:
      operationId: bookMatch
      summary: "Recheck eligibility and price, then request booking under the athlete’s licence. Live organization key; matches:write scope."
      tags:
        - Matches
      parameters:
        - "$ref": "#/components/parameters/ValaritasVersion"
        - "$ref": "#/components/parameters/IdempotencyKey"
        - name: id
          in: path
          required: true
          description: Matching brief UUID.
          schema:
            type: string
      responses:
        201:
          description: Success
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/MatchingBooking"
        default:
          description: Error
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/ErrorBody"
      security:
        - bearerAuth:
            []
      requestBody:
        required: true
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/MatchingBook"
  "/v1/licenses":
    post:
      operationId: createLicense
      summary: Request a licence. The athlete decides.
      tags:
        - Licenses
      parameters:
        - "$ref": "#/components/parameters/ValaritasVersion"
        - "$ref": "#/components/parameters/IdempotencyKey"
      responses:
        200:
          description: Success
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/License"
        default:
          description: Error
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/ErrorBody"
      security:
        - bearerAuth:
            []
      requestBody:
        required: true
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/LicenseCreate"
  "/v1/licenses/{id}":
    get:
      operationId: retrieveLicense
      summary: Retrieve a licence.
      tags:
        - Licenses
      parameters:
        - "$ref": "#/components/parameters/ValaritasVersion"
        - name: id
          in: path
          required: true
          description: "Licence id (`lic_`)."
          schema:
            type: string
      responses:
        200:
          description: Success
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/License"
        default:
          description: Error
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/ErrorBody"
      security:
        - bearerAuth:
            []
  "/v1/licenses/{id}/cancel":
    post:
      operationId: cancelLicense
      summary: Withdraw a request that is still waiting on the athlete.
      tags:
        - Licenses
      parameters:
        - "$ref": "#/components/parameters/ValaritasVersion"
        - "$ref": "#/components/parameters/IdempotencyKey"
        - name: id
          in: path
          required: true
          description: "Licence id (`lic_`)."
          schema:
            type: string
      responses:
        200:
          description: Success
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/License"
        default:
          description: Error
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/ErrorBody"
      security:
        - bearerAuth:
            []
  "/v1/generations":
    post:
      operationId: createGeneration
      summary: Record a test-mode generation from a clearance token.
      tags:
        - Generations
      parameters:
        - "$ref": "#/components/parameters/ValaritasVersion"
        - "$ref": "#/components/parameters/IdempotencyKey"
      responses:
        200:
          description: Success
          content:
            "application/json":
              schema:
                type: object
                properties:
                  object:
                    const: list
                  data:
                    type: array
                    items:
                      type: object
                  has_more:
                    type: boolean
                  url:
                    type: string
                required:
                  - object
                  - data
                  - has_more
        default:
          description: Error
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/ErrorBody"
      security:
        - bearerAuth:
            []
      requestBody:
        required: true
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/GenerationCreate"
    get:
      operationId: listGenerations
      summary: List test-mode generations for this key.
      tags:
        - Generations
      parameters:
        - "$ref": "#/components/parameters/ValaritasVersion"
      responses:
        200:
          description: Success
          content:
            "application/json":
              schema:
                type: object
                properties:
                  object:
                    const: list
                  data:
                    type: array
                    items:
                      type: object
                  has_more:
                    type: boolean
                  url:
                    type: string
                required:
                  - object
                  - data
                  - has_more
        default:
          description: Error
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/ErrorBody"
      security:
        - bearerAuth:
            []
  "/v1/generations/{id}":
    get:
      operationId: retrieveGeneration
      summary: Retrieve a generation.
      tags:
        - Generations
      parameters:
        - "$ref": "#/components/parameters/ValaritasVersion"
        - name: id
          in: path
          required: true
          description: "Generation id (`gen_`)."
          schema:
            type: string
      responses:
        200:
          description: Success
          content:
            "application/json":
              schema:
                type: object
                properties:
                  object:
                    const: list
                  data:
                    type: array
                    items:
                      type: object
                  has_more:
                    type: boolean
                  url:
                    type: string
                required:
                  - object
                  - data
                  - has_more
        default:
          description: Error
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/ErrorBody"
      security:
        - bearerAuth:
            []
  "/v1/events":
    get:
      operationId: listEvents
      summary: "Sandbox events for this key, including license.approved."
      tags:
        - Events
      parameters:
        - "$ref": "#/components/parameters/ValaritasVersion"
      responses:
        200:
          description: Success
          content:
            "application/json":
              schema:
                type: object
                properties:
                  object:
                    const: list
                  data:
                    type: array
                    items:
                      "$ref": "#/components/schemas/RightsEvent"
                  has_more:
                    type: boolean
                  url:
                    type: string
                required:
                  - object
                  - data
                  - has_more
        default:
          description: Error
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/ErrorBody"
      security:
        - bearerAuth:
            []
  "/v1/events/{id}":
    get:
      operationId: retrieveEvent
      summary: Retrieve one event.
      tags:
        - Events
      parameters:
        - "$ref": "#/components/parameters/ValaritasVersion"
        - name: id
          in: path
          required: true
          description: "Event id (`evt_`)."
          schema:
            type: string
      responses:
        200:
          description: Success
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/RightsEvent"
        default:
          description: Error
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/ErrorBody"
      security:
        - bearerAuth:
            []
  "/v1/receipts/{id}":
    get:
      operationId: retrieveReceipt
      summary: Retrieve the signed receipt for one use.
      tags:
        - Receipts
      parameters:
        - "$ref": "#/components/parameters/ValaritasVersion"
        - name: id
          in: path
          required: true
          description: "Receipt id (`rcpt_`)."
          schema:
            type: string
      responses:
        200:
          description: Success
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/Receipt"
        default:
          description: Error
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/ErrorBody"
      security:
        - bearerAuth:
            []
  "/v1/receipts/public_key":
    get:
      operationId: retrieveReceiptKey
      summary: The Ed25519 public key that signs receipts.
      tags:
        - Receipts
      parameters:
        []
      responses:
        200:
          description: Success
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/ReceiptKey"
        default:
          description: Error
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/ErrorBody"
      security:
        []
  "/v1/receipts/verify":
    post:
      operationId: verifyReceipt
      summary: Check a receipt signature. No key needed.
      tags:
        - Receipts
      parameters:
        []
      responses:
        200:
          description: Success
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/ReceiptVerification"
        default:
          description: Error
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/ErrorBody"
      security:
        []
      requestBody:
        required: true
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/Receipt"
  "/v1/verify":
    get:
      operationId: verifyContent
      summary: Check whether a file is a licensed likeness.
      tags:
        - Provenance
      parameters:
        - name: url
          in: query
          required: false
          schema:
            type: string
        - name: file
          in: query
          required: false
          schema:
            type: string
      responses:
        200:
          description: Success
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/VerifyResult"
        default:
          description: Error
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/ErrorBody"
      security:
        []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Secret key. Docs use the obvious fake vk_test_EXAMPLE.
  parameters:
    ValaritasVersion:
      name: Valaritas-Version
      in: header
      required: false
      schema:
        type: string
        example: 2026-11-02
    IdempotencyKey:
      name: Idempotency-Key
      in: header
      required: true
      schema:
        type: string
  schemas:
    MatchingCreate:
      type: object
      properties:
        brand_name:
          type: string
          minLength: 1
          maxLength: 80
        category:
          type: string
          minLength: 1
          maxLength: 60
        sports:
          default:
            []
          maxItems: 30
          type: array
          items:
            type: string
            minLength: 1
            maxLength: 160
        regions:
          default:
            []
          maxItems: 30
          type: array
          items:
            type: string
            minLength: 1
            maxLength: 160
        audience:
          default:
            []
          maxItems: 30
          type: array
          items:
            type: string
            minLength: 1
            maxLength: 160
        budget_cents:
          type: integer
          exclusiveMinimum: 0
          maximum: 1000000000
        minimum_engagement_rate:
          type: number
          minimum: 0
          maximum: 1
        limit:
          default: 10
          type: integer
          minimum: 1
          maximum: 100
        brand_id:
          type: string
          format: uuid
          pattern: "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        currency:
          default: USD
          type: string
          const: USD
        term_months:
          default: 12
          anyOf:
            - type: number
              const: 6
            - type: number
              const: 12
            - type: number
              const: 24
        media:
          default:
            - digital
            - social
          minItems: 1
          maxItems: 7
          type: array
          items:
            type: string
            enum:
              - social
              - digital
              - dooh
              - broadcast
              - print
              - retail
              - event
        notes:
          default: ""
          type: string
          maxLength: 1000
      required:
        - brand_name
        - category
        - budget_cents
        - brand_id
      additionalProperties: false
    MatchingBook:
      type: object
      properties:
        athlete_id:
          type: string
          pattern: "^[a-z0-9][a-z0-9-]{0,59}$"
        expected_price_cents:
          type: integer
          exclusiveMinimum: 0
          maximum: 1000000000
        expected_terms_version:
          type: string
          minLength: 1
          maxLength: 160
        expected_signature_id:
          type: string
          minLength: 1
          maxLength: 160
      required:
        - athlete_id
        - expected_price_cents
        - expected_terms_version
        - expected_signature_id
      additionalProperties: false
    MatchingBrief:
      type: object
      properties:
        object:
          type: string
          const: matching_brief
        livemode:
          type: boolean
          const: true
        data:
          type: object
          properties:
            brief_id:
              type: string
              format: uuid
              pattern: "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            matches:
              type: array
              items:
                type: object
                propertyNames:
                  type: string
                additionalProperties:
                  {}
          required:
            - brief_id
            - matches
          additionalProperties:
            {}
      required:
        - object
        - livemode
        - data
      additionalProperties: false
    MatchingBooking:
      type: object
      properties:
        object:
          type: string
          const: booking
        livemode:
          type: boolean
          const: true
        data:
          type: object
          properties:
            brief_id:
              type: string
              format: uuid
              pattern: "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            requires_approval:
              type: boolean
          required:
            - brief_id
            - requires_approval
          additionalProperties:
            {}
      required:
        - object
        - livemode
        - data
      additionalProperties: false
    ClearanceCreate:
      type: object
      properties:
        athlete:
          type: string
          minLength: 1
          maxLength: 80
        use:
          type: string
          enum:
            - ad
            - fan_content
        category:
          type: string
          maxLength: 80
        brand_category:
          type: string
          maxLength: 80
        territory:
          type: string
          minLength: 1
          maxLength: 80
        channel:
          type: string
          minLength: 1
          maxLength: 80
        metadata:
          default:
            {}
          type: object
          propertyNames:
            type: string
            maxLength: 40
          additionalProperties:
            type: string
            maxLength: 500
      required:
        - athlete
        - use
        - territory
        - channel
      additionalProperties: false
    GenerationCreate:
      type: object
      properties:
        clearance_token:
          type: string
          minLength: 1
          maxLength: 4000
        amount_cents:
          type: integer
          minimum: 0
          maximum: 100000000
        likeness:
          type: object
          properties:
            media:
              type: string
              enum:
                - image
                - audio
            data_base64:
              type: string
              minLength: 16
              maxLength: 1600000
            consent_record_id:
              type: string
              minLength: 1
              maxLength: 160
            licence_id:
              type: string
              minLength: 1
              maxLength: 80
            consent_date:
              type: string
              pattern: "^\\d{4}-\\d{2}-\\d{2}$"
          required:
            - media
            - data_base64
            - consent_record_id
            - licence_id
            - consent_date
          additionalProperties: false
      required:
        - clearance_token
        - amount_cents
      additionalProperties: false
    QuoteCreate:
      type: object
      properties:
        athlete:
          type: string
          minLength: 1
          maxLength: 80
        markets:
          default: 2
          type: integer
          minimum: 1
          maximum: 50
        languages:
          default: 2
          type: integer
          minimum: 1
          maximum: 50
        term_months:
          default: 12
          anyOf:
            - type: number
              const: 6
            - type: number
              const: 12
            - type: number
              const: 24
        media_types:
          default:
            - digital
            - social
          maxItems: 7
          type: array
          items:
            type: string
            enum:
              - social
              - digital
              - dooh
              - broadcast
              - print
              - retail
              - event
        exclusive_markets:
          default: 0
          type: integer
          minimum: 0
          maximum: 50
        currency:
          default: usd
          type: string
          const: usd
        metadata:
          default:
            {}
          type: object
          propertyNames:
            type: string
            maxLength: 40
          additionalProperties:
            type: string
            maxLength: 500
      required:
        - athlete
      additionalProperties: false
    LicenseCreate:
      type: object
      properties:
        athlete:
          type: string
          minLength: 1
          maxLength: 80
        quote:
          type: string
          pattern: "^quo_[a-z0-9]+$"
        metadata:
          default:
            {}
          type: object
          propertyNames:
            type: string
            maxLength: 40
          additionalProperties:
            type: string
            maxLength: 500
      required:
        - athlete
        - quote
      additionalProperties: false
    SignupCreate:
      type: object
      properties:
        email:
          type: string
          maxLength: 254
          format: email
          pattern: "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
        name:
          type: string
          minLength: 1
          maxLength: 80
      required:
        - name
      additionalProperties: false
    AthleteListQuery:
      type: object
      properties:
        query:
          type: string
          maxLength: 80
        sport:
          type: string
          maxLength: 80
        category:
          type: string
          maxLength: 80
        available_for:
          type: string
          maxLength: 40
        min_price:
          type: string
          pattern: ^\d+$
        max_price:
          type: string
          pattern: ^\d+$
      additionalProperties: false
    ErrorBody:
      type: object
      properties:
        error:
          type: object
          properties:
            type:
              type: string
              enum:
                - invalid_request_error
                - authentication_error
                - permission_error
                - idempotency_error
                - consent_error
                - rate_limit_error
                - api_error
            code:
              type: string
            param:
              type:
                - string
                - "null"
            message:
              type: string
            doc_url:
              type: string
              format: uri
            request_id:
              type: string
          required:
            - type
            - code
            - param
            - message
            - doc_url
            - request_id
          additionalProperties: false
      required:
        - error
      additionalProperties: false
    ApiPing:
      type: object
      properties:
        object:
          type: string
          const: api
        livemode:
          type: boolean
        version:
          type: string
        organization:
          type: string
        message:
          type: string
        docs:
          type: string
          format: uri
        example_key:
          type: string
      required:
        - object
        - livemode
        - version
        - organization
        - message
        - docs
        - example_key
      additionalProperties: false
    Athlete:
      type: object
      properties:
        id:
          type: string
        object:
          type: string
          const: athlete
        name:
          type: string
        sport:
          type: string
        categories:
          type: array
          items:
            type: string
        price_cents:
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        currency:
          type: string
          const: usd
        available_for:
          type: array
          items:
            type: string
        livemode:
          type: boolean
        metadata:
          type: object
          propertyNames:
            type: string
          additionalProperties:
            type: string
      required:
        - id
        - object
        - name
      additionalProperties: false
    AthleteValue:
      type: object
      properties:
        object:
          type: string
          const: athlete_value
        athlete:
          type: object
          properties:
            id:
              type: string
            name:
              type: string
          required:
            - id
            - name
          additionalProperties: false
        livemode:
          type: boolean
        version:
          type: string
        score:
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        score_max:
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        pool_share_bps:
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        pool_size:
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        unit_prices:
          type: object
          propertyNames:
            type: string
          additionalProperties:
            type: object
            properties:
              amount_cents:
                type: integer
                minimum: -9007199254740991
                maximum: 9007199254740991
              currency:
                type: string
                const: usd
            required:
              - amount_cents
              - currency
            additionalProperties: false
        reason:
          type: string
        base_used:
          type: array
          items:
            type: string
        inputs_hash:
          type: string
        updated:
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
      required:
        - object
        - athlete
        - livemode
        - version
        - score
        - score_max
        - pool_share_bps
        - pool_size
        - unit_prices
        - reason
        - base_used
        - inputs_hash
        - updated
      additionalProperties: false
    Clearance:
      type: object
      properties:
        id:
          type: string
        object:
          type: string
          const: clearance
        livemode:
          type: boolean
        created:
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        status:
          type: string
          enum:
            - clears
            - needs_review
            - blocked
        reasons:
          type: array
          items:
            type: object
            properties:
              code:
                type: string
              message:
                type: string
            required:
              - code
              - message
            additionalProperties: false
        token:
          type:
            - string
            - "null"
        athlete:
          anyOf:
            - type: object
              properties:
                id:
                  type: string
                name:
                  type: string
              required:
                - id
                - name
              additionalProperties: false
            - type: "null"
        use:
          type: string
          enum:
            - ad
            - fan_content
        category:
          type: string
        territory:
          type: string
        channel:
          type: string
        metadata:
          type: object
          propertyNames:
            type: string
          additionalProperties:
            type: string
      required:
        - id
        - object
        - livemode
        - created
        - status
        - reasons
        - token
        - athlete
        - use
        - category
        - territory
        - channel
        - metadata
      additionalProperties: false
    Quote:
      type: object
      properties:
        id:
          type: string
        object:
          type: string
          const: quote
        livemode:
          type: boolean
          const: false
        created:
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        status:
          type: string
          enum:
            - open
            - requires_qualification
            - rejected
        athlete:
          type: object
          properties:
            id:
              type: string
            name:
              type: string
          required:
            - id
            - name
          additionalProperties: false
        amount_cents:
          anyOf:
            - type: integer
              minimum: -9007199254740991
              maximum: 9007199254740991
            - type: "null"
        currency:
          type: string
          const: usd
        floor_ok:
          type:
            - boolean
            - "null"
        kind:
          anyOf:
            - type: string
              enum:
                - indicative
                - bookable
            - type: "null"
        basis:
          anyOf:
            - type: object
              properties:
                card:
                  type: string
                  const: rate-card-v1
                tier:
                  type: string
                base_cents:
                  type: integer
                  minimum: -9007199254740991
                  maximum: 9007199254740991
                multipliers:
                  type: array
                  items:
                    type: object
                    properties:
                      code:
                        type: string
                      label:
                        type: string
                      bps:
                        type: number
                    required:
                      - code
                      - label
                      - bps
                    additionalProperties: false
                total_bps:
                  type: integer
                  minimum: -9007199254740991
                  maximum: 9007199254740991
                floor_cents:
                  anyOf:
                    - type: integer
                      minimum: -9007199254740991
                      maximum: 9007199254740991
                    - type: "null"
              required:
                - card
                - tier
                - base_cents
                - multipliers
                - total_bps
                - floor_cents
              additionalProperties: false
            - type: "null"
        qualification:
          type: object
          properties:
            status:
              type: string
              enum:
                - qualified
                - needs_info
                - rejected
          required:
            - status
          additionalProperties: false
        ipm:
          anyOf:
            - type: object
              properties:
                version:
                  type: string
                score:
                  type: integer
                  minimum: -9007199254740991
                  maximum: 9007199254740991
                pool_share_bps:
                  type: integer
                  minimum: -9007199254740991
                  maximum: 9007199254740991
                api_call_cents:
                  type: integer
                  minimum: -9007199254740991
                  maximum: 9007199254740991
                reason:
                  type: string
                inputs_hash:
                  type: string
              required:
                - version
                - score
                - pool_share_bps
                - api_call_cents
                - reason
                - inputs_hash
              additionalProperties: false
            - type: "null"
        metadata:
          type: object
          propertyNames:
            type: string
          additionalProperties:
            type: string
      required:
        - id
        - object
        - livemode
        - created
        - status
        - athlete
        - amount_cents
        - currency
        - floor_ok
        - kind
        - basis
        - qualification
        - metadata
      additionalProperties: false
    License:
      type: object
      properties:
        id:
          type: string
        object:
          type: string
          const: license
        livemode:
          type: boolean
          const: false
        created:
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        status:
          type: string
          enum:
            - requires_athlete_approval
            - active
            - declined
            - revoked
            - expired
        athlete:
          type: string
        quote:
          type: string
        metadata:
          type: object
          propertyNames:
            type: string
          additionalProperties:
            type: string
        payment:
          anyOf:
            - type: object
              properties:
                object:
                  type: string
                  const: licence_payment
                status:
                  type: string
                  enum:
                    - requires_payment
                    - paid
                    - unbilled
                currency:
                  type: string
                  const: usd
                amount_cents:
                  type: integer
                  minimum: -9007199254740991
                  maximum: 9007199254740991
                brand_fee_cents:
                  type: integer
                  minimum: -9007199254740991
                  maximum: 9007199254740991
                total_cents:
                  type: integer
                  minimum: -9007199254740991
                  maximum: 9007199254740991
                split:
                  type: object
                  properties:
                    schedule:
                      type: string
                      const: brand_deal
                    athlete_bps:
                      type: integer
                      minimum: -9007199254740991
                      maximum: 9007199254740991
                    platform_bps:
                      type: integer
                      minimum: -9007199254740991
                      maximum: 9007199254740991
                    brand_fee_bps:
                      type: integer
                      minimum: -9007199254740991
                      maximum: 9007199254740991
                    athlete_cents:
                      type: integer
                      minimum: -9007199254740991
                      maximum: 9007199254740991
                    platform_cents:
                      type: integer
                      minimum: -9007199254740991
                      maximum: 9007199254740991
                  required:
                    - schedule
                    - athlete_bps
                    - platform_bps
                    - brand_fee_bps
                    - athlete_cents
                    - platform_cents
                  additionalProperties: false
                payout:
                  type: object
                  properties:
                    method:
                      type: string
                      const: stripe_connect
                    recipient:
                      type: string
                      const: athlete
                    amount_cents:
                      type: integer
                      minimum: -9007199254740991
                      maximum: 9007199254740991
                    transfer_group:
                      type: string
                  required:
                    - method
                    - recipient
                    - amount_cents
                    - transfer_group
                  additionalProperties: false
                checkout_url:
                  type:
                    - string
                    - "null"
              required:
                - object
                - status
                - currency
                - amount_cents
                - brand_fee_cents
                - total_cents
                - split
                - payout
                - checkout_url
              additionalProperties: false
            - type: "null"
      required:
        - id
        - object
        - livemode
        - created
        - status
        - athlete
        - quote
        - metadata
      additionalProperties: false
    RightsEvent:
      type: object
      properties:
        id:
          type: string
        object:
          type: string
          const: event
        type:
          type: string
          enum:
            - license.approved
            - license.declined
            - license.revoked
        livemode:
          type: boolean
          const: false
        created:
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        data:
          type: object
          properties:
            object:
              type: object
              properties:
                id:
                  type: string
                object:
                  type: string
                  const: license
                livemode:
                  type: boolean
                  const: false
                created:
                  type: integer
                  minimum: -9007199254740991
                  maximum: 9007199254740991
                status:
                  type: string
                  enum:
                    - requires_athlete_approval
                    - active
                    - declined
                    - revoked
                    - expired
                athlete:
                  type: string
                quote:
                  type: string
                metadata:
                  type: object
                  propertyNames:
                    type: string
                  additionalProperties:
                    type: string
                payment:
                  anyOf:
                    - type: object
                      properties:
                        object:
                          type: string
                          const: licence_payment
                        status:
                          type: string
                          enum:
                            - requires_payment
                            - paid
                            - unbilled
                        currency:
                          type: string
                          const: usd
                        amount_cents:
                          type: integer
                          minimum: -9007199254740991
                          maximum: 9007199254740991
                        brand_fee_cents:
                          type: integer
                          minimum: -9007199254740991
                          maximum: 9007199254740991
                        total_cents:
                          type: integer
                          minimum: -9007199254740991
                          maximum: 9007199254740991
                        split:
                          type: object
                          properties:
                            schedule:
                              type: string
                              const: brand_deal
                            athlete_bps:
                              type: integer
                              minimum: -9007199254740991
                              maximum: 9007199254740991
                            platform_bps:
                              type: integer
                              minimum: -9007199254740991
                              maximum: 9007199254740991
                            brand_fee_bps:
                              type: integer
                              minimum: -9007199254740991
                              maximum: 9007199254740991
                            athlete_cents:
                              type: integer
                              minimum: -9007199254740991
                              maximum: 9007199254740991
                            platform_cents:
                              type: integer
                              minimum: -9007199254740991
                              maximum: 9007199254740991
                          required:
                            - schedule
                            - athlete_bps
                            - platform_bps
                            - brand_fee_bps
                            - athlete_cents
                            - platform_cents
                          additionalProperties: false
                        payout:
                          type: object
                          properties:
                            method:
                              type: string
                              const: stripe_connect
                            recipient:
                              type: string
                              const: athlete
                            amount_cents:
                              type: integer
                              minimum: -9007199254740991
                              maximum: 9007199254740991
                            transfer_group:
                              type: string
                          required:
                            - method
                            - recipient
                            - amount_cents
                            - transfer_group
                          additionalProperties: false
                        checkout_url:
                          type:
                            - string
                            - "null"
                      required:
                        - object
                        - status
                        - currency
                        - amount_cents
                        - brand_fee_cents
                        - total_cents
                        - split
                        - payout
                        - checkout_url
                      additionalProperties: false
                    - type: "null"
              required:
                - id
                - object
                - livemode
                - created
                - status
                - athlete
                - quote
                - metadata
              additionalProperties: false
          required:
            - object
          additionalProperties: false
      required:
        - id
        - object
        - type
        - livemode
        - created
        - data
      additionalProperties: false
    ApiKeyIssued:
      type: object
      properties:
        object:
          type: string
          const: api_key
        id:
          type: string
        secret:
          type: string
        livemode:
          type: boolean
          const: false
        organization:
          type: string
      required:
        - object
        - id
        - secret
        - livemode
        - organization
      additionalProperties: false
    VerifyResult:
      type: object
      properties:
        licensed:
          type: boolean
        ai_generated:
          type: boolean
        athlete:
          type: object
          properties:
            id:
              type: string
            name:
              type: string
          required:
            - id
            - name
          additionalProperties: false
        licence:
          type: object
          properties:
            id:
              type: string
          required:
            - id
          additionalProperties: false
        consent_date:
          type: string
      required:
        - licensed
      additionalProperties: false
    Receipt:
      type: object
      properties:
        id:
          type: string
          pattern: "^rcpt_[a-f0-9]{24}$"
        object:
          type: string
          const: receipt
        livemode:
          type: boolean
        algorithm:
          type: string
          const: Ed25519
        key_id:
          type: string
        payload:
          type: object
          properties:
            format:
              type: string
              const: valaritas.receipt.v1
            receipt_id:
              type: string
            use_id:
              type: string
            use_kind:
              type: string
              enum:
                - generation
            licence_id:
              type:
                - string
                - "null"
            clearance_id:
              type:
                - string
                - "null"
            athlete_id:
              type: string
            organization_id:
              type: string
            api_key_id:
              type: string
            livemode:
              type: boolean
            terms_version:
              type:
                - string
                - "null"
            issued_at:
              type: string
          required:
            - format
            - receipt_id
            - use_id
            - use_kind
            - licence_id
            - clearance_id
            - athlete_id
            - organization_id
            - api_key_id
            - livemode
            - terms_version
            - issued_at
          additionalProperties: false
        signature:
          type: string
      required:
        - id
        - object
        - livemode
        - algorithm
        - key_id
        - payload
        - signature
      additionalProperties: false
    ReceiptVerification:
      type: object
      properties:
        object:
          type: string
          const: receipt_verification
        valid:
          type: boolean
        receipt:
          type:
            - string
            - "null"
        key_id:
          type:
            - string
            - "null"
        recorded:
          type:
            - boolean
            - "null"
        reason:
          type: string
          enum:
            - signature_valid
            - malformed
            - unknown_key
            - signature_invalid
            - not_configured
      required:
        - object
        - valid
        - receipt
        - key_id
        - recorded
        - reason
      additionalProperties: false
    ReceiptKey:
      type: object
      properties:
        object:
          type: string
          const: receipt_key
        algorithm:
          type: string
          const: Ed25519
        configured:
          type: boolean
        key_id:
          type:
            - string
            - "null"
        public_key_pem:
          type:
            - string
            - "null"
        signed_bytes:
          type: string
      required:
        - object
        - algorithm
        - configured
        - key_id
        - public_key_pem
        - signed_bytes
      additionalProperties: false
