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

# What this category needs

> The one call to make before building a create body. `attributes[]` is
the category's field list; `requirements` is what the create body must
carry. Both are derived from the validation itself.




## OpenAPI

````yaml /openapi.yaml get /v1/offers/games/{game}/categories/{category_slug}/schema
openapi: 3.1.0
info:
  title: MoonUP Seller API
  version: 1.0.0
  summary: List and manage your offers from your own tools.
  description: |
    Everything a seller's bot needs to keep a catalogue of listings up to date:
    read what a category expects, create a listing, restock it, pause it,
    archive it.

    This is the public surface. The cabinet's own screens — payouts, disputes,
    account settings — are not part of it and an API key does not reach them.

    ## Authentication

    Create a key in the cabinet under **Seller → API keys**. It is shown once.
    Send it on every request:

    ```
    Authorization: Bearer moonup_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    ```

    There is nothing to exchange it for — no short-lived token sits in between.
    HTTPS only. Keep the key in an environment variable or your CI's secret
    store, never in a repository.

    A key may be pinned to a list of addresses when you create it (up to 16
    addresses or subnets). An empty list means any address.

    ## Creating a listing

    Categories do not ask for the same things. An accounts listing needs a
    picture and a price; a currency listing needs a product and a stock; a
    gift-card listing may only be delivered instantly, with an activation code.

    Rather than describing that in prose that would go stale, every category
    answers for itself:

        GET /v1/offers/games/{game}/categories/{category_slug}/schema

    `attributes[]` is the category's own field list, and `requirements` is what
    the body of `POST /v1/offers` must carry for it. Both come from the code
    that validates the create call, so what you are told is what you are held
    to.

    A full pass looks like this:

    1. `GET /v1/offers/games` — pick a game, keep its `slug`.
    2. `GET /v1/offers/games/{game}/categories` — pick a category.
    3. `GET /v1/offers/games/{game}/categories/{category_slug}/schema` — read
       `requirements` and `attributes`.
    4. `POST /v1/offers/images/upload-url`, then PUT the bytes to the URL it
       returns. Repeat per picture, collect the public URLs.
    5. `POST /v1/offers` — the listing is created as a `draft`.
    6. `POST /v1/offers/{id}/submit` — it goes to moderation, then active.

    ## Rate limits

    | | Budget |
    |---|---|
    | Reads | 500 requests per minute |
    | Writes | 250 requests per minute |
    | Writes to one offer | 5 per minute and 10 per hour |

    Going over answers `429`. It is temporary: wait and retry, the key stays
    valid. Up to 5 keys per account — create the second one ahead of time so
    you can rotate without downtime.

    ## Errors

    Every failure answers with the same body, a stable snake_case code:

    ```json
    { "error": "seller_instructions_required" }
    ```

    Branch on `error`, not on the message — there is no message.
servers:
  - url: https://api.moonup.gg
    description: Production
security:
  - api_key: []
tags:
  - name: Catalog
    description: |
      What can be listed, and what each category asks for. Public: these read
      without a key, so you can explore before you have one.
  - name: Offers
    description: Your own listings — create, edit, restock, pause, archive.
paths:
  /v1/offers/games/{game}/categories/{category_slug}/schema:
    get:
      tags:
        - Catalog
      summary: What this category needs
      description: |
        The one call to make before building a create body. `attributes[]` is
        the category's field list; `requirements` is what the create body must
        carry. Both are derived from the validation itself.
      parameters:
        - $ref: '#/components/parameters/Game'
        - $ref: '#/components/parameters/CategorySlug'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CategorySchema'
              examples:
                accounts:
                  summary: An accounts category — a picture, a price, either delivery
                  value:
                    id: 018f2c1e-0000-7000-8000-000000000001
                    game_category_id: 018f2c1e-0000-7000-8000-000000000002
                    version: 1
                    attributes:
                      - key: more_played_game
                        label: Most Played Game
                        type: enum
                        required: true
                        filterable: true
                        enum_values:
                          - Blox Fruits
                          - Adopt Me!
                      - key: robux_balance
                        label: Robux Balance
                        type: number
                        required: false
                        filterable: false
                        min: 0
                    requirements:
                      required:
                        - game
                        - category
                        - title
                        - delivery_type
                        - price
                      delivery_types:
                        - value: instant
                          required:
                            - units
                        - value: manual
                          required:
                            - manual_delivery_value
                            - manual_delivery_unit
                      min_images: 1
                currency:
                  summary: >-
                    A currency category — priced per unit out of a stock, manual
                    only
                  value:
                    id: 018f2c1e-0000-7000-8000-000000000003
                    game_category_id: 018f2c1e-0000-7000-8000-000000000004
                    version: 2
                    attributes: []
                    requirements:
                      required:
                        - game
                        - category
                        - title
                        - delivery_type
                        - product_slug
                        - price_per_unit
                        - stock_quantity
                        - min_order_quantity
                        - seller_instructions
                        - delivery_method
                      delivery_types:
                        - value: manual
                          required:
                            - manual_delivery_value
                            - manual_delivery_unit
                      min_images: 0
        '404':
          $ref: '#/components/responses/NotFound'
      security: []
components:
  parameters:
    Game:
      name: game
      in: path
      required: true
      description: The game's `slug`, or its id — both are accepted.
      schema:
        type: string
        examples:
          - roblox
    CategorySlug:
      name: category_slug
      in: path
      required: true
      schema:
        type: string
        examples:
          - accounts
  schemas:
    CategorySchema:
      type: object
      description: A category's fields, and what its create call demands.
      properties:
        id:
          type: string
          format: uuid
        game_category_id:
          type: string
          format: uuid
        version:
          type: integer
          description: The schema version a listing created now is pinned to.
        attributes:
          type: array
          items:
            $ref: '#/components/schemas/SchemaField'
        requirements:
          $ref: '#/components/schemas/CategoryRequirements'
        created_at:
          type:
            - string
            - 'null'
          format: date-time
    SchemaField:
      type: object
      description: One field of a category's attribute schema.
      properties:
        key:
          type: string
        label:
          type: string
        type:
          type: string
          enum:
            - string
            - number
            - boolean
            - enum
            - reference
            - password
        required:
          type: boolean
        filterable:
          type: boolean
        multiple:
          type: boolean
          description: The value is then an array of what `type` describes.
        enum_values:
          type: array
          items:
            type: string
          description: Allowed values, for `enum`.
        catalog_key:
          type: string
          description: |
            For `reference` — which catalog to read the allowed ids from, at
            `GET /v1/offers/games/{game_id}/catalog/{attribute_key}`. Equal to
            `key` when absent.
        min:
          type: number
        max:
          type: number
      required:
        - key
        - label
        - type
        - required
        - filterable
    CategoryRequirements:
      type: object
      description: |
        What `POST /v1/offers` demands for this category. Derived from the same
        rules the create call validates against, so it cannot drift from them.
      properties:
        required:
          type: array
          items:
            type: string
          description: >-
            Body fields every listing here must carry, whatever its delivery
            type.
        delivery_types:
          type: array
          description: >-
            The delivery types this category allows, each with what picking it
            adds.
          items:
            type: object
            properties:
              value:
                type: string
                enum:
                  - instant
                  - manual
              required:
                type: array
                items:
                  type: string
              delivery_methods:
                type: array
                items:
                  type: string
                description: |
                  The `delivery_method` keys allowed with this delivery type.
                  Absent means the category does not narrow the global list.
            required:
              - value
              - required
        min_images:
          type: integer
          description: How many pictures the create call demands.
      required:
        - required
        - delivery_types
        - min_images
    Error:
      type: object
      description: The one failure shape this API answers with.
      properties:
        error:
          type: string
          description: A stable snake_case code. Branch on this.
          examples:
            - seller_instructions_required
      required:
        - error
  responses:
    NotFound:
      description: >-
        No such thing — or none you may know about, which answers the same on
        purpose.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            not_found:
              value:
                error: not_found
  securitySchemes:
    api_key:
      type: http
      scheme: bearer
      description: Your API key, from the cabinet under **Seller → API keys**.

````