Plot HomeDocumentation
Documents

Create or Update Document

Creates a new document or updates an existing one if ID is provided

POST
/v1/documents

Creates a new document or updates an existing one if ID is provided

Query Parameters

expand?|||array<>

Expansion fields: "all" (full enrichment, default), "none" (IDs only), or comma-separated/repeated fields (team)

Default"all"

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/v1/documents" \  -H "Content-Type: application/json" \  -d '{    "name": "string",    "teamId": "a4ede8ba-7c0a-4485-8763-cbd9b282fbec"  }'
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "publicId": "string",  "name": "string",  "slug": "string",  "visibility": "string",  "createdById": "string",  "lastEditedById": "string",  "lastEditedAt": "2019-08-24T14:15:22Z",  "workspaceId": "ef0efa32-d1c1-43d4-a5e2-fe7b4f00403c",  "teamId": "a4ede8ba-7c0a-4485-8763-cbd9b282fbec",  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z",  "deletedAt": "2019-08-24T14:15:22Z",  "deletedById": "string",  "description": {    "html": "string",    "markdown": "string"  },  "team": {    "id": "string",    "name": "string",    "publicId": "str"  }}