Skip to main content
POST
/
v1
/
chart-of-accounts
Create a new account
curl --request POST \
  --url https://external.pleo.io/v1/chart-of-accounts \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json;charset=UTF-8' \
  --data '
{
  "archived": true,
  "companyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "externalId": "<string>",
  "name": "<string>",
  "code": "<string>",
  "metadata": {},
  "taxCodeExternalId": "<string>"
}
'
{
  "data": {
    "archived": false,
    "code": "2001",
    "companyId": "123e4567-e89b-12d3-a456-426614174006",
    "externalId": "External Id",
    "id": "123e4567-e89b-12d3-a456-426614174005",
    "name": "Bank Charges",
    "taxCodeExternalId": "IVA 20"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json;charset=UTF-8
archived
boolean
required

Boolean flag used to determine if the account is archived.

companyId
string<uuid>
required

Pleo's internal identifier for the company the account is associated with.

externalId
string
required

Non empty unique external identifier of the account, assigned in the external ERP/accounting system. Can be the same as code if no other identifier is available. Maximum length: 255 characters.

Required string length: 1 - 255
name
string
required

Name of the account. Maximum length: 255 characters.

Maximum string length: 255
code
string | null

Account code or number used in the accounting system's chart of accounts. Maximum length: 255 characters.

Maximum string length: 255
metadata
object

Place for API users to store flexible data.

taxCodeExternalId
string | null

The identifier in the target system for the tax code the account is associated with.

  • This is NOT the tax percentage (e.g. 20%)
  • This is NOT the Pleo UUID of the tax code

Response

Request matched existing account.

data
object
required

Represents an account in Pleo.