Ledga
POST/account-sets

Create a new account set

Store a newly created account set

Request bodyrequired

FieldTypeDescription
coderequired string Unique code for this set
namerequired string Display name
description string
nullable
metadata object
nullable

Responses

201Account set created
{
  "success": true,
  "data": {
    "id": "01997c1e-4d2a-7c3e-9a1b-2f0e8c6d4b5a",
    "ledger_id": "01997c1e-4d2a-7c3e-9a1b-2f0e8c6d4b5a",
    "code": "OPERATING_EXPENSES",
    "name": "Operating Expenses",
    "created_at": "2026-01-15T10:30:00Z",
    "updated_at": "2026-01-15T10:30:00Z"
  }
}
400Validation error
{
  "success": false,
  "message": "Validation failed",
  "code": "VALIDATION_ERROR"
}
401Unauthenticated
{
  "success": false,
  "message": "Validation failed",
  "code": "VALIDATION_ERROR"
}
403Forbidden
{
  "success": false,
  "message": "Validation failed",
  "code": "VALIDATION_ERROR"
}

Examples

curl -X POST https://ledga.io/api/v1/account-sets \
  -H "Authorization: Bearer sk_xxxxxxxx_your_secret" \
  -H "Content-Type: application/json" \
  -d '{
  "code": "OPERATING_EXPENSES",
  "name": "Operating Expenses"
}'

← All endpoints