APIDocuments
Update a document
PATCH /documents/{id}
AuthorizationBearer <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.
In: header
Scope: connector:write
Path Parameters
idstring
Document ID (UUID), as returned by GET /documents.
Format
uuidcontentMarkdownstring
The complete new Markdown body. Replaces the existing content entirely and must contain non-whitespace text.
Match
\SLength
1 <= lengthtitle?string
Length
1 <= length <= 200expectedUpdatedAtstring | null
The updatedAt value from the GET response used to prepare this replacement.
Format
date-timeorganizationId?string
Required for documents in a team workspace.
Response Body
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" }'{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"title": "string",
"threadId": "string",
"url": "http://example.com"
}{
"error": {
"code": "unauthorized",
"message": "Invalid or missing API key."
}
}{
"error": {
"code": "unauthorized",
"message": "Invalid or missing API key."
}
}{
"error": {
"code": "unauthorized",
"message": "Invalid or missing API key."
}
}{
"error": {
"code": "unauthorized",
"message": "Invalid or missing API key."
}
}{
"error": {
"code": "unauthorized",
"message": "Invalid or missing API key."
}
}{
"error": {
"code": "unauthorized",
"message": "Invalid or missing API key."
}
}{
"error": {
"code": "unauthorized",
"message": "Invalid or missing API key."
}
}