Skip to main content
PUT
/
api
/
accounts
/
{id}
Edit the given account.
curl --request PUT \
  --url https://api.example.com/api/accounts/{id} \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --header 'organization-id: <organization-id>' \
  --data '
{
  "name": "Bank Account",
  "code": "123456",
  "accountType": "Bank Account",
  "description": "This is a description",
  "parentAccountId": 1
}
'

Headers

Authorization
string
required

Value must be 'Bearer ' where is an API key prefixed with 'bc_' or a JWT token.

Example:

"Bearer bc_1234567890abcdef"

organization-id
string
required

Required if Authorization is a JWT token. The organization ID to operate within.

Path Parameters

id
number
required

The account id

Body

application/json
name
string
required

The name of the account

Example:

"Bank Account"

code
string
required

The code of the account

Example:

"123456"

accountType
string
required

The type of the account

Example:

"Bank Account"

description
string
required

The description of the account

Example:

"This is a description"

parentAccountId
number
required

The parent account ID of the account

Example:

1

Response

The account has been successfully updated.