Update Document

Update an existing document

PATCHhttps://api.jamdesk.com/api/v1/documents/:id

Updates specific fields of an existing document.

Path Parameters

idstringrequired

The document ID.

Request Body

dataobjectrequired

Fields to update.

curl -X PATCH "https://api.example.com/v1/documents/doc_abc" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "data": {
      "title": "Updated Title",
      "published": false
    }
  }'
{
  "data": {
    "id": "doc_abc",
    "collection": "posts",
    "data": {
      "title": "Updated Title",
      "content": "Hello world!",
      "published": false
    },
    "createdAt": "2024-01-15T10:30:00Z",
    "updatedAt": "2024-01-15T11:45:00Z"
  }
}