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>"
}
'
{
  "data": {
    "_id": "<string>",
    "parentId": "<string>",
    "projectId": "<string>",
    "userId": "<string>",
    "workspaceId": "<string>",
    "name": "<string>",
    "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>"
      }
    ],
    "isDeleted": false
  }
}

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