Documents

Rename document

Update a document's name. Only allowed before any assignment is created (i.e. while the document is in uploaded or metadata_ready status and has no signers yet); once the signature process has started or the document is certificated, the name is locked. The name is normalized: diacritics are removed and unsupported characters are replaced with dashes.

Copy as Markdown Open in ChatGPT Open in Claude

patch/v1/documents/{documentId}

Path parameters

documentIdstring required

Document ID.

Request body

namestring required

Example request

{
  "name": "Service agreement.pdf"
}

Response

The updated document

statusinteger

HTTP status code, mirrored in the body.

messagestring

Human-readable message; empty on success.

Example response

{
  "status": 200,
  "data": {
    "resource": "document",
    "id": "615601fab04c0a3147bb1246",
    "account_id": "d199996981dbd199996981db",
    "name": "document.pdf",
    "status": "metadata_ready",
    "artifacts": {
      "original": "https://api.assinafy.com.br/v1/documents/doc1/download/original"
    },
    "signing_url": "https://api.assinafy.com.br/v1/sign/doc1",
    "declined_by": {
      "resource": "signer",
      "id": "62d6ee35c7741ca4006b9e11",
      "full_name": "John Signer",
      "email": "john@email.com",
      "whatsapp_phone_number": "+5548999990000"
    },
    "assignment": {
      "resource": "assignment",
      "id": "615606ef81d199996981dbce",
      "sender_email": "sender@example.com",
      "method": "virtual",
      "signers": [
        {
          "resource": "signer",
          "id": "62d6ee35c7741ca4006b9e11",
          "full_name": "John Signer",
          "email": "john@email.com",
          "whatsapp_phone_number": "+5548999990000",
          "verification_method": "Email",
          "notification_methods": [
            "Email"
          ],
          "step": 1,
          "notification_history": [
            {
              "event": "signature_request",
              "status": "sent",
              "sent_at": "2026-07-07T12:00:00Z"
            }
          ]
        }
      ],
      "items": [
        {
          "page": {
            "id": "615601faf166d6d1d8e7dc30",
            "number": 1,
            "height": 2100,
            "width": 1275,
            "download_url": "https://api.assinafy.com.br/v1/documents/doc1/pages/1a/download"
          }
        }
      ],
      "signing_urls": [
        {
          "url": "https://api.assinafy.com.br/v1/sign/doc1?email=joe@example.com"
        }
      ]
    },
    "pages": [
      {
        "id": "615601faf166d6d1d8e7dc30",
        "number": 1,
        "height": 2100,
        "width": 1275,
        "download_url": "https://api.assinafy.com.br/v1/documents/doc1/pages/1a/download"
      }
    ],
    "created_at": "2026-06-03T03:54:16Z",
    "updated_at": "2026-06-03T03:54:16Z"
  }
}

Changes

No recorded changes to this endpoint across all 1 revision of this API.