Headless Importer

Upload a CSV, Excel, or PDF file to an embed

Upload a CSV (.csv), Excel (.xlsx), or PDF (.pdf) file into OneSchema. PDF uploads are accepted when PDF extraction is enabled for the embed's organization. An embed must be in the initialized state to support an upload, and an embed is returned in one of the following states: uploaded, headers_set, or columns_mapped.

post/v1/embeds/{embed_id}/upload

Request

  • Base URL
    https://api.oneschema.co
  • URL
    https://api.oneschema.co/v1/embeds/{embed_id}/upload
  • Auth
    API key in header X-API-KEY

Path parameters

embed_idinteger required

The id of the embed which contains the file.

Request body multipart/form-data

filestring binary required

The contents of the file to be imported.

sheet_namestring

The name of the sheet that should be imported if you are uploading a spreadsheet with multiple tabs.

Response

200

idinteger
tokenstring
statusstring
user_jwtstring

Example response

{
  "id": 41963,
  "token": "812f66e4-76c3-4e1e-9e85-5c1374f15c6a",
  "status": "uploaded",
  "user_jwt": "REPLACE_WITH_JWT"
}

Changes

No recorded changes to this operation across all 1 revision of this API.