Skip to content

Create an offline account

POST
/accounts/
curl --request POST \
--url https://app.commitly.com/api/accounts/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "bank": { "name": "ERP cash accounts", "bic": "" }, "name": "Petty cash", "currency": "EUR" }'

Creates an offline bank account, i.e. an account without a bank connection that you fill with transactions through the API (see Create transactions).

  • bank.name and bank.bic are required.
  • If an account with the same IBAN and currency already exists in the company, that account is returned instead of a new one.
  • The limits of your COMMITLY edition on the number of accounts apply; above the limit the API answers 403.
Media typeapplication/json
object
bank
required
object
name
required

Name of the bank or of the source system.

string
bic
required

BIC of the bank; may be an empty string for non-bank sources.

string
name

Account name shown in COMMITLY.

string
iban
string
currency

ISO 4217 code, e.g. EUR.

string
Example
{
"bank": {
"name": "ERP cash accounts",
"bic": ""
},
"name": "Petty cash",
"currency": "EUR"
}

Account created (or the existing account with the same IBAN and currency).

Media typeapplication/json
object
id
integer
bank

Bank data embedded in an account.

object
open_banking_connection_id
integer | null
name
string
bic
string
transaction_count
integer
last_transaction

Present in GET /accounts/ only.

object
id
integer
account

Short form of a bank account, embedded in transactions.

object
id
integer
name
string
alias
string
bank

Bank name. Present in the create-transactions response only.

string
currency

Present in the create-transactions response only.

string
value_date
string format: date-time
amount
number
purpose
string
counterpart_name
string
currency

ISO 4217 currency code.

string
date_created
string format: date-time
date_updated
string format: date-time
name
string
alias
string
iban
string
type_name

Account type as supplied by the bank provider (free text, e.g. Checking). Empty for offline accounts.

string
balance
number
overdraft_limit
number | null
status

Account status. Only offline accounts accept transactions via POST /accounts/{account_id}/transactions/; accounts with status API or DISCONNECTED, and accounts linked to a bank connection, do not.

string
Allowed values: UPDATED UPDATED_FIXED DOWNLOAD_IN_PROGRESS DOWNLOAD_FAILED DEPRECATED DISCONNECTED API OFFLINE
last_successful_update
string | null format: date-time
last_update_attempt
string | null format: date-time
banking_api_account
integer | null
Example
{
"status": "UPDATED"
}

Invalid request body or parameters. The body lists the errors per field; errors not tied to a field are listed under non_field_errors. For request bodies that are arrays, the body is a list with one error object per item. Messages are localized (see Accept-Language).

Media typeapplication/json
One of:

Validation errors. Each key is a field of the request body; its value is the list of messages for that field. Errors not tied to a field are listed under non_field_errors.

object
non_field_errors
Array<string>
key
additional properties
Array<string>
Example
{
"settlement_date": [
"This field is required."
]
}

The access token is invalid or has expired. Request a new token. The message is localized (see Accept-Language).

Media typeapplication/json
object
detail
required

Error message.

string
code

Present only if the company’s edition does not include the function; value billing_plan_permission_denied.

string
Example
{
"detail": "Invalid token."
}
WWW-Authenticate
string

Authentication scheme, Bearer.

Example
Bearer

No access token was sent, or the credentials are not allowed to call this endpoint. If the company’s COMMITLY edition does not include the requested function, the body additionally contains "code": "billing_plan_permission_denied".

Media typeapplication/json
object
detail
required

Error message.

string
code

Present only if the company’s edition does not include the function; value billing_plan_permission_denied.

string
Example
{
"detail": "User must be authenticated to access this resource."
}