Skip to main content
POST
/
transactions
Create a transaction
curl --request POST \
  --url https://web.subly.app/api/v1/transactions \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "amount": 123,
  "currency_code": "<string>",
  "date": "2023-11-07T05:31:56Z",
  "type": "expense",
  "sub_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "revenue_item_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "name": "<string>",
  "category": "<string>",
  "tags": [
    123
  ],
  "website": "<string>",
  "project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "sub_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "revenue_item_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "name": "<string>",
  "amount": 123,
  "currency_code": "<string>",
  "date": "2023-11-07T05:31:56Z",
  "type": "expense",
  "category": "<string>",
  "tags": [
    123
  ],
  "website": "<string>",
  "workspace_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}

Authorizations

x-api-key
string
header
required

Your private API key for authentication. This key identifies your workspace for all requests.

Body

application/json
amount
number<float>
required
currency_code
string
required

ISO 4217 currency code.

date
string<date-time>
required

Date the transaction occurred.

type
enum<string>
required
Available options:
expense,
revenue
sub_id
string<uuid>

ID of an expense to link to this transaction.

revenue_item_id
string<uuid>

ID of a revenue item to link to this transaction.

name
string

A descriptive name for the transaction.

category
string
tags
integer[]
website
string<uri>
project_id
string<uuid>

Response

Transaction created successfully.

id
string<uuid>

Unique identifier for the transaction.

sub_id
string<uuid> | null

ID of the linked expense, if applicable.

revenue_item_id
string<uuid> | null

ID of the linked revenue item, if applicable.

name
string

A descriptive name for the transaction.

amount
number<float>

The value of the transaction.

currency_code
string

The ISO 4217 currency code for the transaction amount.

date
string<date-time>

The date and time the transaction occurred.

type
enum<string>

The type of transaction.

Available options:
expense,
revenue
category
string

Organizational category for the transaction.

tags
integer[]

Array of tag IDs.

website
string<uri>

Associated website, if any.

workspace_id
string<uuid>

Identifier of the workspace this transaction belongs to.

project_id
string<uuid>

Identifier of the project this transaction is assigned to.