Create a document
You must create a document to be able to send it to a recipient. When creating a document you can refer to previously uploaded files with file_ids, or create the document and upload the file in the same request; only one file can be uploaded in the create document POST. Use file_ids for existing uploads, file_content to send the file as a base64 encoded string, file_url for a publicly downloadable file, or a multipart post with a file parameter. Pass template_id to create the document from a template.
While a file is processed the document has status importing, and it moves to draft when processing finishes. A create that includes a file (file_ids, file_content, file_url or file) therefore returns status importing, as does a create from a Word template with custom_fields. A document can only be sent in status draft: unless you set is_automatic_sending, poll get document status until it reports draft before you send the document. A file that cannot be imported, for example an expired upload or a PDF that needs a password to open, also ends in draft, and the document owner is emailed. Files are imported in order and the import stops at that file, so the document has no pages from it or from any file after it: check the pages with list document pages before you send. A .docx file id is imported while the request runs instead: an expired or unknown .docx upload answers 404 and leaves the created document behind as a draft without pages.
The response is the created document, except that only its id and status are returned in the cases listed on that shorter response.
In multipart/form-data and application/x-www-form-urlencoded bodies every field is text. Send booleans as 1 or 0: the text false counts as true, so is_automatic_sending=false turns automatic sending on. Array and object fields, such as recipients and custom_fields, are only read from a multipart/form-data part sent with Content-Type: application/json, and cannot be sent form-encoded.
All recipients must have either a valid email or a mobile number. If is_signing is omitted it is set automatically from recipient roles: no recipients enables signing, recipients with no signers disables it, at least one signer enables it.
Most parameters are optional; start with the basics and add parameters as needed.
Request
- Base URL: https://api.getaccept.com
- URL: https://api.getaccept.com/v1/documents
- Auth: HTTP bearer
Request body
Response
The request succeeded.
Changes
No recorded changes to this operation across all 1 revision of this API.