Skip to main content
POST
/
v0
/
platform
/
instances
Create an Instance
curl --request POST \
  --url https://api.sandbox.teal.dev/v0/platform/instances \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "entries_start": "2023-11-07T05:31:56Z",
  "name": "<string>",
  "coa_template_id": "CNmWM3X6AcvRdEwZKxq4bL",
  "custom_coa": {
    "ledgers": [
      {
        "name": "<string>",
        "sort_code": "<string>",
        "sub_type": "current_assets",
        "type": "asset",
        "children": [
          "<unknown>"
        ]
      }
    ],
    "required_ledgers": {
      "uncategorized_inflow": {
        "name": "Uncategorized Cash Inflow",
        "sort_code": "0"
      },
      "uncategorized_outflow": {
        "name": "Uncategorized Cash Outflow",
        "sort_code": "1"
      },
      "transfers_between_accounts": {
        "name": "Transfers Between Accounts",
        "sort_code": "2"
      },
      "opening_balances": {
        "name": "Opening Balance Retained Earnings",
        "sort_code": "3"
      }
    }
  },
  "subscription": "tier0",
  "accounting_basis": "accrual",
  "parent_id": "Kv7sp6Y1gAH2vfNxAWemRy"
}
'
{
  "id": "<string>",
  "entries_start": "2023-11-07T05:31:56Z",
  "name": "<string>",
  "subscription": "tier0",
  "accounting_package": "platformgl",
  "accounting_basis": "accrual",
  "parent_id": "Kv7sp6Y1gAH2vfNxAWemRy",
  "child_ids": "['A5SswbYm7eZM2ec5q7Hm2t']",
  "parent": "<unknown>",
  "children": [
    "<unknown>"
  ]
}

Authorizations

Authorization
string
header
required

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

Headers

x-teal-agent-id
string<uuid> | null

The agent id

Query Parameters

expand
enum<string>[] | null

Comma-separated list of Instance expand paths.

Available options:
parent,
children

Body

application/json
entries_start
string<date-time>
required

The datetime in UTC time from which the API will sync an Instance's accounting data. Transactions or journal entries cannot be entered before this date.

name
string
required

The name of the business.

coa_template_id
string | null

The ID of the Chart of Accounts Template used to pre-populate the Instance's ledgers.

Example:

"CNmWM3X6AcvRdEwZKxq4bL"

custom_coa
InstanceCreateCustomCoa · object

A custom COA definition to be used for the created instance.

subscription
enum<string>
default:tier0

The Instance's subscription tier.

Available options:
tier0,
tier1,
tier2,
tier3,
tier4,
tier5
accounting_basis
enum<string> | null

The accounting method used: cash basis or accrual basis.

Available options:
cash,
accrual
Example:

"accrual"

parent_id
string | null

The ID of the Instance's parent.

Example:

"Kv7sp6Y1gAH2vfNxAWemRy"

Response

Successful Response

id
string
required

The unique ID of the object.

entries_start
string<date-time>
required

The datetime in UTC time from which the API will sync an Instance's accounting data. Transactions or journal entries cannot be entered before this date.

name
string
required

The name of the business.

subscription
enum<string>
required

The Instance's subscription tier.

Available options:
tier0,
tier1,
tier2,
tier3,
tier4,
tier5
accounting_package
enum<string>
required

The type of accounting package the Instance uses as the source of truth for their books.

Available options:
platformgl,
quickbooks
accounting_basis
enum<string> | null

The accounting method used: cash basis or accrual basis.

Available options:
cash,
accrual
Example:

"accrual"

parent_id
string | null

The ID of the Instance's parent.

Example:

"Kv7sp6Y1gAH2vfNxAWemRy"

child_ids
string[] | null

The IDs of the Instance's children.

Example:

"['A5SswbYm7eZM2ec5q7Hm2t']"

parent
any | null

The Instance's parent. Included in expanded responses.

children
any[] | null

The Instance's children. Included in expanded responses.