Add Sign Intents
Create Sign Intents for the agreement.
Send request
- POST https://api.zigned.io/rest/v2/agreements/[id]/signintents
- Content-type: application/json
Request body
signintentsArray
An array of email addresses. Each address becomes a new sign intent. Duplicates are allowed.
Code example
const fetch = require('node-fetch');
let url = 'https://api.zigned.io/rest/v2/agreements/4004f451-26bf-48c9-b77b-528312be5a32/signintents';
let options = {
method: 'POST',
headers: {'x-zigned-api-key': 'Your API key'},
body: '{"signintents":["email1@example.com"]}'
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error('error:' + err));
Success response
Description
Details
- HTTP Status: 201
- Mime type: application/json
Response body
idString
The unique ID of the agreement
statusEnumeration
Status of the agreement.
Possible values:
- draft
- pending
- fulfilled
test_modeBoolean
Indicates if the agreement is for testing purposes
issuerString | Null
Issuer of the agreement
sign_intentsArray | Null
Sign Intents of the agreement.
original_documentObject | Null
Original document to be signed.
signed_documentObject | Null
The signed and finished document.
created_atDateTime
The UTC date of when the agreement was created
updated_atDateTime
The UTC date of when the agreement was last updated
Code Example
{
"id": "bc08cbbd-d565-4d07-b219-71cb607a2216",
"status": "draft",
"test_mode": false,
"issuer": "Example AB",
"sign_intents": [{
"id": "4da3a490-db93-476b-ba24-f548e79f75ae",
"email": "email@example.com",
"status": "draft",
"signing_room_url": "",
"signing_session": {
"id": "6b4a86ae-5f58-4836-828f-9e23cee2dba7",
"status": "draft",
"signing_session_events": [],
"signed_at": "Tue, 11 Jan 2022 15:59:53 GMT",
"signature_method": "Signature not initiated",
"created_at": "Tue, 11 Jan 2022 15:59:53 GMT",
"updated_at": "Tue, 11 Jan 2022 15:59:53 GMT"
},
"created_at": "Tue, 11 Jan 2022 15:59:53 GMT",
"updated_at": "Tue, 11 Jan 2022 15:59:53 GMT"
}],
"original_document": {
"id": "7c7cfbc0-32c5-4a2b-8cd0-4e39585f9f03",
"filename": "example.pdf",
"mime_type": "application/pdf",
"url": "www.zigned.se",
"compatibility_check": "successful",
"created_at": "Tue, 11 Jan 2022 15:59:53 GMT",
"updated_at": "Tue, 11 Jan 2022 15:59:53 GMT"
},
"signed_document": {},
"created_at": "Tue, 11 Jan 2022 15:59:53 GMT",
"updated_at": "Tue, 11 Jan 2022 15:59:53 GMT"
}
Error responses
Description
signintents is missing from the request body or the signintents array was empty.
Details
- HTTP Status: 400
- Mime type: application/json
- Message: You must provide at least one Sign Intent
Code Example
{
"status": 400,
"message": "You must provide at least one Sign Intent"
}
Description
The array provided was malformed
Details
- HTTP Status: 400
- Mime type: application/json
- Message: Property signintents must be an array of email recipients
Code Example
{
"status": 400,
"message": "Property signintents must be an array of email recipients"
}
Description
Some of the emails provided are invalid.
Details
- HTTP Status: 400
- Mime type: application/json
- Message: The following sign intents are invalid: [comma separated list of invalid email addresses].
Code Example
{
"status": 400,
"message": "The following sign intents are invalid: [comma separated list of invalid email addresses]."
}
Description
Something went wrong on the server while trying to attach the Sign Intents.
Details
- HTTP Status: 500
- Mime type:
- Message: Could not add Sign Intents.
Code Example
{
"status": 500,
"message": "Could not add Sign Intents."
}