Skip to main content
POST
/
snapshot
Create a snapshot
curl --request POST \
  --url https://app.myhero.so/snapshot \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "documentId": "<string>",
  "name": "<string>",
  "comments": [
    {
      "_id": "<string>",
      "userId": "<string>",
      "comment": "<string>",
      "createdAt": 123
    }
  ]
}
'
{
  "data": {
    "_id": "<string>",
    "documentId": "<string>",
    "createdAt": 123,
    "state": "<unknown>",
    "name": "<string>",
    "description": "<string>",
    "comments": [
      {
        "_id": "<string>",
        "userId": "<string>",
        "comment": "<string>",
        "createdAt": 123
      }
    ],
    "isAiManaged": false,
    "createdBy": "<string>",
    "updatedAt": 123
  }
}

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.

Captures the current Y.js state of a document as a restorable snapshot. Documents are capped at 100 snapshots. Accepts an optional name and initial comments. Returns the created snapshot including its _id and metadata.

Authorizations

Authorization
string
header
required

HERO personal access token

Body

application/json
documentId
string
required
Minimum string length: 1
name
string
comments
object[]

Response

201 response

data
object
required