Toast
API Reference

Collaboration

Real-time collaboration and AI features powered by Tiptap Cloud.

Generate collaboration token

POST
/api/collaboration/token

Generates a JWT for Tiptap Cloud collaboration on a specific document.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://loading/api/collaboration/token" \  -H "Content-Type: application/json" \  -d '{    "contentId": "21aa1683-ca25-4edf-bc18-01ad04a4821b"  }'
{
  "token": "string",
  "documentName": "string",
  "appId": "string",
  "expiresAt": "2019-08-24T14:15:22Z"
}
{
  "error": "string",
  "details": [
    {
      "code": "string",
      "message": "string",
      "path": [
        "string"
      ]
    }
  ]
}
{
  "error": "string"
}
{
  "error": "string"
}

Generate AI token

POST
/api/collaboration/ai/token

Generates a JWT for Tiptap AI features.

Response Body

application/json

application/json

application/json

curl -X POST "https://loading/api/collaboration/ai/token"
{
  "token": "string",
  "appId": "string",
  "expiresAt": "2019-08-24T14:15:22Z"
}
{
  "error": "string"
}
{
  "error": "string"
}