You have two options to create a document from file:1.
Upload a local file. For this, use the multipart/form-data request type.
2.
Send a public URL in the document creation request like this:
curl --request POST 'https:
--header 'Content-Type: application/json' \
--data-raw '{
"name": "Example document",
"url": "https://www.example.com/example.pdf",
"recipients": [
{
"email":"jane.doe@example.com",
"role": "user"
}
],
"parse_form_fields": false
}'
Request
Body Params multipart/form-data
Request Code Samples
curl --location --request POST '/documents?editor_ver=ev2' \
--form 'file=@""' \
--form 'data=""'
Responses
{
"id": "D3okRfgHRX7NEhavcACReB",
"name": "Document from Template",
"status": "document.uploaded",
"date_created": "2024-07-04T19:27:14.927317Z",
"date_modified": "2024-07-04T19:27:14.927317Z",
"expiration_date": null,
"version": null,
"uuid": "D3okRfgHRX7NEhavcACReB",
"links": [
{
"rel": "status",
"href": "https://api.pigeondocuments.com/documents/D3okRfgHRX7NEhavcACReB",
"type": "GET"
}
],
"info_message": "You need to poll the Document Status method until the status will be changed to document.draft"
}
Modified at 2024-09-18 02:06:43