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

# Post a mocked top-up receipt and immutable credit lot



## OpenAPI

````yaml /openapi.json post /api/v1/workspaces/{workspace}/credits/top-up
openapi: 3.0.3
info:
  title: ai-cmo.dev Services API
  version: 1.0.0
servers: []
security: []
paths:
  /api/v1/workspaces/{workspace}/credits/top-up:
    post:
      summary: Post a mocked top-up receipt and immutable credit lot
      operationId: mockWorkspaceCreditTopUp
      parameters:
        - name: workspace
          in: path
          required: true
          schema:
            type: string
            pattern: ^[a-z0-9-]+$
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreditTopUp'
      responses:
        '201':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreditTopUpReceipt'
      security:
        - cookieAuth: []
components:
  schemas:
    CreditTopUp:
      type: object
      properties:
        amountMicrousd:
          type: integer
          exclusiveMinimum: true
          minimum: 0
        idempotencyKey:
          type: string
          minLength: 1
          maxLength: 200
      required:
        - amountMicrousd
        - idempotencyKey
      additionalProperties: false
    CreditTopUpReceipt:
      type: object
      properties:
        receiptId:
          type: string
        entryId:
          type: string
        amountMicrousd:
          type: integer
          exclusiveMinimum: true
          minimum: 0
        status:
          type: string
          enum:
            - succeeded
        createdAt:
          type: string
        replayed:
          type: boolean
      required:
        - receiptId
        - entryId
        - amountMicrousd
        - status
        - createdAt
        - replayed
      additionalProperties: false
  securitySchemes:
    cookieAuth:
      type: apiKey
      in: cookie
      name: geo.session
      description: Signed HttpOnly browser session cookie

````