Documents

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.

post/v1/documents

Request

  • Base URL: https://api.getaccept.com
  • URL: https://api.getaccept.com/v1/documents
  • Auth: HTTP bearer

Request body

namestring required

Name of the document.

datastring

JSON string of the document fields, used instead of the other body fields. Read only when the access token was issued to the Zapier client, and ignored otherwise.

typestring

Document type identifier, also called contract type. Pass the type of any document type that is active for the entity, including custom ones, as returned by GET /v1/document-types. The identifier template is not accepted on this endpoint.

valuenumber

Monetary value of the document in the entity currency.

tagsstring

Comma separated document tags.

external_idstring

External identifier for the document.

external_client_idstring

Replaced by the client id of the access token whenever the token has one, which is api unless another client id was given when authenticating.

company_namestring

Company name associated with the document.

company_numberstring

Company registration number associated with the document.

template_idstring

Id of the template the document is created from. The document inherits the template's post-sign redirect URL when the entity has Extended Branding.

external_editor_typestring

External editor type.

external_editor_idstring

External editor identifier.

replace_pagesboolean

Replaces the pages of the template with the supplied file.

keep_fieldsboolean

Keeps the form fields defined on the template.

file_namestring

Filename of the document including its extension, used when converting other file types.

file_idsstring

Comma separated string of uploaded file ids, not an array, with no spaces: a space becomes part of the next id, and the import stops at that file, so neither it nor any file after it is imported; a .docx id answers 404 instead.

file_urlstring

URL of the document file, which must be publicly available for download. It is always downloaded over https://, also when the URL starts with http://.

file_contentstring

Base64 encoded file content.

is_signingboolean

Whether the document is signable. When omitted, this is set automatically from recipient roles: no recipients enables signing; recipients with no signers disables it; at least one signer enables it.

is_selfsignboolean

Whether the sender also signs the document.

is_signing_biometricboolean

Whether signers draw their signature when signing.

is_signing_initialsboolean

Whether initials are the default signing method.

is_signing_forwardboolean

Whether a recipient may forward the signing rights to someone else.

is_signing_orderboolean

Whether signers are notified in the order given by their order_num.

qualified_electronic_signatureboolean

Enables qualified electronic signature, which requires the QES add-on and is incompatible with is_selfsign.

external_eid_signatureboolean

Lets recipients sign with an external electronic ID provider, referred to as Norwegian BankID (NBIES) in the app, and is incompatible with is_selfsign.

sign_redirectstring nullable

HTTPS URL the recipient is redirected to after signing, taking precedence over the entity sign redirect. Merge tags may not appear in the host, and {{customData.key}} tags only as query parameter values. Requires extended branding. When omitted or null with template_id, the template sign redirect is inherited.

block_recipient_inviteboolean

Blocks recipients from inviting additional participants from the signing page. When omitted with template_id, the template setting is inherited.

sign_copy_emailsstring[] nullable

Up to 10 email addresses that receive an email copy of the signed document once everyone has signed. They are not recipients: they are never invited, not shown to signers and not on the certificate. When omitted or null with template_id, the template addresses are inherited. When provided, including an empty array, they replace the template addresses.

omit_ip_from_certificateboolean

Omits the IP address from the signature fields and the audit log of the signing certificate, while IP addresses are still recorded.

verify_recipient_ssnboolean

Compares the social security number returned by the eID provider with the verify_eid_number of the recipient.

is_identify_recipientboolean

Identifies returning recipients by cookie.

is_automatic_sendingboolean

Sends the document once it is created instead of leaving it in status draft, or once its file is imported when one is included. Sending starts after the response, which still shows the status before sending, such as draft or importing, so do not also call send document.

is_scheduled_sendingboolean

Schedules the automatic sending for scheduled_sending_time instead of sending at once.

scheduled_sending_timestring

Date and time the document is sent when is_scheduled_sending is enabled.

sender_idstring nullable

Id of the user that owns and sends the document.

sender_emailstring nullable

Email address of the user that owns and sends the document.

email_send_subjectstring

Subject line used when the document is sent.

email_send_messagestring

Message to the recipients used when the document is sent.

email_send_template_idstring

Id of the email template used when the document is sent.

communication_template_idstring

Id of the communication template used for the document.

is_reminder_sendingnumber

Sends automatic reminders based on the entity sending settings, where -1 inherits the entity setting.

is_sms_sendingnumber

Includes an SMS to every recipient with a valid mobile number when the document is sent, where -1 inherits the entity setting.

is_sms_remindernumber

Sends reminders as SMS, where -1 inherits the entity setting.

is_auto_commentnumber

Posts auto_comment_text as a comment when the document is opened, where -1 inherits the configured setting.

auto_comment_textstring

Text used for the automatic comment.

is_privateboolean

When true the document can only be viewed by the owner.

video_idstring

Id of a video presented before the document is opened.

filestring binary

File to create the document from, sent as a multipart/form-data part. Only one file can be uploaded.

Response

The request succeeded.

OR

Changes

No recorded changes to this operation across all 1 revision of this API.