Signing Requests

Replace or rename a signing request document

Changed on

Send 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. A document placed with anchor tags is replaced only when the anchors of the replacement resolve exactly as stored; otherwise 400 ANCHOR_MISMATCH. A sent, finished, cancelled or declined signing request answers 409 DOCUMENT_SET_LOCKED.

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.

patch/signing-requests/{id}/documents/{document_id}

Request

Path parameters

idstring uuid required

Signing request ID

document_idstring uuid required

The document id (documents[].document_id)

Request body

document_idstring uuid

Temporary upload id from POST /documents: the replacement PDF.

labelstring nullable

The new display name (null clears it).

Response

Document replaced or renamed; the full document set after the change

documents_versioninteger required
documents_layout_versioninteger required

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 oneOf list for the response status

    • info

      removed subschema #2 from the response body allOf list for the response status

    • info

      endpoint added