Spaces

Create a space

POST
Creates a new space based on an existing Space Config

Request

This endpoint expects an object.
access
list of enumsOptional
Allowed values: *upload
actions
list of objectsOptional
appId
stringOptional
The ID of the App that space is associated with
archivedAt
datetimeOptional
Date when space was archived
autoConfigure
booleanOptional
displayOrder
integerOptional
The display order
environmentId
stringOptional
Environment ID
guestAuthentication
list of enumsOptional
The type of authentication to use for guests
Allowed values: shared_linkmagic_link
labels
list of stringsOptional
languageOverride
stringOptional
metadata
anyOptional
Metadata for the space
name
stringOptional
The name of the space
namespace
stringOptional
primaryWorkbookId
stringOptional
The ID of the primary workbook for the space. This should not be included in create space requests.
settings
objectOptional
The Space settings.
spaceConfigId
stringOptional
Space Config ID
translationsPath
stringOptional

Response

This endpoint returns an object
data
object
A place to store your workbooks

Errors

POST
$curl -X POST https://api.x.flatfile.com/v1/spaces \
> -H "Authorization: Bearer <token>" \
> -H "Content-Type: application/json" \
> -d '{
> "displayOrder": 1,
> "environmentId": "us_env_YOUR_ID",
> "name": "My First Workbook",
> "primaryWorkbookId": "us_wb_YOUR_ID"
>}'
Response
1{
2 "data": {
3 "createdAt": "2021-01-01T00:00:00.000Z",
4 "guestAuthentication": [
5 "magic_link",
6 "shared_link"
7 ],
8 "id": "us_sp_YOUR_ID",
9 "name": "My First Worbook",
10 "updatedAt": "2021-01-01T00:00:00.000Z",
11 "createdByUserId": "us_usr_YOUR_ID",
12 "displayOrder": 1,
13 "environmentId": "us_env_YOUR_ID",
14 "filesCount": 1,
15 "isCollaborative": true,
16 "labels": [],
17 "lastActivityAt": "2021-01-01T00:00:00.000Z",
18 "metadata": null,
19 "primaryWorkbookId": "us_wb_YOUR_ID",
20 "upgradedAt": "2021-01-01T00:00:00.000Z",
21 "workbooksCount": 1
22 }
23}