Skip to main content

Update a document

PATCH 
/documents/:id

Update a document.

Request

Path Parameters

    id uuidrequired

    Identifies the resource.

Body

    filename string

    The filename of the document.

    customer_reference string

    Optional reference string for customer tracking.

Responses

200: Successful response

Response Headers

    500: Unexpected error

    Response Headers

      Request samples


      curl -L -X PATCH 'https://api.telnyx.com/v2/documents/:id' \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer <TOKEN>' \
      -d '{
      "filename": [
      "test-document.pdf"
      ],
      "customer_reference": [
      "MY REF 001"
      ]
      }'

      Response samples


      {
      "data": {
      "id": [
      "6a09cdc3-8948-47f0-aa62-74ac943d6c58"
      ],
      "record_type": true,
      "created_at": [
      "2018-02-02T22:25:27.521Z"
      ],
      "updated_at": [
      "2018-02-02T22:25:27.521Z"
      ],
      "content_type": [
      "application/pdf"
      ],
      "size": {
      "unit": [
      "bytes"
      ],
      "amount": [
      123456
      ]
      },
      "status": [
      "pending"
      ],
      "sha256": [
      "08a96c641c3a74e44eb59afb61a24f2cb9f4d7188748e76ba4bb5edfa3cb7d1c"
      ],
      "filename": [
      "test-document.pdf"
      ],
      "customer_reference": [
      "MY REF 001"
      ]
      }
      }