For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
CommunityCreate AccountSign in
  • Overview
    • Welcome
    • Authentication
    • Using Environments
  • API Reference
      • GETList spaces
      • POSTCreate a space
      • GETGet a space
      • DELDelete a space
      • DELDelete spaces
      • PATCHUpdate a space
      • POSTArchives a space
      • POSTUnarchives a space
      • POSTCreate a new guidance
      • GETList guidances
      • GETGet a guidance
      • PATCHUpdate a guidance
      • DELDelete a guidance
      • POSTCreate a draft of a space
      • GETList drafts for a space
      • GETGet a draft
      • POSTMerge a draft
LogoLogo
LogoLogo
CommunityCreate AccountSign in
API ReferenceSpaces

Create a space

POST
https://api.x.flatfile.com/v1/spaces
POST
/v1/spaces
$curl -X POST https://api.x.flatfile.com/v1/spaces \
> -H "X-Disable-Hooks: true" \
> -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"
>}'
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}
Creates a new space based on an existing Space Config
Was this page helpful?
Previous

Get a space

Next
Built with

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Headers

X-Disable-Hooks"true"Required

Request

This endpoint expects an object.
accesslist of enumsOptional
Allowed values:
actionslist of objectsOptional
appIdstringOptional
The ID of the App that space is associated with
archivedAtdatetimeOptional
Date when space was archived
autoConfigurebooleanOptional

Only used during creation - will be ignored on update

displayOrderintegerOptional
The display order
environmentIdstringOptional
Environment ID
guestAuthenticationlist of enumsOptional
Allowed values:
isAppTemplatebooleanOptional
Whether the space is an app template. Only one space per app can be an app template.
labelslist of stringsOptional
languageOverridestringOptional
metadataanyOptional
Metadata for the space
namestringOptional
The name of the space
namespacestringOptional
primaryWorkbookIdstringOptional
The ID of the primary workbook for the space. This should not be included in create space requests.
settingsobjectOptional
The Space settings.
spaceConfigIdstringOptional
Space Config ID
translationsPathstringOptional

Response

This endpoint returns an object.
dataobject
A place to store your workbooks

Errors

400
Bad Request Error
404
Not Found Error