---
title: "Create a Chart of Accounts Template"
method: POST
path: "/books/agent-coa-templates"
tags: ["Books"]
---

# Create a Chart of Accounts Template

`POST /books/agent-coa-templates`

Create a new agent-owned Chart of Accounts template. These templates can be used when creating new Books instances for clients.

## Query parameters

- `expand` 'ledgers' — Comma-separated list of expandable paths.

## Request body

- CreateBooksAPICoaTemplateRequest — Request to create a new Chart of Accounts template.
  - `accountingBasis` 'cash' | 'accrual', required — The accounting basis for this Chart of Accounts template.
  - `name` string, required — An arbitrary string on the object, useful for identifying the Chart of Accounts template.

## Response `200`

- CreateBooksAPIAgentCoaTemplateResponse — Response after creating a COA template.
  - `coaTemplate` object, required — The created Chart of Accounts template
    - `accountingBasis` 'cash' | 'accrual', required — The accounting basis of the template
    - `id` string, base58 (max length 22), required — The ID of the template
    - `name` string, required — The name of the template
    - `type` 'agent' | 'platform', required — Whether this template belongs to an agent or a platform

## Other responses

- `400` — Invalid `body` or `expand`

---

[API](https://skmtc.net/mercurytechnologies/apis/mercury-api.md) · [All operations](https://skmtc.net/mercurytechnologies/apis/mercury-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/mercurytechnologies/mercury-api/revisions/0bdf4a496e03/schema)
