POST

/api/v1/workbooks

Bearer*

The Bearer token you will need for this call is your unique secret key. It can be found in the Developer settings of your Flatfile account here .

Body

namerequired
Default: "My First Workbook"
string

The name of the Workbook

sheetsrequired
array
actionsrequired
array

Request headers

Acceptrequired
Default: "application/json"

Request header

Content-typerequired
Default: "application/json"

Request header

curl --request POST \
  --url https://platform.flatfile.com/api/v1/workbooks \
  --header 'Authorization: Bearer PASTE_SECRET_KEY_HERE' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "My First Workbook",
  "labels": ["simple-demo"],
  "sheets": [
    {
      "name": "Contacts",
      "slug": "contacts",
      "fields": [
        {
          "key": "firstName",
          "type": "string",
          "label": "First Name"
        },
        {
          "key": "lastName",
          "type": "string",
          "label": "Last Name"
        },
        {
          "key": "email",
          "type": "string",
          "label": "Email"
        }
      ]
    }
  ],
  "actions": [
    {
      "operation": "submitAction",
      "mode": "foreground",
      "label": "Submit",
      "description": "Submit data to webhook.site",
      "primary": true
    }
  ]
}'

Next steps

Now that you’ve created a Workbook, check it out in your Dashboard. Next, we will author code to listen and react to Events as they occur.