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

# Create a journal entry

> Create a journal entry

### Request body

`CreateJournalEntryRequest`

<ParamField body="auto_post" type="boolean,null">
  Post immediately after creation when balanced.
</ParamField>

<ParamField body="description" type="string" required />

<ParamField body="entry_date" type="string" required>
  Entry date in `YYYY-MM-DD` format. Must fall in an open period.
</ParamField>

<ParamField body="entry_type" type="string,null">
  One of `standard`, `adjusting`, `closing`, `reversing`, `opening`.
</ParamField>

<ParamField body="lines" type="CreateJournalEntryLineRequest[]" required />

### Responses

<ResponseField name="201" type="JournalEntryResponse" />

<ResponseField name="400" type="ErrorBody" />

<ResponseField name="422" type="ErrorBody" />

<RequestExample>
  ```bash cURL theme={null}
  curl --request POST \
    --url 'https://api.stateset.com/api/v1/gl/journal-entries' \
    --header 'Authorization: Bearer YOUR_API_KEY' \
    --header 'Content-Type: application/json' \
    --data '{
    "auto_post": null,
    "description": "string",
    "entry_date": "string",
    "entry_type": null,
    "lines": [
      {
        "account_id": "string",
        "credit_amount": null,
        "debit_amount": null,
        "description": null
      }
    ]
  }'
  ```
</RequestExample>

<ResponseExample>
  ```json 201 theme={null}
  {
    "created_at": "string",
    "description": "string",
    "entry_date": "string",
    "entry_number": "string",
    "entry_type": "string",
    "id": "string",
    "is_balanced": true,
    "lines": [
      {
        "account_id": "string",
        "account_name": null,
        "account_number": null,
        "credit_amount": "string",
        "currency": "string",
        "debit_amount": "string",
        "description": null,
        "id": "string",
        "line_number": 1
      }
    ],
    "period_id": "string",
    "posted_at": null,
    "posted_by": null,
    "reversed_entry_id": null,
    "reversing_entry_id": null,
    "source": "string",
    "status": "string",
    "total_credits": "string",
    "total_debits": "string"
  }
  ```
</ResponseExample>
