/procedures
POST {{base-api-url}}/procedures
Now that the file is uploaded, send the following request to create a procedure.
It's important to underline that email addresses need to have an existing domain. In addition, the phone numbers need to be valid numbers and follow the E.164 recommendation.
The status field for a procedure can have many values:
| Status | Description |
|---|---|
| draft | The signing process is not started, so no one can sign it. However, it is still possible to edit the procedure. |
| active | The procedure is started, members can sign it. |
| finished | All members have finished to sign the procedure. |
| expired | You can set an expiration date in the expiresAt field (in ISO format like the createdAt field above - e.g. 2018-08-05T07:46:45+02:00). After this date, members can't sign it anymore. |
| refused | At least, one of members decided to refuse the procedure. It mainly means that he did not agree with the content of the documents to sign or maybe it is not the right contact to make on this signature. |
Request Body
{"name"=>"My first template", "description"=>"Awesome! Here is the description of my first template", "template"=>true, "ordered"=>true, "members"=>[{"firstname"=>"First name to replace later", "lastname"=>"Last name to replace later", "email"=>"Valid email address but fake it to replace later (name@yousign.fr)", "phone"=>"Valid phone number but fake it to replace later (+33612345678)", "position"=>1, "fileObjects"=>[{"file"=>"/files/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX", "page"=>2, "position"=>"230,499,464,589", "mention"=>"Read and approved", "mention2"=>"Signed by John Doe"}]}, {"user"=>"/users/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX", "position"=>2, "fileObjects"=>[{"file"=>"/files/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX", "position"=>"387,511,489,591", "mention"=>"Read and approved"}]}]}
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":"My first template","description":"Awesome! Here is the description of my first template","createdAt":"2018-12-03T07:49:18+01:00","updatedAt":"2018-12-03T07:49:18+01:00","finishedAt":null,"expiresAt":null,"status":"active","creator":null,"creatorFirstName":null,"creatorLastName":null,"workspace":"/workspaces/XXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX","template":true,"ordered":true,"parent":null,"metadata":[],"config":[],"members":[{"id":"/members/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX","user":null,"type":"signer","firstname":"First name to replace later","lastname":"Last name to replace later","email":"name@yousign.fr","phone":"+33612345678","position":1,"createdAt":"2018-12-03T07:49:18+01:00","updatedAt":"2018-12-03T07:49:18+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-03T07:47:51+01:00","updatedAt":"2018-12-03T07:49:18+01:00","sha256":"bb57ae2b2ca6ad0133a699350d1a6f6c8cdfde3cf872cf526585d306e4675cc2","metadata":[],"workspace":"/workspaces/XXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX","creator":null,"protected":false,"position":0,"parent":null},"page":2,"position":"230,499,464,589","fieldName":null,"mention":"Read and approved","mention2":"Signed by John Doe","createdAt":"2018-12-03T07:49:18+01:00","updatedAt":"2018-12-03T07:49:18+01:00","parent":null,"reason":"Signed by Yousign"}],"comment":null,"notificationsEmail":[],"operationLevel":"custom","operationCustomModes":["sms"],"operationModeSmsConfig":null,"parent":null},{"id":"/members/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX","user":"/users/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX","type":"signer","firstname":"John","lastname":"Doe","email":"support@yousign.fr","phone":"+33184880289","position":2,"createdAt":"2018-12-03T07:49:18+01:00","updatedAt":"2018-12-03T07:49:18+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-03T07:47:51+01:00","updatedAt":"2018-12-03T07:49:18+01:00","sha256":"bb57ae2b2ca6ad0133a699350d1a6f6c8cdfde3cf872cf526585d306e4675cc2","metadata":[],"workspace":"/workspaces/XXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX","creator":null,"protected":false,"position":0,"parent":null},"page":0,"position":"387,511,489,591","fieldName":null,"mention":"Read and approved","mention2":null,"createdAt":"2018-12-03T07:49:18+01:00","updatedAt":"2018-12-03T07:49:18+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-03T07:47:51+01:00","updatedAt":"2018-12-03T07:49:18+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":[]}