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

# Create a listing

> Anyone can sell. Signed in (`Authorization: Bearer`), the listing is sold by the account and `sellerAddress` is ignored. Without a session (scripts), the creator signs the listing with the wallet of `sellerAddress`. The API stores the content and returns its SHA-256 as `contentHash`; protected quotes commit to it. Instant sales pay the creator directly; protected sales lock into the escrow with the platform as seller of record, which pays the creator `price − max(1.5 tADA, 10%)` once the escrow releases.



## OpenAPI

````yaml https://api.simpuru.xyz/openapi.json post /listings
openapi: 3.1.0
info:
  title: Simpuru API
  version: 0.1.0
  summary: Buyer protection for AI agents paying with x402 on Cardano (preprod).
  description: >-
    Sellers list design prompts; each listing commits to the SHA-256 of its
    content.

    Buyers (people or agents) pay over **x402** on Cardano preprod, either
    **instant** (pay the seller)

    or **protected** (lock into our `vested_pay` escrow, released only if
    delivery checks out).


    Consumers: the web app (`apps/web`), the buyer agent and protection watcher
    (`apps/agent`), the MCP

    server (`apps/mcp`, hosted at `/mcp`), and the arbiter service
    (`apps/arbiter`, internal).


    Every on-chain claim can be checked on
    `https://preprod.cardanoscan.io/transaction/<hash>`.
  license:
    name: MIT
    identifier: MIT
servers:
  - url: https://api.simpuru.xyz
    description: Production (Cardano preprod)
  - url: http://localhost:4021
    description: Local `bun run dev` in apps/api
security: []
tags:
  - name: Account
    description: >-
      Sign in with a Cardano wallet (CIP-30 `signData`), then use the session as
      `Authorization: Bearer <token>`. Every account has a Simpuru wallet: a
      preprod wallet the platform holds for the owner, funded with tADA, that
      web purchases and the owner's agents spend from.
  - name: Catalogue
    description: Free listing data.
  - name: Paid content
    description: 'The x402 paywall: instant or escrow-protected.'
  - name: Purchases
    description: Purchase timelines, derived from chain by the seller agent.
  - name: MCP
    description: Model Context Protocol endpoint for agents (Claude Code, Cursor, ...).
  - name: Arbiter (internal)
    description: Dispute settlement service, `apps/arbiter`, port 4023. Not public.
  - name: System
    description: Health.
paths:
  /listings:
    post:
      tags:
        - Catalogue
      summary: Create a listing
      description: >-
        Anyone can sell. Signed in (`Authorization: Bearer`), the listing is
        sold by the account and `sellerAddress` is ignored. Without a session
        (scripts), the creator signs the listing with the wallet of
        `sellerAddress`. The API stores the content and returns its SHA-256 as
        `contentHash`; protected quotes commit to it. Instant sales pay the
        creator directly; protected sales lock into the escrow with the platform
        as seller of record, which pays the creator `price − max(1.5 tADA, 10%)`
        once the escrow releases.
      operationId: createListing
      parameters:
        - name: X-Simpuru-Proof
          in: header
          required: false
          schema:
            type: string
            contentEncoding: base64
            contentMediaType: application/json
            contentSchema:
              $ref: '#/components/schemas/UnlockProof'
          description: >-
            Base64 JSON `UnlockProof` signed by `sellerAddress` (CIP-30
            `signData`) over `sha256("simpuru:listing:v1\n" + sellerAddress +
            "\n" + sha256(content) + "\n" + priceLovelace + "\n" + timestamp)`,
            at most 5 min old.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NewListing'
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Listing'
        '400':
          description: Invalid input; `error` says which field
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: No session and no valid signature
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    NewListing:
      type: object
      properties:
        title:
          type: string
          minLength: 1
          maxLength: 120
        description:
          type: string
          minLength: 1
          maxLength: 2000
        priceLovelace:
          type: string
          pattern: ^[0-9]+$
          description: ≥ 1,000,000 instant; ≥ 5,000,000 when `protected` is offered.
        sellerAddress:
          type: string
          pattern: ^addr_test1
        modes:
          type: array
          items:
            $ref: '#/components/schemas/DeliveryMode'
          minItems: 1
        content:
          type: string
          description: What is sold (max 1 MiB). Hashed; never returned by the catalogue.
        previewMedia:
          type: string
          description: https URL ending in .mp4, .webm, .webp or .gif.
        category:
          $ref: '#/components/schemas/Category'
      required:
        - title
        - description
        - priceLovelace
        - sellerAddress
        - modes
        - content
    Listing:
      type: object
      properties:
        id:
          type: string
        title:
          type: string
        description:
          type: string
        priceLovelace:
          type: string
          pattern: ^[0-9]+$
          description: Amount in lovelace (1 tADA = 1,000,000).
        sellerAddress:
          type: string
          description: Preprod address that sells (and, instant, gets paid).
        modes:
          type: array
          items:
            $ref: '#/components/schemas/DeliveryMode'
        contentHash:
          type: string
          pattern: ^[0-9a-f]{64}$
          description: SHA-256 of the content the buyer receives.
        previewMedia:
          type: string
          format: uri
          description: Free https recording of what the prompt builds.
        category:
          $ref: '#/components/schemas/Category'
        createdAt:
          type: string
          description: Unix ms.
        sales:
          type: integer
          description: Purchases that were not refunded.
        sellerReputation:
          type: object
          description: >-
            From the seller's closed escrows: 100 × withdrawn / (withdrawn +
            refunded). Absent until one.
          properties:
            score:
              type: integer
              minimum: 0
              maximum: 100
            basis:
              type: integer
          required:
            - score
            - basis
      required:
        - id
        - title
        - description
        - priceLovelace
        - sellerAddress
        - modes
        - contentHash
    Error:
      type: object
      properties:
        error:
          type: string
      required:
        - error
    DeliveryMode:
      type: string
      enum:
        - instant
        - protected
    Category:
      type: string
      enum:
        - Landing Page
        - Hero
        - Portfolio
        - SaaS
        - Fintech
        - 3D
        - AI
        - Editorial
        - Wellness

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.