Records

Insert records

POST
Adds records to a workbook sheet

Path parameters

sheetIdstringRequired
ID of sheet

Request

This endpoint expects a list of maps from strings to objects.
valid
booleanOptional
messages
list of objectsOptional
Record data validation messages
metadata
map from strings to anyOptional
value
unionOptional
layer
stringOptional
updatedAt
datetimeOptional

Response

This endpoint returns an object
data
object

Errors

POST
$curl -X POST https://api.x.flatfile.com/v1/sheets/us_sh_YOUR_ID/records \
> -H "Authorization: Bearer <token>" \
> -H "Content-Type: application/json" \
> -d '[
> {
> "firstName": {
> "valid": true,
> "messages": [],
> "value": "John"
> },
> "lastName": {
> "valid": true,
> "messages": [],
> "value": "Smith"
> },
> "email": {
> "valid": true,
> "messages": [],
> "value": "john.smith@example.com"
> }
> }
>]'
Response
1{
2 "data": {
3 "success": true,
4 "commitId": "us_vr_YOUR_ID",
5 "counts": {
6 "total": 1000,
7 "valid": 1000,
8 "error": 0
9 },
10 "records": [
11 {
12 "id": "us_rc_YOUR_ID",
13 "values": {
14 "firstName": {
15 "messages": [],
16 "updatedAt": "2023-11-20T16:59:40.286Z",
17 "valid": true,
18 "value": "John"
19 },
20 "lastName": {
21 "messages": [],
22 "updatedAt": "2023-11-20T16:59:40.286Z",
23 "valid": true,
24 "value": "Smith"
25 },
26 "email": {
27 "messages": [],
28 "updatedAt": "2023-11-20T16:59:40.286Z",
29 "valid": true,
30 "value": "john.smith@example.com"
31 }
32 },
33 "valid": true,
34 "metadata": {},
35 "config": {}
36 }
37 ],
38 "versionId": "us_vr_YOUR_ID"
39 }
40}