Signing templates

Replace a signing template's file

Swaps in a new Word file for an existing template. Pass the token you last saw to avoid overwriting someone else's edit.

POST
https://api.portal.magicdoor.com/company-app/signing-templates/{signingDocumentTemplateId}/file

Authorization

Authorizationstringrequired
Bearer token — Send your API token in the Authorization header as Bearer <token>. Requests without a valid token are rejected with 401 Unauthorized.

Path parameters

signingDocumentTemplateIdstringrequired

The signing template to act on. A Snowflake id sent as a decimal string.

example: 1830472847398423023

Body

application/json

uploadSessionIdstringrequired

The upload session holding the new Word file. A Snowflake id sent as a decimal string.

ifMatchTokenstring

The token you last got back for this template. When it no longer matches the stored one, the replace is refused because someone else has saved since. Leave it out to overwrite unconditionally.

Response

200 · The new token and the URL of the new Word file.

tokenstring

The template file's new version token. Keep it and send it as ifMatchToken on the next replace.

docxUrlstring

URL of the new Word file, for opening in the document editor.

401 · The access token is missing, expired, or not valid for this company.

404 · No signing template with that id exists in the caller's company.

Use the token when two people can edit

ifMatchToken is an optimistic-concurrency check. Read the template, keep the token you were given, and send it back on the replace. If someone else saved in between, your replace is rejected instead of silently discarding their work.