Skip to main content
POST
/
document
Create a document
curl --request POST \
  --url https://app.myhero.so/document \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "projectId": "<string>",
  "_id": "<string>",
  "name": "<string>",
  "description": "<string>",
  "reference": "<string>",
  "parentId": "<string>",
  "type": "FOLDER"
}
'
{
  "data": {
    "_id": "<string>",
    "parentId": "<string>",
    "projectId": "<string>",
    "userId": "<string>",
    "workspaceId": "<string>",
    "name": "<string>",
    "type": "FOLDER",
    "createdAt": 123,
    "updatedAt": 123,
    "description": "<string>",
    "reference": "<string>",
    "isPublished": false,
    "publishedSettings": {
      "publishedById": "<string>",
      "publishedAt": 123,
      "styling": {},
      "domainSlug": "<string>"
    },
    "external": {
      "type": "PDF",
      "resourcePath": "<string>",
      "resourceId": "<string>"
    },
    "icon": {
      "name": "<string>",
      "color": "<string>"
    },
    "emoji": {
      "unified": "<string>",
      "emojiStyle": "<string>"
    },
    "collaborators": [
      {
        "userId": "<string>",
        "role": "owner"
      }
    ],
    "isDeleted": false
  }
}

Documentation Index

Fetch the complete documentation index at: https://developers.myhero.so/llms.txt

Use this file to discover all available pages before exploring further.

Creates a new document inside the given project. Requires a projectId in the request body; the caller must have create permission on that project and a plan that permits document creation. Returns the created document including its _id, name, and timestamps.

Authorizations

Authorization
string
header
required

HERO personal access token

Body

application/json
projectId
string
required
Minimum string length: 1
_id
string
name
string
description
string
reference
string
parentId
string | null
type
enum<string>
Available options:
FOLDER,
FILE,
SUBFILE,
EXTERNAL
icon
object
emoji
object

Response

200 response

data
object
required