Skip to main content

Create/Import Template (Docusign shape)

POST 

/restapi/v2.1/accounts/:accountId/templates

Imports a Docusign EnvelopeTemplate so existing template-setup code works after only a base-URL change. A template whose documents carry docGenFormFields is imported as a document-generation template and is afterwards referenced by the templateId in the request (usable in genAndConvertEnvelopes / genAndSendEnvelopes); any other template is imported as a standard e-signature template referenced by the returned templateId. Returns the Docusign Template export shape.

Requires the docgen.compat.docusign_gen flag for the calling org; when off the route returns 404.

Request

Responses

Existing template updated (idempotent re-import).

Response Headers
    X-Request-Id

    Correlation id for this request, returned on every response (success and error). Quote it when contacting support to pinpoint the exact request, and use it to correlate your own logs. It is the same 128-bit id as the trace-id segment of the traceparent header.

    traceparent

    W3C Trace Context identifier for this request, returned on every response. Send your own traceparent on a request to have it adopted, so a multi-call workflow shares one trace. Format: 00-<32-hex trace-id>-<16-hex span-id>-<2-hex flags>.