List all documents

gethttps://api.telnyx.com/v2/documents

List all documents ordered by created_at descending.

curl -X GET \ --header "Content-Type: application/json" \ --header "Accept: application/json" \ --header "Authorization: Bearer YOUR_API_KEY" \ --globoff "https://api.telnyx.com/v2/documents?filter[filename][contains]=invoice&filter[customer_reference][eq]=MY REF 001"

Parameters

In Query
filter[filename][contains]
string
optional
Filter by string matching part of filename.
Example: "invoice"
filter[customer_reference][eq]
string
optional
Filter documents by a customer references.
Example: "MY REF 001"
filter[customer_reference][in][]
string
optional
Filter documents by a list of customer references.
Example: "MY REF 001"
filter[created_at][gt]
string
optional
Filter by created at greater than provided value.
Example: "2021-04-09T22:25:27.521Z"
filter[created_at][lt]
string
optional
Filter by created at less than provided value.
Example: "2021-04-09T22:25:27.521Z"
sort[]
string
optional
Specifies the sort order for results. If you want to sort by a field in ascending order, include it as a sort parameter. If you want to sort in descending order, prepend a `-` in front of the field name.
Example: "filename"Options: [ "filename", "created_at", "updated_at" ]
page[number]
integer
(1)
optional
The page number to load
Default:
1
page[size]
integer
(1 - 250)
optional
The size of the page
Default:
20

Responses

200
Successful response
default
Unexpected error

Success Response

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

...

posthttps://api.telnyx.com/v2/documents

...

...

Parameters

Responses

Success Response

...

gethttps://api.telnyx.com/v2/documents/{id}

...

...

Parameters

Responses

Success Response

...

patchhttps://api.telnyx.com/v2/documents/{id}

...

...

Parameters

Responses

Success Response

...

deletehttps://api.telnyx.com/v2/documents/{id}

...

...

Parameters

Responses

Success Response

...

gethttps://api.telnyx.com/v2/documents/{id}/download

...

...

Parameters

Responses

Success Response

...

gethttps://api.telnyx.com/v2/document_links

...

...

Parameters

Responses

Success Response

Previous:
Documents
Was this page helpful?