Workbooks

Update a workbook

PATCH
Updates a workbook

Path parameters

workbookIdstringRequired
ID of workbook to update

Request

This endpoint expects an object.
name
stringOptional
The name of the Workbook.
labels
list of stringsOptional
An optional list of labels for the Workbook.
spaceId
stringOptional
The Space Id associated with the Workbook.
environmentId
stringOptional
The Environment Id associated with the Workbook.
namespace
stringOptional
The namespace of the Workbook.
sheets
list of objectsOptional
Describes shape of data as well as behavior
actions
list of objectsOptional
metadata
anyOptional
Metadata for the workbook

Response

This endpoint returns an object
data
object
A collection of one or more sheets

Errors

PATCH
$curl -X PATCH https://api.x.flatfile.com/v1/workbooks/us_wb_YOUR_ID \
> -H "Authorization: Bearer <token>" \
> -H "Content-Type: application/json" \
> -d '{
> "name": "My Updated Workbook",
> "labels": [
> "my-new-label"
> ],
> "actions": [
> {
> "label": "Submit Changes",
> "operation": "submitAction",
> "mode": "foreground",
> "description": "Submit data to webhook.site",
> "primary": true
> }
> ]
>}'
Response
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.5
36 },
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": true
52 }
53 ],
54 "settings": {
55 "trackChanges": true
56 },
57 "expiredAt": "2021-01-01T00:00:00Z"
58 }
59}