# Post a manual entry

`POST /accounting/journal` · Rivier · accounting

Post a manual entry.

- Scope: accounting:write
- Sdk: accounting.journal.post
- Cli: accounting journal post

## Request body

`application/json`

```json
{
  "type": "object",
  "properties": {
    "date": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "memo": {
      "type": "string",
      "minLength": 1,
      "maxLength": 300
    },
    "currency": {
      "type": "string",
      "pattern": "^[a-z]{3}$"
    },
    "lines": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "account": {
            "type": "string",
            "minLength": 1,
            "maxLength": 40,
            "description": "account code"
          },
          "debitMinor": {
            "type": "integer",
            "minimum": 0,
            "maximum": 99999999999,
            "default": 0
          },
          "creditMinor": {
            "type": "integer",
            "minimum": 0,
            "maximum": 99999999999,
            "default": 0
          },
          "memo": {
            "type": "string",
            "maxLength": 200,
            "default": ""
          }
        },
        "required": [
          "account"
        ],
        "additionalProperties": false
      },
      "minItems": 2,
      "maxItems": 60
    },
    "idempotencyKey": {
      "type": "string",
      "minLength": 1,
      "maxLength": 120
    }
  },
  "required": [
    "date",
    "memo",
    "lines",
    "idempotencyKey"
  ],
  "additionalProperties": false
}
```

## Responses

- `201`: Success
- `400`: The request was malformed
- `401`: No valid credential
- `403`: The credential lacks the scope, origin or address
- `429`: Over the key's rate limit; see Retry-After

## Example

```sh
curl -X POST 'https://api.rivier.ai/accounting/journal' \
  -H 'Authorization: Bearer $KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "date": "string",
  "memo": "string",
  "lines": [
    {
      "account": "string"
    }
  ],
  "idempotencyKey": "string"
}'
```
