NAV Navbar
Logo
javascript

INTRODUCTION

Welcome to the Juro API!

Juro is a platform for automating legal contract workflows, integrating contracts with data sources and managing contract lifecycles.

The Juro API allows you to integrate, generate, and e-sign contracts, be notified of contract activity and query your existing contract stack for structured data about the contract itself and any associated metadata. Gain insight into your contract pipeline, obligations and terms in a machine readable form.

We have setup webhooks so that you can have an easy way of subscribing to events happening on your account, with your contracts.

TUTORIAL

Templates and contracts

A contract in Juro usually is built on top of a generic template. You can create unlimited number of contracts based on a template with infinite variations to either the text of the contract or it’s input data.

Contract templates in Juro consist of two main elements, body and smartfields:

(1) Main body

The main body is where most of the legal language is typically incorporated in templates and this part doesn’t change with each instance of a contract created from that template.

(2) Smartfields

Smartfields are dynamic elements in a template, which can either be integrated with data sources (smartfield replacements) or linked to a Q&A and help texts in our user interface.

Smartfields can be populated by either the contract owner and/or the counterparty. Populating smartfields is done through the contract create method sending fields property or the counterparty answering questions in a Q&A flow immediately prior to signing.

In the latter case, before signing, the counterparty will be prompted to answer a few questions when the signing link is clicked, which will populate smartfields or potentially affect smartfield replacements.

Signatures

The counterparty signature should be acquired by the counterparty following a Juro signing link reading the terms and signing the contract in accordance with Juro’s electronic signing tool. This will verify the identity of the signatory and deliver an immutable audit trail.

Electronic signature for the owner side should be sent in base64 format. It should be image/png encoded in base64 format with the dimensions (475x175 pixels).

Contract lifecycle

The first phase of the lifecycle of your contract starts when you first create a draft contract instance from a template and ends in the fully_signed status, at which point all participants have signed the contract and it becomes legally binding and immutable.

After all signatures are saved and updated on your contract, the contract will automatically be moved to fully signed status. That will indicate that you can now access a pdf of the contract signed by all parties (which is emailed to both parties by default) and the contract and its audit trail becomes immutable.

If you get any comments on the contract in question from your counterparties, the contract owner will be notified via email (or Slack if integrated) and will need to reply to comments via Juro’s UI.

The second phase of your contract (post signing) incorporates key obligation milestones, execution of particular contract terms and culminates in a renewal of that contract. Coming soon to the Juro API…

Getting started

To process your first contract you will need to follow these steps:

  1. Get your API Key;
  2. Get the id of your template to use for the contract generation (e.g. sample NDA template);
  3. Pass all the necessary information for the contract to be created;
  4. After you have generated the contract you can now send it for signing as well as sign yourself;
  5. When the contract is signed you will be able to download the pdf of the fully signed contract.

Responding to events

A lot of integration cases revolve around syncing information between multiple systems (for example, pulling data out of an opportunity in Salesforce) and triggering events (for example uploading a pdf of fully signed contract to an opportunity in Salesforce).

You can use webhooks to subscribe to events and then decide what you want to do when that event happens. The following is a list of events currently supported by Juro.

AUTHENTICATION

Getting an authentication token

Authenticating your API calls

Make sure to replace <API_KEY> with your API key.

You have multiple ways of authenticating with Juro API. The simplest way is to use an API key provided to you when you have created an account within Juro.

Please don’t forget to include the API key in all of your requests. You can easily do that by adding x-api-key to your headers.

x-api-key: YourAPIKey

HEALTH

Check Juro health

Request

request.get({
    headers: { 'x-api-key': <API_KEY> },
    url: 'https://api.juro.com/v3/health'
})

Example Response

{
    "message": "ok"
}

It’s really easy to see if Juro is experiencing any health related issues. Fingers crossed. Use this to quickly check that your API key is correct and you have access to the API.

HTTP Request

GET /v3/health

TEMPLATES

Templates are a core part of your contract management flow. You should have a template to create your contracts from. No template, no contract it’s that simple.

Get all available templates

Request

request.get({
    headers: { 'x-api-key': <API_KEY> },
    url: 'https://api.juro.com/v3/templates'
})

Example Response

{
    "templates": [
        {
            "id": "5de9227402e24204247757c4",
            "createdDate": "2018-06-25T14:04:08.804Z",
            "name": "Infinity template",
            "status": "published",
            "updatedDate": "2018-06-25T14:20:39.564Z"
        }
    ]
}

You first want to get all templates to correctly select the one that you are going to use to create your contract.

HTTP Request

GET /v3/templates

Get a specific template

Request

request.get({
    headers: { 'x-api-key': <API_KEY> },
    url: 'https://api.juro.com/v3/templates/:template_id'
})

Example Response

{
    "template": {
        "id": "5de9227402e24204247757c4",
        "createdDate": "2019-12-05T15:29:56.821Z",
        "fields": [
            {
                "title": "address",
                "type": "text",
                "uid": "2d6f2279-dee8-4e17-ad1d-e18cb6b8acc0",
                "value": ""
            },
            {
                "choices": [
                    {
                        "value": "private"
                    },
                    {
                        "value": "public"
                    }
                ],
                "title": "address type",
                "type": "choice",
                "uid": "076fafa9-ff61-4eeb-b8a5-a8dfe0e2ae58",
                "value": "private"
            }
        ],
        "internalUrl": "https://app.juro.com/sign/5de9227402e24204247757c4",
        "name": "Infinity template",
        "sharingUrl": "https://app.juro.com/RYlhvBEgN",
        "status": "published",
        "updatedDate": "2019-12-05T15:53:40.069Z",
        "questions": [
            {
                "isRequired": true,
                "signingSideUids": [
                    "491c1a5a-7db2-400f-ae34-ab1405027763"
                ],
                "text": "",
                "title": "What is the name of the other party?",
                "uid": "counterparty_legal_name"
            },
            {
                "isRequired": true,
                "signingSideUids": [],
                "text": "This is to help us verify your identity and for security reasons",
                "title": "For access, please confirm your name",
                "uid": "signatory_name"
            },
            {
                "isRequired": true,
                "signingSideUids": [],
                "text": "This is the email address that we will send the signed contract to",
                "title": "What is your email address?",
                "uid": "signatory_email"
            },
            {
                "fieldUid": "2d6f2279-dee8-4e17-ad1d-e18cb6b8acc0",
                "isRequired": true,
                "signingSideUids": [
                    "fcfedf27-2b20-49ef-b408-3544c16dc064"
                ],
                "text": "",
                "title": "Please provide your address",
                "uid": "f6459a85-ba52-4fd5-94d2-27cf27d11c55"
            },
            {
                "fieldUid": "076fafa9-ff61-4eeb-b8a5-a8dfe0e2ae58",
                "isRequired": false,
                "signingSideUids": [
                    "fcfedf27-2b20-49ef-b408-3544c16dc064"
                ],
                "text": "",
                "title": "Is this your public or private address?",
                "uid": "7addc6ac-2076-43af-8346-d5d137993c45"
            }
        ],
        "signingSides": [
            {
                "name": "Juro Unlimited",
                "signatures": [
                    {
                        "signingUrl": "https://app.juro.com/sign/5de9227402e24204247757c4",
                        "uid": "c9a78e60-8522-4ecc-a3fb-22da233f249d",
                        "username": "user@juro.com"
                    }
                ],
                "uid": "491c1a5a-7db2-400f-ae34-ab1405027763"
            },
            {
                "name": "Infinity industries",
                "signatures": [
                    {
                        "email": null,
                        "signingUrl": "https://app.juro.com/counterparty/sign/lXDZeHvAy",
                        "name": null,
                        "uid": "7b17e670-6c74-4d00-aa1c-54ead6666044"
                    }
                ],
                "uid": "fcfedf27-2b20-49ef-b408-3544c16dc064"
            }
        ],
        "state": {
            "approval": {
                "approvers": [
                    {
                        "username": "user@juro.com"
                    }
                ]
            }
        },
        "tables": [
            {
                "rows": [
                    [
                        {
                            "value": "first header"
                        },
                        {
                            "value": "second header"
                        }
                    ],
                    [
                        {
                            "value": "first value"
                        },
                        {
                            "value": "second header value"
                        }
                    ]
                ],
                "uid": "8d5a30ab-0249-4735-b033-df06ea7facf1"
            }
        ]
    }
}

This endpoint retrieves a specific template.

HTTP Request

GET /v3/templates/:template_id

Response Body

Field Description
id template id
createdDate document creation date
fields list of field items
internalUrl url for signed in Juro users
name template name
questions list of question items
sharingUrl url you would share with the outside world e.g. anonymous users
signingSides list of signing side items
state document state
status edit in progress or published document status
updateDate date when document was last updated

CONTRACTS

Create a contract

Request

request.post({
    headers: {
        'content-type': 'application/json',
        'x-api-key': <API_KEY> 
    },
    url: 'https://api.juro.com/v3/contracts',
    json: {
        "templateId": "5de9227402e24204247757c4",
        "contract": {
            "answers": [
                {
                    "uid": "counterparty_legal_name",
                    "value": "Infinity industries"
                }
            ]
        }
    }
})

Example Response

{
    "contract": {
        "id": "5de92ae0bb0bf42c5ce2fe7c",
        "createdDate": "2019-12-05T16:05:52.659Z",
        "fields": [
            {
                "title": "address",
                "type": "text",
                "uid": "2d6f2279-dee8-4e17-ad1d-e18cb6b8acc0",
                "value": ""
            },
            {
                "choices": [
                    {
                        "value": "private"
                    },
                    {
                        "value": "public"
                    }
                ],
                "title": "address type",
                "type": "choice",
                "uid": "076fafa9-ff61-4eeb-b8a5-a8dfe0e2ae58",
                "value": "private"
            }
        ],
        "internalUrl": "https://app.juro.com/sign/5de92ae0bb0bf42c5ce2fe7c",
        "sharingUrl": "https://app.juro.com/s1tEGduYQ",
        "name": "Infinity industries",
        "status": "draft",
        "updatedDate": "2019-12-05T16:05:53.399Z",
        "questions": [
            {
                "isRequired": true,
                "signingSideUids": [
                    "491c1a5a-7db2-400f-ae34-ab1405027763"
                ],
                "text": "",
                "title": "What is the name of the other party?",
                "uid": "counterparty_legal_name"
            },
            {
                "isRequired": true,
                "signingSideUids": [],
                "text": "This is to help us verify your identity and for security reasons",
                "title": "For access, please confirm your name",
                "uid": "signatory_name"
            },
            {
                "isRequired": true,
                "signingSideUids": [],
                "text": "This is the email address that we will send the signed contract to",
                "title": "What is your email address?",
                "uid": "signatory_email"
            },
            {
                "fieldUid": "2d6f2279-dee8-4e17-ad1d-e18cb6b8acc0",
                "isRequired": true,
                "signingSideUids": [
                    "fcfedf27-2b20-49ef-b408-3544c16dc064"
                ],
                "text": "",
                "title": "Please provide your address",
                "uid": "f6459a85-ba52-4fd5-94d2-27cf27d11c55"
            },
            {
                "fieldUid": "076fafa9-ff61-4eeb-b8a5-a8dfe0e2ae58",
                "isRequired": false,
                "signingSideUids": [
                    "fcfedf27-2b20-49ef-b408-3544c16dc064"
                ],
                "text": "",
                "title": "Is this your public or private address?",
                "uid": "7addc6ac-2076-43af-8346-d5d137993c45"
            }
        ],
        "signingSides": [
            {
                "name": "Juro Unlimited",
                "signatures": [
                    {
                        "signingUrl": "https://app.juro.com/sign/5de92ae0bb0bf42c5ce2fe7c",
                        "name": null,
                        "uid": "c9a78e60-8522-4ecc-a3fb-22da233f249d",
                        "username": "user@juro.com"
                    }
                ],
                "uid": "491c1a5a-7db2-400f-ae34-ab1405027763"
            },
            {
                "name": "Infinity industries",
                "signatures": [
                    {
                        "email": null,
                        "signingUrl": "https://app.juro.com/counterparty/sign/Mbl9vNYIk",
                        "name": null,
                        "uid": "7b17e670-6c74-4d00-aa1c-54ead6666044"
                    }
                ],
                "uid": "fcfedf27-2b20-49ef-b408-3544c16dc064"
            }
        ],
        "state": {
            "approval": {
                "approvers": [
                    {
                        "username": "user@juro.com"
                    }
                ]
            }
        },
        "tables": [
            {
                "rows": [
                    [
                        {
                            "value": "first header"
                        },
                        {
                            "value": "second header"
                        }
                    ],
                    [
                        {
                            "value": "first value"
                        },
                        {
                            "value": "second header value"
                        }
                    ]
                ],
                "uid": "8d5a30ab-0249-4735-b033-df06ea7facf1"
            }
        ],
        "template": {
            "id": "5de9227402e24204247757c4",
            "name": "Infinity template"
        }
    }
}

This endpoint creates a contract.

Let’s create a contract based on an example template. In example template we have just one question set as required, in this case it’s an absolute minimum of inputs we should provide in order to create a contract.

HTTP Request

POST /v3/contracts

Body

Parameter Required Description
templateId * id of template
answers list of answer items
fields list of field items
signingSides list of signing side items
tables list of table items

Response Body

Parameter Description
id contract id
createdDate document creation date
fields list of field items
internalUrl url for signed in Juro users
name contract name
questions list of question items
sharingUrl url you would share with the outside world e.g. anonymous users
signingSides list of signing side items
state document state
status contract status
template.id template id
template.name template name
updateDate date when document was last updated

Get a specific contract

Request

request.get({
    headers: { 'x-api-key': <API_KEY> },
    url: 'https://api.juro.com/v3/contracts/:contract_id'
})

This endpoint retrieves a specific contract.

HTTP Request

GET /v3/contracts/:contract_id

Path params

Parameter Required Description
contract_id * The ID of the contract to retrieve

Response body

For response body please refer to Create a contract

Update a contract

Request

request.patch({
    headers: {
        'content-type': 'application/json',
        'x-api-key': <API_KEY> 
    },
    url: 'https://api.juro.com/v3/contracts/:contract_id',
    json: {
    "contract": {
        "fields": [
            {
                "uid": "2d6f2279-dee8-4e17-ad1d-e18cb6b8acc0",
                "value": "Infinity Street"
            },
            {
                "uid": "076fafa9-ff61-4eeb-b8a5-a8dfe0e2ae58",
                "value": "public"
            }
        ],
        "signingSides": [
            {
                "signatures": [
                    {
                        "uid": "c9a78e60-8522-4ecc-a3fb-22da233f249d",
                        "username": "user@juro.com"
                    }
                ],
                "uid": "491c1a5a-7db2-400f-ae34-ab1405027763"
            },
            {
                "name": "Infinity industries",
                "signatures": [
                    {
                        "email": "customer@infinity.uk",
                        "uid": "7b17e670-6c74-4d00-aa1c-54ead6666044"
                    }
                ],
                "uid": "fcfedf27-2b20-49ef-b408-3544c16dc064"
            }
        ],
        "tables": [
            {
                "rows": [
                    [
                        {
                            "value": "updated"
                        },
                        {
                            "value": "table"
                        }
                    ]
                ],
                "uid": "8d5a30ab-0249-4735-b033-df06ea7facf1"
            }
        ]
    }
})

This endpoint updates an existing contract.

HTTP Request

PATCH /v3/contracts/:contract_id

Path params

Parameter Required Description
contract_id * The ID of the contract to make update request

Body

Parameter Required Description
fields list of field items
signingSides list of signing side items
tables list of table items

Response body

For response body please refer to Create a contract

Delete a contract

Request

request.delete({
    headers: {
        'content-type': 'application/json',
        'x-api-key': <API_KEY> 
    },
    url: 'https://api.juro.com/v3/contracts/:contract_id'
})

Example Response

{
    "message": "ok"
}

This endpoint deletes a specific contract.

HTTP Request

DELETE /v3/contracts/:contract_id

Path params

Parameter Required Description
contract_id * The ID of the contract to delete

Sign your contract

Request

request.post({
    headers: {
        'content-type': 'application/json',
        'x-api-key': <API_KEY> 
    },
    url: 'https://api.juro.com/v3/contracts/:contract_id/sign',
    json: {
        "signatureBase64": "iVBORw0KGgoAAAANSUhEUgAAAdgAAAC4CAYAAABAWv13AAAWdElEQVR4Xu3df4gk+VnH8U/1zK1rArlNiJhE5e4CGhU1G8U7QpDbU4TN7Yy3h2BUhNuFQ/xHbheCgv/cnvhHVDCziAhidBckRFBul+k9FiPcbn5gUMLNxkT9IzFzgQvBeLK5mOTMznTJ8+2umerq6l/T9cx09/NuOHK5qXqqvq9vdT9V9f2ViQ8CCAQXOHtC2nlGyi41AHFX6lyQblxtIBYhEFhogWyhz56TRwCBGQUePymtvCjphJRLKv8k5HekbEvKt7sHyU5K+Ukpe2D4QS1G+rwm5WvSjU/OeILsjsDCCpBgF7bqOHEEmhBY25Kyd+9HSgnyjtQ+OTz66Z+SVs5KrXdK+Vkpu79//74kfUlqP9fEmRIDgUUTIMEuWo1xvgjMLJBeCT8lyV4LP1RKjvbEuiFtXpnuEOkpeEPKH+1/Ai6i5FvS6mPStbvTxWXrwxc48yGpdVHK70lak9q3Dv8clueIJNjlqUtKgsAEAmcuS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vrOHsa1d8zojZb3vdpqasZiecUvavSfln61vh03X0rFeL/vy74J9h39U6vyrlP9ZM3VeHr7UudZMk8LA93ZLar/nMNSX8RjBE2y5SlPCsqfa3gwyTdypVi+Zw4w5D8M5ykuoHbTsZcOJ25yKGX3sBmjcsJcxHbUO0qY27jwXYVrDZfy5o0zjBepmc1p58+Q3reOPEGkLEuxAbdsdXPbhCZfVmsNrpa7d+ShP09rErV3YxiHO+hmXuA6ajGc9r0n3t/Y2axOjV/CkYmx3FALF+r17x34yXrNOM+4k2FrH1Ib4V1I2xOegT2Pe++WvSJ21Zl4VNXOBdaOkSd7vSK2a6dns75Mmzkm3K2Ja4GF1WJTPvU7u9DqxNPQKr8l6IRYCdQLr1oRT7p9yVdq0ntd8phQgwQ4Fs6EUafand/TaQHs9a/d+vK3NztoGv9gfwtpg9X9SZu2sr0ppSS2bqsza6H5Qyr+v/m+pDdaW8tqWskobbKfXfpO9Vcp+Zv946YnItrW2yQbbdqa8iibafG8llQe7bZI2bKrovWltqlaW7Avdttnqx+xsHKL9b7472AZbbL9q43otn40Y61eOXW6DXf324HE775Wyn5Ty/5JalZh7dWLT99l0ctZGZ3W31W0337FyfKaZtraJgNkIgYYEqivv2HW9+VBDwUOFIcFOXN3Fqh+2g3WwsY5GR/Vhkv6jkue4CMQQGFg79pBeE6c24Kd6N6kLP+kPCTbGt4VSIoAAAlMIVF8T2xSN7cemCHDATfvafxf+1TQJ9oCXAbshgAACyyuQRlV8uV"
    }
})

Example Response

{
    "message": "ok"
}

This endpoint allows for signing of a contract.

HTTP Request

POST /v3/contracts/:contract_id/sign

Path params

Parameter Required Description
contract_id * The ID of the contract to sign

Body

Parameter Required Description
signatureBase64 * signature image encoded in base64

Download a PDF of your contract

Request

request.get({
    headers: { 'x-api-key': <API_KEY> },
    url: 'https://api.juro.com/v3/contracts/:contract_id/pdf/binary'
})

Example Response

content-disposition: attachment; filename="Pichael Mennington + Juro contract.pdf"
content-type: application/pdf
status: 200

binary data

This endpoint allows to download a pdf version of your contract.

HTTP Request

GET /v3/contracts/:contract_id/pdf/binary

Path params

Parameter Required Description
contract_id * The ID of the contract

ENTITY TYPES

Answer

{
    "uid": "counterparty_legal_name",
    "value": "Pichael Mennington"
}

An answer item is an answer to the question item and is particularly used only during contract creation. answer will populate field refered as fieldUid in question

Field

Request

{
    "uid": "1530036548211_2cc498d4c72e442a81d0caeb709bbec3",
    "value": "Pichael Mennington"
}

Response

{
    "uid": "1530036548211_2cc498d4c72e442a81d0caeb709bbec3",
    "title": "full name",
    "type": "text",
    "value": "Pichael Mennington"
}

A field entity looks like this:

Table

{
    "uid": "8d5a30ab-0249-4735-b033-df06ea7facf1",
    "rows": [
        [
            { "value": "first header" },
            { "value": "second header" },
            { "value": "third header" }
        ]
    ]
}

Table in Juro is more like grid than a table, meaning it doesn’t have headers, just a two-dimensional array of rows and columns in it, making it easier to utilize table api.

A table entity looks like this:

Question

{
    "uid": "counterparty_legal_name",
    "isRequired": true,
    "signingSideUids": ["491c1a5a-7db2-400f-ae34-ab1405027763"],
    "title": "What is the legal name of the other party?"
}

A question entity looks like this:

Signing side

Request(internal type)

{
    "signatures": [
        {
            "uid": "c9a78e60-8522-4ecc-a3fb-22da233f249d",
            "username": "user@juro.com"
        }
    ],
    "uid": "491c1a5a-7db2-400f-ae34-ab1405027763"
}

Request(external type)

{
    "name": "Infinity industries",
    "signatures": [
        {
            "email": "customer@infinity.uk",
            "uid": "7b17e670-6c74-4d00-aa1c-54ead6666044"
        }
    ],
    "uid": "fcfedf27-2b20-49ef-b408-3544c16dc064"
}

Response

{
    "name": "Juro Unlimited",
    "signatures": [
        {
            "uid": "c9a78e60-8522-4ecc-a3fb-22da233f249d",
            "username": "user@juro.com"
        }
    ],
    "uid": "491c1a5a-7db2-400f-ae34-ab1405027763"
}

A signing side entity looks like this:

WEBHOOKS

Webhooks provides an easy way to receive asynchronous events. This allows you to receive push notifications for contract events as they happen in an account.

Setting up webhooks

Events

Example contract event body

{
  "contract": {
      "id": "5de92ae0bb0bf42c5ce2fe7c",
      "createdDate": "2019-12-05T16:05:52.659Z",
      "fields": [
          {
              "title": "address",
              "type": "text",
              "uid": "2d6f2279-dee8-4e17-ad1d-e18cb6b8acc0",
              "value": ""
          },
          {
              "title": "address type",
              "type": "choice",
              "uid": "076fafa9-ff61-4eeb-b8a5-a8dfe0e2ae58",
              "value": "private"
          }
      ],
      "internalUrl": "https://app.juro.com/sign/5de92ae0bb0bf42c5ce2fe7c",
      "name": "Infinity industries",
      "sharingUrl": "https://app.juro.com/s1tEGduYQ",
      "signingSides": [
          {
              "name": "Juro Unlimited",
              "signatures": [
                  {
                      "signingUrl": "https://app.juro.com/sign/5de92ae0bb0bf42c5ce2fe7c",
                      "name": null,
                      "uid": "c9a78e60-8522-4ecc-a3fb-22da233f249d",
                      "username": "user@juro.com"
                  }
              ],
              "uid": "491c1a5a-7db2-400f-ae34-ab1405027763"
          },
          {
              "name": "Infinity industries",
              "signatures": [
                  {
                      "email": null,
                      "signingUrl": "https://app.juro.com/counterparty/sign/Mbl9vNYIk",
                      "name": null,
                      "uid": "7b17e670-6c74-4d00-aa1c-54ead6666044"
                  }
              ],
              "uid": "fcfedf27-2b20-49ef-b408-3544c16dc064"
          }
      ],
      "status": "draft",
      "template": {
        "id": "5de9227402e24204247757c4",
        "name": "Infinity template"
      },
      "updatedDate": "2019-12-05T16:05:53.399Z"
  },
  "event": {
    "type": "contract.edit"
  }
}

We are providing all the relevant events associated with the currently exposed lifecycle of the contract. A more exhaustive list of events hapenning to your account and all related entities associated with it can be found in the activities section of the application. We will be rolling out additional events as we further develop the API.

Security

Basic

Basic algorithm

const hash = Buffer.from(`${username}:${password}`).toString('base64');

The client sends HTTP requests with the Authorization header that contains the word Basic followed by a space and a base64-encoded string username:password.

Authorization: Basic ${hash}

Secret key

Secret key algorithm

const hash = crypto.createHmac('sha256', secret)
.update(body)
.digest('hex');

Secret key ensures that the payload is coming from a trusted source since secret is known only by the provider and consumer. The typical flow of the provider would be to calculate signature by generating hash from payload body and secret. This hash then will be pushed in a signature header along with the webhook body.

signature: sha256 ${hash}

Consumer on the other hand should calculate hash on their end and compare it to the one they have received.

ERRORS

Juro API error descriptions

Error Description
Bad Request Request has malformed syntax or invalid message framing.
Contract already signed Unable to perform action because contract is already signed.
Contract not found Contract with provided id not found.
Field not found contract.fields with provided uid not found.
Forbidden Invalid API key submitted. Check that you have provided x-api-key header with valid API key.
Incompatible state error Contract is in an incompatible state to perform underlying action e.g. download PDF is issued but contract PDF is not yet generated. Generally PDF will be generated when contract is fully signed.
Internal server error Something has gone wrong on the server, but the server could not be more specific on what that exact problem is.
Invalid question signing side This error indicates that you are answering questions that are linked to other signing side and not linked to your signing side. Check that questions that you are trying to answer are linked to your signing side by comparing uids(contract.questions.signingSideUids=contract.signingSides[0].uid).
Invalid email format error Malformed email provided.
Invalid value format error Provided value does not confront expected type, e.g. providing decimal in text field will throw this error.
Missing Authentication Token This error indicates that request is missing authentication token or provides an unsupported API method or resource. Check that your API method(GET, POST, …) and URL is correct.
Missing required answer This error indicates that some of the crucial answers were not provided when creating a contract. All required answers(contract.questions.isRequired) that are linked to your signing side should be provided when creating a contract.
Limit Exceeded Monthly quota exceeded.
Question not found contract.questions not found for provided answer.
Signature not found contract.signingSides.signatures with provided uid not found.
Template not found template with provided id not found.
Template not published Unable to create contract when underlying template is not published. Go to https://app.juro.com and publish template.
Too Many Requests Too many requests in short time exceeded throttling limits.
Unauthorized Integration account linked to API key is not authorized. Deactivate your API key and activate it back again in Juro > Settings > Integrations > API.