APIDocuments

Update a document

PATCH /documents/{id}

PATCH
/documents/{id}

Authorization

apiKey connector:write
headerAuthorizationBearer <token>

ChatPRD API key from Settings → API Keys, sent as Authorization: Bearer <key>. Read-only keys carry the connector:read scope; read/write keys also carry connector:write. Requires a Pro, Team or Enterprise plan.

Scope: connector:write

Path Parameters

id*string

Document ID (UUID), as returned by GET /documents.

Formatuuid

Request Body

application/json
  1. body
contentMarkdown*string

The complete new Markdown body. Replaces the existing content entirely and must contain non-whitespace text.

Match\S
Length1 <= length
title?string
Length1 <= length <= 200
expectedUpdatedAt*|

The updatedAt value from the GET response used to prepare this replacement.

Formatdate-time
organizationId?string

Required for documents in a team workspace.

Response Body

The updated document.

application/json
  1. response
id*string
Formatuuid
title*string
threadId*string|null
url*string
Formaturi
Example Request
curl -X PATCH 'https://app.chatprd.ai/api/connectors/v1/documents/497f6eca-6276-4993-bfeb-53cbbbba6f08' \  -H 'Content-Type: application/json' \  -d '{  "contentMarkdown": "# Mobile onboarding PRD\n\n## Problem\n\nUpdated problem statement...",  "expectedUpdatedAt": "2026-09-25T12:00:00.000Z"}'
Example Response
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "title": "string",  "threadId": "string",  "url": "http://example.com"}