Documents

Save as a template

POST
/v1/workspaces/{workspace_id}/envelopes/{envelope_id}/save-as-template

A template from the envelope, as the web app's Save as template makes one: its documents, roles, fields and route, yours alone (personal) or the workspace's (shared, for those who may publish templates). It starts as a draft for its author to finish in the web app. Send an Idempotency-Key: the same key returns the same answer for 24 hours.

Authorization

bearer
headerAuthorizationBearer <token>

An access token from /v1/auth/token, or a personal token: opaque, beginning s2a_.

Path Parameters

workspace_id*string

wsp_…, from GET /v1/me

Lengthlength <= 40
envelope_id*string

env_…

Lengthlength <= 40

Header Parameters

idempotency-key*string

A UUID of your own (ADR 0071 §5)

Match^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Formatuuid

Request Body

application/json
  1. body
name*string
Length1 <= length <= 200
scope?string

personal when left out

Value in"personal""shared"

Response Body

Saved

application/json
  1. response

Saved

template_id*string

tpl_…

web_url*string
curl -X POST 'https://api.sign2approve.com/v1/workspaces/string/envelopes/string/save-as-template' \  -H 'idempotency-key: 497f6eca-6276-4993-bfeb-53cbbbba6f08' \  -H 'Content-Type: application/json' \  -d '{  "name": "string"}'
{  "template_id": "tpl_01a16d3fd3507be78e41c4540aa20a3c",  "web_url": "https://app.example.test/w/larkspur/envelopes/01a16d3f-d350-7be7-8e41-c4540aa20a3c/review"}