/procedures
POST {{base-api-url}}/procedures
In this procedure, each time a member have finished to sign (or validate), each time the url https://YOUR_WEBHOOK_URL.com
will be called by Yousign API.
method
will define the way that we will call you.- You can add custom header at your convenience with
X-Custom-Header
for example. - When you receive a webhook on a procedure event
procedure.*
, you will receive in the body of the request the procedure object. - If you receive a webhook defined on a member event
member.*
, you will receive in the body the procedure object + the member object.
Request Body
{"name"=>"How to use webhooks", "description"=>"Description of my first procedure with webhooks", "start"=>true, "members"=>[{"firstname"=>"John", "lastname"=>"Doe", "email"=>"john.doe@yousign.fr", "phone"=>"+33612345678", "fileObjects"=>[{"position"=>"191,497,507,603", "page"=>2, "file"=>"/files/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"}]}], "config"=>{"webhook"=>{"member.finished"=>[{"url"=>"https://YOUR_WEBHOOK_URL.com", "method"=>"GET", "headers"=>{"X-Custom-Header"=>"Yousign Webhook - Test value"}}]}}}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Authorization | string | This value is a secret and needs to be replaced by your API Key (Bearer). | |
Content-Type | string | This header specifies the format of the exchanges in JSON. |
RESPONSES
status: Created
{"id":"/procedures/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX","name":"How to use webhooks","description":"Description of my first procedure with webhooks","createdAt":"2018-12-05T07:42:38+01:00","updatedAt":"2018-12-05T07:42:38+01:00","finishedAt":null,"expiresAt":null,"status":"active","creator":null,"creatorFirstName":null,"creatorLastName":null,"workspace":"/workspaces/XXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX","template":false,"ordered":false,"parent":null,"metadata":[],"config":{"webhook":{"member.finished":[{"url":"https://YOUR_WEBHOOK_URL.com","method":"GET","headers":{"X-Custom-Header":"Yousign Webhook - Test value"}}]}},"members":[{"id":"/members/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX","user":null,"type":"signer","firstname":"John","lastname":"Doe","email":"john.doe@yousign.fr","phone":"+33612345678","position":1,"createdAt":"2018-12-05T07:42:38+01:00","updatedAt":"2018-12-05T07:42:38+01:00","finishedAt":null,"status":"pending","fileObjects":[{"id":"/file_objects/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX","file":{"id":"/files/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX","name":"The best name for my file.pdf","type":"signable","contentType":"application/pdf","description":null,"createdAt":"2018-12-05T07:42:25+01:00","updatedAt":"2018-12-05T07:42:39+01:00","sha256":"bb57ae2b2ca6ad0133a699350d1a6f6c8cdfde3cf872cf526585d306e4675cc2","metadata":[],"workspace":"/workspaces/XXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX","creator":null,"protected":false,"position":0,"parent":null},"page":2,"position":"191,497,507,603","fieldName":null,"mention":null,"mention2":null,"createdAt":"2018-12-05T07:42:38+01:00","updatedAt":"2018-12-05T07:42:38+01:00","parent":null,"reason":"Signed by Yousign"}],"comment":null,"notificationsEmail":[],"operationLevel":"custom","operationCustomModes":["sms"],"operationModeSmsConfig":null,"parent":null}],"subscribers":[],"files":[{"id":"/files/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX","name":"The best name for my file.pdf","type":"signable","contentType":"application/pdf","description":null,"createdAt":"2018-12-05T07:42:25+01:00","updatedAt":"2018-12-05T07:42:39+01:00","sha256":"bb57ae2b2ca6ad0133a699350d1a6f6c8cdfde3cf872cf526585d306e4675cc2","metadata":[],"workspace":"/workspaces/XXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX","creator":null,"protected":false,"position":0,"parent":null}],"relatedFilesEnable":false,"archive":false,"archiveMetadata":[],"fields":[],"permissions":[]}