List all documents
GET/documents
List all documents ordered by created_at descending.
Request
Query Parameters
Filter by string matching part of filename.
Filter documents by a customer references.
Filter documents by a list of customer references.
Filter by created at greater than provided value.
Filter by created at less than provided value.
Possible values: [filename
, created_at
, updated_at
]
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.
Possible values: >= 1
Default value: 1
The page number to load
Possible values: >= 1
and <= 250
Default value: 20
The size of the page
Responses
200: Successful response
Response Headers
- application/json
500: Unexpected error
Response Headers
- application/json
Request samples
curl -L 'https://api.telnyx.com/v2/documents' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>'
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"
]
}
],
"meta": {
"total_pages": [
3
],
"total_results": [
55
],
"page_number": [
2
],
"page_size": [
25
]
}
}
{
"errors": [
{
"code": "string",
"title": "string",
"detail": "string",
"source": {
"pointer": "string",
"parameter": "string"
},
"meta": {}
}
]
}