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

# Post transaction

> Creates a new financial transaction record in the guild ledger. Positive amounts are deposits (money goes up), negative amounts are withdrawals (money goes down). Optional explicit type validation helps catch exploiters.

### Required Scopes

```
guild:write
```

### Rate Limit

10 requests per second


## OpenAPI

````yaml POST /guild/ledger
openapi: 3.1.0
info:
  title: Multex Discord Bot API
  version: 1.0.0
  description: API documentation for Multex Discord bot
servers:
  - url: https://api.multex.tech
    description: Development server
security: []
paths:
  /guild/ledger:
    post:
      tags:
        - Guild Management
        - Financial
      summary: Create Ledger Transaction
      description: >-
        Creates a new financial transaction record in the guild ledger. Positive
        amounts are deposits (money goes up), negative amounts are withdrawals
        (money goes down). Optional explicit type validation helps catch
        exploiters.
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - robloxId
                - name
                - quantity
                - amount
                - source
              properties:
                robloxId:
                  type: string
                  description: Roblox user ID of the player
                name:
                  type: string
                  description: Name of the transaction (item name, etc.)
                quantity:
                  type: number
                  minimum: 1
                  description: Quantity of items in the transaction
                amount:
                  type: number
                  description: Amount per item (positive = deposit, negative = withdrawal)
                source:
                  type: string
                  description: Source of the transaction
                deposit:
                  type: boolean
                  description: 'Optional: explicitly mark as deposit for validation'
                withdrawal:
                  type: boolean
                  description: 'Optional: explicitly mark as withdrawal for validation'
      responses:
        '200':
          description: Transaction created successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: Transaction Posted (deposit)
                  type:
                    type: string
                    enum:
                      - deposit
                      - withdrawal
                    example: deposit
        '400':
          description: Bad request - missing required fields
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: Bad request - missing required fields
        '401':
          description: Unauthorized - invalid API key
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: Unauthorized - invalid API key
        '422':
          description: >-
            Unprocessable Entity - explicit type conflicts with amount
            (potential exploit)
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: >-
                      Explicit deposit flag conflicts with negative amount
                      (potential exploit detected)
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: API key for accessing protected guild endpoints

````