Save or Update Webhook
POST/webhook
The save or update Webhook API allow you to save webhook url which is used to trigger events
events:
- viewed:
- When signer viewed document this event will trigger.
{
"event": "viewed",
"objectId":"DOCUMENT_ID"
"file": "DOCUMENT_URL",
"name": "DOCUMENT_NAME",
"note": "Please review and sign this document",
"description": "",
"signers": [
{
"name": "SIGNER_NAME",
"email": "SIGNER_EMAIL",
"phone": "SIGNER_PHONE"
}
],
"viewedBy": "SIGNER_EMAIL",
"viewedAt": "TIMESTAMP",
"createdAt": "TIMESTAMP"
} - created:
- When document is created this event will trigger.
{
"event": "created",
"objectId":"DOCUMENT_ID"
"file": "DOCUMENT_URL",
"name": "DOCUMENT_NAME",
"note": "Please review and sign this document",
"description": "",
"signers": [
{
"name": "SIGNER_NAME",
"email": "SIGNER_EMAIL",
"phone": "SIGNER_PHONE"
}
],
"createdAt": "TIMESTAMP"
} - signed:
- When document is signed by signer this event will trigger.
{
"event": "signed",
"objectId":"DOCUMENT_ID"
"file": "DOCUMENT_URL",
"name": "DOCUMENT_NAME",
"note": "Please review and sign this document",
"description": "",
"signers": [
{
"name": "SIGNER_NAME",
"email": "SIGNER_EMAIL",
"phone": "SIGNER_PHONE"
},
]
"signedAt": "TIMESTAMP",
"createdAt": "TIMESTAMP"
} - completed:
- When document is signed by all signers this event will trigger.
{
"event": "completed",
"objectId":"DOCUMENT_ID"
"file": "DOCUMENT_URL",
"name": "DOCUMENT_NAME",
"note": "Please review and sign this document",
"description": "",
"signers": [
{
"name": "SIGNER_NAME",
"email": "SIGNER_EMAIL",
"phone": "SIGNER_PHONE"
}
],
"completedAt": "TIMESTAMP",
"createdAt": "TIMESTAMP"
} - declined:
- When document is declined by signer this event will trigger.
{
"event": "declined",
"objectId":"DOCUMENT_ID"
"file": "DOCUMENT_URL",
"name": "DOCUMENT_NAME",
"note": "Please review and sign this document",
"description": "",
"signers": [
{
"name": "SIGNER_NAME",
"email": "SIGNER_EMAIL",
"phone": "SIGNER_PHONE"
}
],
"declinedBy": "SIGNER_EMAIL",
"declinedAt": "TIMESTAMP",
"createdAt": "TIMESTAMP"
}
Request
- application/json
Body
Provide url to create Webhook
url string
Responses
- 200
- 400
- 401
- 404
- 405
Successful operation
- application/json
- Schema
- Example (from schema)
Schema
result string
{
"result": "Webhook updated successfully!"
}
Something went wrong, please try again later!
- application/json
- Schema
- Example (from schema)
Schema
error string
{
"error": "Something went wrong, please try again later!"
}
Webhook url already exists!
- application/json
- Schema
- Example (from schema)
Schema
error string
{
"error": "Webhook url already exists!"
}
User not found!
- application/json
- Schema
- Example (from schema)
Schema
error string
{
"error": "User not found!"
}
Invalid API Token!
- application/json
- Schema
- Example (from schema)
Schema
error string
{
"error": "Invalid API token!"
}
Loading...