Skip to content
Pile
Esc
↑↓navigate↵open⌘Jpreview

Create document

POST/workspaces/{organizationId}/documents
Authorization
AuthorizationBearer token · headerrequired

Workspace API key (Authorization: Bearer <key>). Issue keys under Settings → Developer or POST /workspaces/{organizationId}/tokens.

Path parameters
organizationIdstringrequired
Request body
application/json
titlestringrequired
min length 1
iconstring
contentobject[] | string
Show properties
Any of:
object[]
Array of object
object
string
string
contentFormatstring
Allowed:blocksmarkdowncanvas
slugstring
projectIdstring
issueIdstring
initiativeIdstring
parentDocumentIdstring
spaceIdstring
isTemplateboolean
Responses
201

Document created

idstringrequired
organizationIdstringrequired
titlestringrequired
iconstring | nullrequired
contentobject[] | stringrequired
Show properties
Any of:
object[]
Array of object
object
string
string
contentFormatstringrequired
Allowed:blocksmarkdowncanvas
slugstring | nullrequired
projectIdstring | nullrequired
issueIdstring | nullrequired
initiativeIdstring | nullrequired
parentDocumentIdstring | nullrequired
spaceIdstring | nullrequired
isTemplatebooleanrequired
createdByIdstringrequired
updatedByIdstring | nullrequired
createdAtstringrequired
updatedAtstringrequired
trashedAtstring | nullrequired
Try it
Server
Authorization
Parameters
Bodyapplication/json
Request
curl -X POST 'https://pile.nyc/workspaces/string/documents' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "title": "string",
  "icon": "string",
  "content": [
    {
      "property1": null,
      "property2": null
    }
  ],
  "contentFormat": "blocks",
  "slug": "string",
  "projectId": "string",
  "issueId": "string",
  "initiativeId": "string",
  "parentDocumentId": "string",
  "spaceId": "string",
  "isTemplate": true
}'
Response
{
  "id": "string",
  "organizationId": "string",
  "title": "string",
  "icon": "string",
  "content": [
    {
      "property1": null,
      "property2": null
    }
  ],
  "contentFormat": "blocks",
  "slug": "string",
  "projectId": "string",
  "issueId": "string",
  "initiativeId": "string",
  "parentDocumentId": "string",
  "spaceId": "string",
  "isTemplate": true,
  "createdById": "string",
  "updatedById": "string",
  "createdAt": "string",
  "updatedAt": "string",
  "trashedAt": "string"
}

Was this page helpful?