$curl -X POST https://api.x.flatfile.com/v1/workbooks \> -H "Authorization: Bearer <token>" \> -H "Content-Type: application/json" \> -d '{> "name": "My First Workbook",> "labels": [> "simple-demo"> ],> "sheets": [> {> "name": "Contacts",> "fields": [> {> "type": "string",> "key": "firstName",> "label": "First Name"> },> {> "type": "string",> "key": "lastName",> "label": "Last Name"> },> {> "type": "string",> "key": "email",> "label": "Email"> }> ],> "slug": "contacts",> "mappingConfidenceThreshold": 0.5> }> ],> "actions": [> {> "label": "Submit",> "operation": "submitAction",> "mode": "foreground",> "description": "Submit data to webhook.site",> "primary": true> }> ],> "settings": {> "trackChanges": true> }>}'
1{2 "data": {3 "id": "us_wb_YOUR_ID",4 "spaceId": "us_sp_YOUR_ID",5 "environmentId": "us_env_YOUR_ID",6 "updatedAt": "2021-01-01T00:00:00Z",7 "createdAt": "2021-01-01T00:00:00Z",8 "name": "My First Workbook",9 "sheets": [10 {11 "id": "us_sh_YOUR_ID",12 "workbookId": "us_wb_YOUR_ID",13 "name": "Contacts",14 "slug": "contacts",15 "config": {16 "name": "Contacts",17 "fields": [18 {19 "type": "string",20 "key": "firstName",21 "label": "First Name"22 },23 {24 "type": "string",25 "key": "lastName",26 "label": "Last Name"27 },28 {29 "type": "string",30 "key": "email",31 "label": "Email"32 }33 ],34 "slug": "contacts",35 "mappingConfidenceThreshold": 0.536 },37 "updatedAt": "2021-08-31T18:00:00Z",38 "createdAt": "2021-08-31T18:00:00Z",39 "lockedBy": "Example0"40 }41 ],42 "labels": [43 "simple-demo"44 ],45 "actions": [46 {47 "label": "Submit",48 "operation": "submitAction",49 "mode": "foreground",50 "description": "Submit data to webhook.site",51 "primary": true52 }53 ],54 "settings": {55 "trackChanges": true56 },57 "expiredAt": "2021-01-01T00:00:00Z"58 }59}