---
title: "Create a class allocation"
method: POST
path: "/class-allocations"
tags: ["Accounting"]
---

# Create a class allocation

`POST /class-allocations`

## Request

- Base URL: `https://ledgerhq.pro/api/v1`
- URL: `https://ledgerhq.pro/api/v1/class-allocations`
- Auth: one of:
  - HTTP bearer and API key in header `x-organization-id`
  - HTTP bearer and API key in header `x-organization-id`

## Request body

- object
  - `name` string, required
  - `shares` object[], required
    - `classId` string, uuid, required: Active class of this company
    - `basisPoints` integer, required: Share in basis points; shares must total 10000

## Response `201`

{ data: Allocation }

## Other responses

- `422`: Error response
- `default`: Error response

---

[API](https://skmtc.dev/ledgerhq-pro/apis/ledgerhq-bookkeeping-api.md) · [All operations](https://skmtc.dev/ledgerhq-pro/apis/ledgerhq-bookkeeping-api/llms.txt) · [OpenAPI document](https://skmtc.dev/ledgerhq-pro/apis/ledgerhq-bookkeeping-api/revisions/9a8269f0a586?raw)
