canonical: https://jentic.com/apis/external.pleo.io/pleo-bookkeeping-core-api

# External Pleo Bookkeeping Core API

Jentic publishes the only available OpenAPI specification for Pleo's Bookkeeping Core API, keeping it validated and agent-ready. Pleo is a European business spend management platform, and the Bookkeeping Core API exposes the chart-of-accounts surface used by accounting integrations: create, retrieve, update, delete, and search the accounts that Pleo expense data is posted against. The five endpoints sit under `/v1-beta/accounts` and use bearer-token authentication.

## For AI agents

Manage the chart of accounts in a Pleo company through the Bookkeeping Core API: create, fetch, update, delete, and search accounts that Pleo expenses are bookkeeped against.

## Scope

Does not handle expense submission, card issuance, journal entries, or tax coding - use for chart-of-accounts CRUD and search inside Pleo only.

## Capabilities

- Create a new bookkeeping account inside a Pleo company's chart of accounts
- Retrieve a single account by its Pleo account ID
- Update an existing account's properties such as name, code, or status
- Delete an account that is no longer needed in the chart of accounts
- Search the chart of accounts by code, name, or other filterable fields
- Operate inside the `/v1-beta/accounts` namespace under bearer-token authentication

## Use cases

### Chart of Accounts Sync from General Ledger

Use POST `/v1-beta/accounts` to push each general ledger code from an upstream accounting system into Pleo, then GET `/v1-beta/accounts/{accountId}` to verify state. PUT updates and DELETE handles lifecycle. This is the foundational integration step before Pleo expenses can be posted to the right accounts in the source-of-truth ledger.

Example prompt: For each GL code in the source system, call POST `/v1-beta/accounts` with code and name fields, then GET `/v1-beta/accounts/{accountId}` to confirm the response.

### Account Lookup During Expense Coding

When an expense agent needs to suggest a bookkeeping account for an expense, it calls POST `/v1-beta/accounts`:search with a query (for example, the merchant category or expense description) and picks the best match. This avoids hard-coding GL codes and adapts to changes in the chart of accounts without redeploys.

Example prompt: Call POST `/v1-beta/accounts`:search with a query body filtering by name LIKE 'travel' and pick the matching account ID for the expense being coded.

### Account Lifecycle Maintenance

When the source accounting system retires a GL code, call DELETE `/v1-beta/accounts/{accountId}` to remove the corresponding Pleo bookkeeping account so it stops appearing in coding suggestions. Renames are handled by PUT `/v1-beta/accounts/{accountId}.` Together this keeps Pleo's chart of accounts aligned with the ledger over time.

Example prompt: Call PUT `/v1-beta/accounts/{accountId}` with the new name when a GL code is renamed, or DELETE `/v1-beta/accounts/{accountId}` when it is retired.

### AI Bookkeeping Agent via Jentic

An AI bookkeeping assistant uses Jentic to call Pleo's Bookkeeping Core API operations on demand. When asked to add a new account or look one up, it resolves the intent through Jentic, loads the right operation, and executes it with the bearer token supplied from the vault - no manual auth code in the agent.

Example prompt: Through Jentic, search 'create a pleo bookkeeping account', load POST `/v1-beta/accounts`, and execute it with the GL code and name from the user's request.

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | `/v1-beta/accounts` | Create a bookkeeping account |
| GET | `/v1-beta/accounts/{accountId}` | Retrieve an account by ID |
| PUT | `/v1-beta/accounts/{accountId}` | Update an account |
| DELETE | `/v1-beta/accounts/{accountId}` | Delete an account |
| POST | `/v1-beta/accounts:search` | Search the chart of accounts |

## Key resources

- **Accounts** — Bookkeeping accounts (chart of accounts) used by Pleo to bookkeep expenses

## Why Jentic

- **Setup:** Wiring the Pleo Bookkeeping Core API by hand means learning its bearer token auth and tracking the /v1-beta account CRUD endpoints plus the /accounts:search custom method yourself. Through Jentic you install once, import Bookkeeping Core from the API Directory, store the token once, and your agent calls it.
- **Permission scoping:** Pleo puts the account id in the URL path (`/v1-beta/accounts/{accountId}`), so a rule can pin your agent to one chart-of-accounts entry. You choose the operations it may call, so a DELETE on that account is not included unless you add it alongside the read and update operations.
- **Credential handling:** Your Pleo bearer token is stored once, encrypted, by your own Jentic One instance and injected per request at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'create a pleo bookkeeping account' or 'search pleo accounts', and Jentic returns the matching operation with its input schema, including the /accounts:search custom-method syntax, so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Xero Accounting API** — Xero is the source-of-truth ledger that Pleo bookkeeping accounts often mirror
- **Expensify API** — Expensify is a competing expense management platform with its own bookkeeping surface
- **Brex API** — Brex offers similar corporate spend with its own accounting integration API

## FAQ

### Why is there no official OpenAPI spec for Pleo's Bookkeeping Core API?

Pleo publishes its specs at developers.pleo.io but does not maintain a single canonical OpenAPI artefact for this surface that downstream tooling can consume. Jentic generates and maintains this spec so that AI agents and developers can call Bookkeeping Core API via structured tooling. It is validated against the live API and kept up to date. Get started with Jentic One, the self-hosted execution layer.

### What authentication does the Bookkeeping Core API use?

The API uses HTTP bearer authentication. You pass an Authorization: Bearer <token> header where the token is obtained from Pleo's OAuth2 flow for partner integrations. Through Jentic, the token sits in the encrypted vault and is injected per call so it never appears in agent prompts or logs.

### What does this spec cover?

The five endpoints under `/v1-beta/accounts` cover the chart of accounts: create, retrieve, update, delete, and search. Other parts of Pleo's bookkeeping surface - bookkeeping entries, exports, tax codes, journals - are separate and not in this spec.

### How do I search the chart of accounts?

Call POST `/v1-beta/accounts`:search with a request body describing the filter. The path uses the Google APIs custom-method syntax (resource:verb), so the search verb is appended after a colon rather than being a separate path segment. The response returns a list of matching accounts.

### How do I add a new bookkeeping account through Jentic?

Run pip install jentic, then search 'create a pleo bookkeeping account', load the POST `/v1-beta/accounts` operation, and execute it with code and name fields. Jentic injects the bearer token at execution time and returns the created account's ID.

### Is /v1-beta stable?

The path prefix /v1-beta indicates Pleo treats this as a beta surface, so non-breaking changes are likely and breaking changes are possible. Track Pleo's developer changelog and pin to known schemas in any production integration; treat 410 or unexpected 4xx responses as a signal to re-fetch the spec.

### Can I limit what my agent is allowed to do with the Pleo Bookkeeping Core API?

Yes. Because you run Jentic One yourself, your own rules decide which of the five operations the agent may call, so you can grant read and search (GET `/v1-beta/accounts/{accountId}` and POST `/v1-beta/accounts`:search) while withholding create (POST `/v1-beta/accounts`), update (PUT), and delete (DELETE). Since Pleo puts the account ID in the URL path, you can also pin the agent to a single chart-of-accounts entry rather than the whole set. Nothing is enabled unless you add it, so a destructive DELETE stays off until you explicitly allow it.
