Skip to main content

Update a document

Updates the specified document by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

Parameters

name
string
Name of the document.
recipient_language
string
The recipient language of the document.
reminder_days
nullable integer
Integer describing how many days before the document expiration a reminder will be sent to all recipients.
recurring_reminder_frequency
nullable integer
Positive integer describing the recurring frequency.
recurring_reminder_period_unit
nullable enum
The unit in which the recurring frequency is measured. One of day, week, month, year.
allow_forwarding
boolean
Whether the recipients are allowed to forward the document.
allow_download
boolean
Whether the recipients are allowed to download a PDF copy of the document.
currency
string
Three-letter ISO currency code.
page_orientation
enum
The orientation of the document pages. One of portrait, landscape.
page_size
enum
The size of the document pages. One of letter, a4, slide.

Returns

Returns the document object if the update succeeded. Throws an error if update parameters are invalid.

put
/api/documents/{id}
curl -X PUT https://{workspace}.documocu.com/api/documents/{id} \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {API_KEY}'
Response
{
"activity": null,
"allow_download": false,
"allow_forwarding": true,
"archived_at": null,
"author": "u_zxlr80cwmrshq0uk0bk7nnik",
"completed_at": null,
"cover_page": null,
"created_at": "2024-05-14T05:36:50+00:00",
"currency": "USD",
"declined_at": null,
"deleted_at": null,
"expiration_date": null,
"expiration_date_in_days": null,
"expiration_warning": false,
"expired_at": null,
"id": "doc_96kjrc28vp1xdjestep1fu25",
"modifier": "u_by5010epw5yhbrnb73hgxbjc",
"name": "Veniam rerum earum debitis et quia et.",
"page_orientation": "portrait",
"page_size": "a4",
"recipient_language": "en_US",
"recipients": null,
"recurring_reminder_frequency": null,
"recurring_reminder_period_unit": null,
"reminder_days": null,
"sent_at": null,
"sent_via": null,
"status": "draft",
"type": "regular",
"updated_at": "2024-05-14T05:36:50+00:00",
"value": 0,
"viewed_at": null
}