Create a template from a draft envelope
Turns a draft envelope into a reusable template. Its signers become roles, its fields become template fields keyed by name, and its subject, message, signing order, and email verification become the template's defaults, so the request carries only which draft and what to call the result.
The draft is consumed. It is deleted and its document is re-labelled as a template's, which is why this costs envelopes:read as well as templates:write. Only a draft envelope can be converted; anything else, or a document already backing something, answers 409 document_in_use.
Send an Idempotency-Key. A retry without one cannot find the envelope the first attempt already consumed, and answers 404 instead of the template it made.
Request
- Base URL: https://inkseal.net/api/v1
- URL: https://inkseal.net/api/v1/templates/from-envelope
- Auth: HTTP bearer
Headers
Makes this mutation retry-safe. 1 to 255 printable ASCII characters (0x20 to 0x7e), trimmed before use. The key is scoped to the workspace and the credential that sent it. Reusing it with a different method, path, or payload answers 422 idempotency_key_reuse. A completed attempt replays its stored status and body with an Idempotent-Replay: true response header; 5xx, 429, and non-JSON answers leave the key retryable. A concurrent request holding the 90 second lease answers 409 idempotency_in_progress. Records are retained 24 hours.
Request body
Example request
{
"envelopeId": "Jd3kR8sVqW2nX5cY7bLmP",
"name": "Mutual NDA"
}Response
The created template. The draft envelope no longer exists.
Example response
{
"data": {
"fields": [
{
"type": "signature"
}
]
}
}Changes
No recorded changes to this operation across all 1 revision of this API.