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

# Create ledger entry

> Create a new entry in the ledger



## OpenAPI

````yaml post /v1/ledgers/{id}/entries
openapi: 3.0.0
info:
  title: Ledgers API
  version: 1.0.0
  description: API for managing accounting ledgers and entries
servers: []
security:
  - bearerAuth: []
tags:
  - name: Ledgers
    description: Ledger management operations
paths:
  /v1/ledgers/{id}/entries:
    post:
      tags:
        - Ledger Entries
      summary: Create ledger entry
      description: Create a new entry in the ledger
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: Ledger UUID
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateLedgerEntryInput'
      responses:
        '201':
          description: Entry created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LedgerEntry'
components:
  schemas:
    CreateLedgerEntryInput:
      type: object
      required:
        - transaction_id
        - amount
        - type
      properties:
        transaction_id:
          type: string
          format: uuid
          description: Unique transaction identifier
        amount:
          type: integer
          description: Entry amount in cents
          minimum: 1
        type:
          type: string
          enum:
            - credit
            - debit
          description: Type of entry
        description:
          type: string
          description: Entry description
        metadata:
          type: object
          additionalProperties: true
          description: Additional entry metadata
    LedgerEntry:
      type: object
      properties:
        id:
          type: string
          format: uuid
        ledger_id:
          type: string
          format: uuid
        transaction_id:
          type: string
          format: uuid
        amount:
          type: integer
          description: Amount in cents
        type:
          type: string
          enum:
            - credit
            - debit
        description:
          type: string
        balance:
          type: integer
          description: Running balance in cents
        timestamp:
          type: string
          format: date-time
        metadata:
          type: object
          nullable: true
        created_at:
          type: string
          format: date-time
        created_by:
          type: string
          format: uuid
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````