Skip to main content
POST
Read a sample file's columns

Authorizations

Authorization
string
header
required

An API key, sent as Authorization: Bearer stfy_live_…. See Authentication for how to get one and which scopes it needs.

Body

application/json
csv
string | null

The sample as CSV text: the header row and some rows (convert an Excel sheet first). Only its first 512 KB is read

Required string length: 1 - 1048576
detect
boolean
default:false

Find the header row when it isn't row 1

header_layout
HeaderLayout · object | null

Where the column names are; wins over detect

import_id
string | null

Or a file Statisfy received or was given (integrations.list_imports): its exact bytes

Required string length: 1 - 64

Response

200 - application/json

Successful Response

columns
string[]
required

The column names, in file order

detected_reason
string | null
required

Why detection chose a layout other than row 1, when it did

groups
(string | null)[]
required

Each column's group name, from a group row above the names

header_layout
HeaderRows · object
required

Where the column names were read from

row_count
integer
required

Data rows read, empty rows aside (of the file's start, for a long CSV)

rows
Rows · object[]
required

The first data rows, as text

top_rows
string[][]
required

The file's first rows as text, to place the header row by

typed_date_columns
string[]
required

Excel columns that hold real dates: they need no date_format