Replace or rename a template document
Changed onSend exactly one of document_id (replace the document with a temporary upload from POST /documents: the same number of pages, every page the same size within 1 pt) or label (rename). Both, or neither, answers 400 VALIDATION_ERROR.
Available to every company. This operation is part of the multi-document contract (API 01.39.00). For a signing request or template the API key cannot see, it answers 404 with code NOT_FOUND ("Endpoint not found"), exactly as an unknown endpoint does. While multi-document editing is suspended, this operation returns 409 MULTI_DOCUMENT_READ_ONLY for parents on the multi-document read-only path and 404 NOT_FOUND for parents on the single-document path.
Request
- Base URLhttps://api.firma.dev/functions/v1/signing-request-api
- AuthAPI key in header Authorization
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Path parameters
Template ID
The document id (documents[].document_id)
Request body
Response
Document replaced or renamed; the full document set after the change
Example response
{
"documents": [
{
"document_id": null,
"position": 1,
"label": null,
"original_filename": null,
"page_count": 3,
"document_url": "https://api.firma.dev/storage/v1/object/sign/signing-request-documents/example.pdf?token=example",
"document_url_kind": "stored",
"document_only_hash": null
}
]
}Changes
- breaking
added to the response body
oneOflist for the response status - info
removed
subschema #2from the response bodyallOflist for the response status
- breaking
- info
endpoint added
- info