Skip to main content
POST
/
api
/
v1
/
imports
Create import
curl --request POST \
  --url https://app.sure.am/api/v1/imports \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "raw_file_content": "<string>",
  "type": "TransactionImport",
  "account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "publish": "<string>",
  "date_col_label": "<string>",
  "amount_col_label": "<string>",
  "name_col_label": "<string>",
  "category_col_label": "<string>",
  "tags_col_label": "<string>",
  "notes_col_label": "<string>",
  "date_format": "<string>",
  "number_format": "1,234.56",
  "signage_convention": "inflows_positive",
  "col_sep": ","
}
'
{
  "data": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "type": "TransactionImport",
    "status": "pending",
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z",
    "account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "error": "<string>",
    "configuration": {
      "date_col_label": "<string>",
      "amount_col_label": "<string>",
      "name_col_label": "<string>",
      "category_col_label": "<string>",
      "tags_col_label": "<string>",
      "notes_col_label": "<string>",
      "account_col_label": "<string>",
      "date_format": "<string>",
      "number_format": "<string>",
      "signage_convention": "<string>"
    },
    "stats": {
      "rows_count": 1,
      "valid_rows_count": 1
    }
  }
}

Headers

Authorization
string
required

Bearer token with write scope

Body

application/json
raw_file_content
string

The raw CSV content as a string

type
enum<string>

Import type (defaults to TransactionImport)

Available options:
TransactionImport,
TradeImport,
AccountImport,
MintImport,
CategoryImport,
RuleImport
account_id
string<uuid>

Account ID to import into

publish
string

Set to "true" to automatically queue for processing if configuration is valid

date_col_label
string

Header name for the date column

amount_col_label
string

Header name for the amount column

name_col_label
string

Header name for the transaction name column

category_col_label
string

Header name for the category column

tags_col_label
string

Header name for the tags column

notes_col_label
string

Header name for the notes column

date_format
string

Date format pattern (e.g., "%m/%d/%Y")

number_format
enum<string>

Number format for parsing amounts

Available options:
1,234.56,
1.234,56,
1 234,56,
1,234
signage_convention
enum<string>

How to interpret positive/negative amounts

Available options:
inflows_positive,
inflows_negative
col_sep
enum<string>

Column separator

Available options:
,,
;

Response

import created

data
object
required