ZapSign API
English
English
  • General Information
  • Getting Started
  • ZapSign Environments
  • Ready-to-use requests!
  • Authentication
    • Static token
    • JWT Authentication
      • Get access token
      • Refresh your access token
  • Types of Tokens
  • API versioning
  • Rate Limit Policies
  • Incident alerts
  • How Payment Works
  • Status Code
  • Account
    • Plan Information
    • List account users
    • Create account users
    • Delete account user
  • Documents
    • Create document via Upload
    • OneClick (ClickWrap)
      • Create document (OneClick)
    • Create document via Template
    • Add attachment (extra document)
    • Add attachment (extra document) via Template
    • Detail document
    • List documents
    • Delete document
    • Document Audit Trail
    • Optional: Place signatures
    • Reject Documents
  • Signers
    • Detail signer
    • Update signer
    • Add signer
    • Delete signer
    • Batch sign via API
    • Reject Documents by User
  • Templates
    • Create template (DOCX)
      • Configure Template Form
    • List templates
    • Get template
    • Update template
    • Delete template
  • Partnerships
    • Update Payment Status
    • Create Account
  • TIMESTAMP
    • Add timestamp
  • Background Check
  • Introduction
  • Understanding the Result
  • Creating a Background Check
    • Person Check
    • Company check
  • Retrieve a Check
  • Check details
  • Webhooks
    • How webhooks works
    • Testing webhooks on ZapSign
    • Create Webhook
    • Webhooks logs
    • Events
      • Document
        • Doc created
        • Doc deleted
        • Created signer
      • Signer
        • Signature request send
        • Document viewed
        • Reading confirmation
        • Doc signed
        • Doc refused
        • Email bounce
        • Failed Validation
      • Background check
        • Background check completed
    • Reprocessing Documents and Webhooks
    • Delete Webhook
  • Widget
    • How widget works
Powered by GitBook
On this page
  • Create document via Template
  • Request
  • Response
  • More than one signer?
  • How to create a Dynamic Template at ZapSign
  • Chat with Gepeto!

Was this helpful?

  1. Documents

Create document via Template

PreviousCreate document (OneClick)NextAdd attachment (extra document)

Last updated 2 days ago

Was this helpful?

Create document via Template

POST https://api.zapsign.com.br/api/v1/models/create-doc/

This endpoint allows you to create a document using a DOCX Template. You only need to send the data that will replace the dynamic fields in the template in JSON format, and you will receive the response in JSON as well.

Before getting started, you must create the Template on the ZapSign web platform in the Templates section and select the DOCX option (this feature is not available for PDF templates). for creating a dynamic template.

Headers

Name
Type
Description

Authorization*

string

apiToken ahead of the "Bearer" text.

Ex: Bearer c7f35c84-7893-4087-b4fb-d1f06c23

Request Body

Name
Type
Description

template_id*

string

Dynamic template's Identifier/token

Ex: https://app.zapsign.co/conta/modelos/{TEMPLATE_ID}

signer_name*

string

data[]['de']

string

Variable to replace.

Ex: "{{FULL NAME}}"

data[]['para']

string

Value to replace the variable for. Ex: "John Doe"

signer_email

string

signer_phone_country

String

signer_phone_number

String

lang

string

Document's language. Possible values:

"pt-br" (portugues)

"es" (spanish)

"en" (english).

Default: "pt-br"

disable_signer_emails

boolean

To deactivate all emails sent to signers, send this parameter as true.

Default: false

brand_logo

string

If you want to use your brand on the signing experience insted of ZapSign's logo, send here your logo's URL (it has to be publicly accesible)

Default: ""

brand_primary_color

string

If you want to use your brand color on the signing experience as the primary button color, send here the rgb or hexadecimal.

Ex: "#0011ee".

Default: ""

brand_name

string

If you want to set the sender name of all email's sent to signers, send here the brand name.

Ex: if "Lorem Lawyers" is sent, the email's sender will be "Lorem Lawyers via ZapSign".

Max-length: 100 caracteres.

Default: ""

external_id

string

This doc ID on your application.

Default: ""

folder_path

string

path of the folder inside ZapSign where the document will be placed. If the folders do not exist, they will be created automatically. Requirements: (1) folder_path can be up to 255 characters long, (2) each folder can be up to 50 characters long, (3) there is a limit of 5 folder levels.

Ex.: "/api/" or "/folder1/folder2/folder3/". Default: "/" (no folder).

created_by

string

email of the user who will be defined as creator of the document, for internal organization purposes. If the email does not exist or is not your account user, this parameter will be ignored.

Default: "" (document will have template owner as creator)

send_automatic_email

boolean

If true, ZapSign will send an email to the signers with the signature link. If false (default), you will have to send this link to your signer.

Attention: for this field to work, you have to set the signer's email as a dynamic field, ex: {{SIGNER EMAIL}}, and this value must be sent along with the replacement values

custom_message

string

(only if send_automatic_email: true).

The custom_message is the message you can add to the signer's email sent by ZapSign.

Ex: "Helo John, \n This is your job contract. \n

The \n its for "breaking lines" on the email's text.

Default: ""

signer_has_incomplete_fields

bolean

If set to true, the signer will be redirected to fill out the template form before signing the document.

Default: false

reminder_every_n_days

integer

Represents the interval of days between reminders that will be sent to signers, as long as they don`t sign. There will be 3 tries at most. Observation: this field must only be filled if send_automatic_whatsapp or send_automatic_email are true. Example: if setted to 8 it will be sent one email every 7 days, until it's signed, for at most 21 days.

allow_refuse_signature

boolean

If true, signers have the option to refuse to sign. Default: false.

disable_signers_get_original_file

boolean

If true, signers do not have the option to download the original document. Default: false.

signature_order_active

boolean

If true, the signer's signatures will be ordered sequentially. Default: false. Always true when signer_has_incomplete_fields = true.

send_automatic_whatsapp

boolean

send_automatic_whatsapp_signed_file

boolean

Metadata

Array

Custom metadata sent during document creation, in key and value pair format. This information appears only in the creation, signing, rejection, and deletion webhooks.

{
    "open_id": 5,
    "token": "eb9c367a-e62f-4992-8360-b0219deaeecc",
    "status": "pending",
    "name": "Employment Contract",
    "original_file": "https://zapsign.s3.amazonaws.com/pdf/62xxxxx-d8fc-4392-8575-f3c46c3cfc7a/df6bac91-2766-4182-8c8b-ded5287e4c0f.pdf",
    "signed_file": null,
    "created_at": "2020-04-16T03:33:46.241747Z",
    "last_update_at": "2020-04-16T03:33:46.241775Z",
    "signers": [
        {
            "token": "921c115d-4a6e-445d-bdca-03fadedbbc0b",
            "sign_url": "https://app.zapsign.com.br/verificar/921c115d-4a6e-445d-bdca-03fadedbbc0b",
            "status": "new",
            "name": "João da Silva",
            "email": "",
            "phone_country": "",
            "phone_number": "",
            "times_viewed": 0,
            "last_view_at": null,
            "signed_at": null
        }
    ],
    "answers": [ // list of variables and responses in the dynamic model (if the document was created using a dynamic model).
        {
            "variable": "COMPLETE NAME",
            "value": "Name Test"
        },
        {
            "variable": "FULL ADDRESS",
            "value": "Address Test"
        }
    ]
}

Request

Response

After a successfull request, you should get a response like this:

{
    "open_id": 5,
    "token": "eb9c367a-e62f-4992-8360-b0219deaeecc",
    "status": "pending",
    "name": "Job contract",
    "original_file": "https://zapsign.s3.amazonaws.com/pdf/62xxxxx-d8fc-4392-8575-f3c46c3cfc7a/df6bac91-2766-4182-8c8b-ded5287e4c0f.pdf",
    "signed_file": null,
    "created_at": "2020-04-16T03:33:46.241747Z",
    "last_update_at": "2020-04-16T03:33:46.241775Z",
    "signers": [
        {
            "token": "921c115d-4a6e-445d-bdca-03fadedbbc0b",
            "sign_url": "https://app.zapsign.co/verificar/921c115d-4a6e-445d-bdca-03fadedbbc0b",
            "status": "new",
            "name": "John Doe",
            "email": "",
            "phone_country": "",
            "phone_number": "",
            "times_viewed": 0,
            "last_view_at": null,
            "signed_at": null,
            "resend_attempts": null
        }
    ],
    "answers": [
        {
            "variable": "FULL NAME",
            "value": "Foo bar"
        },
        {
            "variable": "SOCIAL SECURITY NUMBER",
            "value": "999-99-XXXX"
        },
        {
            "variable": "FULL ADDRESS",
            "value": "2989 Heller Crossing Apt. 023 - Springfield, NY / 13347"
        }
    ]
}

What you should do with this response is send the signature link to the signer through your application.

The signature link consists of the route: https://app.zapsign.co/verificar/{signer_token}

Thus, in the example above, where we have one signer, you must send the following signature link: - https://app.zapsign.co/verificar/921c115d-4a6e-445d-bdca-03fadedbbc0b And now just wait for your signer to sign!

More than one signer?

How to create a Dynamic Template at ZapSign

Enter our help center and check the step-by-step:

Chat with Gepeto!

Have any questions? Use our artificial intelligence trained with all the API documentation. =)

To access yout templates list. just click here:

Signer's name. If there is more than one signer on your document, you can add it latter using the endpoint.

Signer's email. If there is more than one signer on your document, you can add it latter using the endpoint.

Signer's country code (Ex: 1). If there is more than one signer on your document, you can add it latter using the endpoint.

Signer's phone number (Ex: 11999999999). If there is more than one signer on your document, you can add it latter using the endpoint.

If true, ZapSign will send a whatsapp message to the signer with the link to sign the document. Note: For this to work, it is mandatory that the signer's phone number is defined. each automatic sending via WhatsApp (tokenWhatsapp) costs 0,1 USD. Buy credits in .

If true, ZapSign will send a whatsapp message to the signer with the link to the signed document. Note: For this to work, it is mandatory that the signer's phone number is defined. each automatic sending via WhatsApp (tokenWhatsapp) costs 0,1 USD. Buy credits in .

Caution: the original_file and signed_file links are temporary and expires in 60 minutes. In case your system needs to save those links it is recommended that you save them in your own CDN or that you call the endpoint every time your user needs a valid URL that will expires in more 60 minutes.

If you want to add more signers, use the "" endpoint, receive the new signer's token and send the signature link as explained above.

See the tutorial
Detail document
Add Signer
LogoCreate doc from Template | ZapSign WorkspacePostman
URL for postman Create doc from Template endpoint
LogoTemplates: What are they for and how to use?
LogoChat
https://app.zapsign.co/conta/modelos/
Add signer
Add signer
Add signer
Add signer
Configuration > Plan
Configuration > Plan