Skip to main content

Create a document

Documents can be created in a folder, if provided. To add recipients while creating the conversation, add recipients array to the request parameters.

Parameters

name
string
required
Name for the document.
template
string
ID of a template from which the document will be created.
folder
string
ID of a folder from which the document will be created.
recipients
associative array
Recipients of the document.

Returns

Returns the created document object. Throws an error if some parameters are not valid.

post
/api/documents
curl -X POST https://{workspace}.documocu.com/api/documents \
-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
}