Inventory Manager API · accounts
Add an account to the chart, kept by the organization
POST /accounts
Codes are text (a whole number is read as its digits), unique within the organization — 409 AccountCodeConflict if one already answers to it. Appends inventory.account-saved. Needs the admin job. Idempotent on the code: a retried create meets 409 AccountCodeConflict, never a second account.
Access
Requires settings:write.
How scopes come from roles: Scopes and roles. Getting a token: Authentication and app tokens.
Retries
Idempotent on the code: a retried create meets 409 AccountCodeConflict, never a second account.
A retry with the same key answers 201, with what the first call recorded.
Why every write carries a key: Idempotency and retries.
Facts appended
inventory.account-saved
What a fact is: Facts and the journal.
AI agent tool
Agents call this as accounting_create_account (Accounting: Create account), in the accounting toolset.
Connecting an agent: AI agents.
Example
curl -X POST 'https://inventory.getmanifold.io/accounts' \
-H "Authorization: Bearer $MANIFOLD_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"code": "4010",
"name": "Wholesale sales",
"description": "Income from trade customers."
}'const response = await fetch("https://inventory.getmanifold.io/accounts", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.MANIFOLD_TOKEN}`, "Content-Type": "application/json" },
body: JSON.stringify({
"code": "4010",
"name": "Wholesale sales",
"description": "Income from trade customers."
}),
});
if (!response.ok) throw new Error(`${response.status}: ${await response.text()}`);
const answer = await response.json();{
"code": "4010",
"name": "Wholesale sales",
"description": "Income from trade customers."
}{
"id": "acct_01a161c4-0a00-72db-a577-07bcb2a24026",
"code": "4010",
"name": "Wholesale sales",
"description": "Income from trade customers.",
"createdAt": "2026-10-22T04:00:00.000Z",
"updatedAt": "2026-10-22T04:00:00.000Z"
}The panel writes this call in other languages. It does not send it: Manifold's APIs do not take calls from a web
page on another site, so run the call from your own code or terminal. The whole API as OpenAPI: inventory-manager.openapi.json. Base URL https://inventory.getmanifold.io.
Errors
Every refusal is a status and a JSON body whose _tag names it. A refused call changes nothing. Some can answer a retry of a call that already worked: they are marked.
401
| Refusal | What it means | What to do |
|---|---|---|
Unauthorized reason | The token is missing, expired or not one Manifold issued. | Get a fresh token and send the call again. |
TokenAlreadyUsed tokenId | A single-use app token was already spent. | Mint a new token for this call. |
402
| Refusal | What it means | What to do |
|---|---|---|
SubscriptionRequired status | The organization's subscription has lapsed, so writes are refused. | An owner settles billing. Reads still work meanwhile. |
403
| Refusal | What it means | What to do |
|---|---|---|
TenantRequired userId | The token names no organization. | Choose the organization, then get a new token. |
ScopeRequired required | The token's roles do not grant the scope this call needs. | Ask an owner or admin for a role that grants it. |
409
| Refusal | What it means | What to do |
|---|---|---|
AccountCodeConflict code Can answer a retry | Another account already has this code. | If this answers a retry, your first call probably landed. Choose another code. |
MirroredFromSource source | This area is fed by your source system until the organization goes live. | Make the change in the source system, or go live first. |
503
| Refusal | What it means | What to do |
|---|---|---|
RequestLogUnavailable tokenId, reason | The service could not record the request, so it did nothing. | Send the same request again, with the same key. |
How refusals work everywhere: Errors.
Used in
- Journal an additional cost on an order, step 1: Add an account for freight
- Keeping the chart of accounts, step 3: Add a wholesale sales account