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

# Create a Chart of Accounts Template

`POST /agent-coa-templates/{booksId}`

## Request

- Base URL: `https://api.mercury.com/api/v1`
- URL: `https://api.mercury.com/api/v1/agent-coa-templates/{booksId}`
- Auth: one of:
  - HTTP bearer
  - HTTP basic

## Path parameters

- `booksId` string, uuid, required

## Query parameters

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

## Request body

- CreateCoaTemplateRequest: Request body for creating a COA template
  - `accounting_basis` '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`

## Other responses

- `400`: Invalid `body` or `expand`
- `404`: `booksId` not found

## Changes

- **2026-10-16** `ab652aa5aa8e`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/mercurytechnologies/apis/mercury-api/changes/agent-coa-templates/:booksId/post.md)

---

[API](https://skmtc.dev/mercurytechnologies/apis/mercury-api.md) - [All operations](https://skmtc.dev/mercurytechnologies/apis/mercury-api/llms.txt) - [OpenAPI document](https://skmtc.dev/mercurytechnologies/apis/mercury-api/revisions/ab652aa5aa8e?raw)
