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

# Create Offer

> Create hub offer



## OpenAPI

````yaml POST /v1alpha1/offers
openapi: 3.1.0
info:
  title: ToffeePay API
  description: Public API for game partners
  version: 0.1.1
servers:
  - url: https://api.toffeepay.com
    description: Production
  - url: https://api.sandbox.toffeepay.com
    description: Sandbox
security:
  - BearerAuth: []
paths:
  /v1alpha1/offers:
    post:
      summary: CreateOffer
      description: Create hub offer
      operationId: OfferService_CreateOffer
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/hub.v1alpha1.CreateOfferRequest'
        required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/hub.v1alpha1.CreateOfferResponse'
components:
  schemas:
    hub.v1alpha1.CreateOfferRequest:
      type: object
      properties:
        game_id:
          type: string
          title: game_id
        user_id:
          type:
            - string
            - 'null'
          title: user_id
        reference:
          type:
            - string
            - 'null'
          title: reference
        title:
          type: string
          title: title
        description:
          type:
            - string
            - 'null'
          title: description
        image:
          type: string
          title: image
          pattern: ^(https?://|data:)
        category:
          type: string
          title: category
        label:
          type:
            - string
            - 'null'
          title: label
        status:
          type:
            - string
            - 'null'
          title: status
          enum:
            - inactive
            - active
        items:
          type: array
          items:
            $ref: '#/components/schemas/hub.v1alpha1.OfferItem'
          title: items
          minItems: 1
        price:
          exclusiveMinimum: 0
          type: integer
          title: price
          format: int32
        currency:
          type: string
          title: currency
          enum:
            - USD
            - GBP
            - EUR
        stock:
          exclusiveMinimum: 0
          type:
            - integer
            - 'null'
          title: stock
          format: int32
        country:
          type: string
          title: country
          maxLength: 2
          minLength: 2
          pattern: ^[A-Z]{2}$
          description: 'ISO 3166-1 alpha-2: "US", "GB", "DE"'
        return_url:
          type: string
          title: return_url
          format: uri
        wallet_enabled:
          type:
            - boolean
            - 'null'
          title: wallet_enabled
      title: CreateOfferRequest
      required:
        - game_id
        - title
        - image
        - category
        - items
        - price
        - currency
        - country
      additionalProperties: false
    hub.v1alpha1.CreateOfferResponse:
      type: object
      properties:
        id:
          type: string
          title: id
      title: CreateOfferResponse
      required:
        - id
      additionalProperties: false
    hub.v1alpha1.OfferItem:
      type: object
      properties:
        id:
          type: string
          title: id
        icon:
          type: string
          title: icon
          pattern: ^(https?://|data:)
        amount:
          exclusiveMinimum: 0
          type: integer
          title: amount
          format: int32
      title: OfferItem
      required:
        - id
        - icon
        - amount
      additionalProperties: false
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````