Telnyx Documents API
Documents
Operations 8
Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay
Documents
Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/telnyx:telnyx-documents-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Telnyx Documents API
version: 2.0.0
contact:
email: support@telnyx.com
x-endpoint-cost: light
x-refined-note:
- x-latency-category differs across the merged source definitions and was not carried
description: 'Operations tagged Documents across 3 of this provider''s published API definitions: telnyx-openapi.json, telnyx-openapi.yml, telnyx-openapi_2.json. Each path carries the servers of the definition it was published in.'
servers:
- url: https://api.telnyx.com/v2
description: Version 2.0.0 of the Telnyx API
security:
- bearerAuth: []
tags:
- name: Documents
description: Documents
paths:
/document_links:
get:
summary: List all document links
description: List all documents links ordered by created_at descending.
operationId: ListDocumentLinks
x-latency-category: responsive
tags:
- Documents
parameters:
- $ref: '#/components/parameters/FilterDocumentLinksConsolidated'
- $ref: '#/components/parameters/documents_PageConsolidated'
responses:
'200':
description: Successful response
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/DocServiceDocumentLink'
meta:
$ref: '#/components/schemas/PaginationMeta'
'422':
description: Unprocessable entity. Check the 'detail' field in response for details.
content:
application/json:
schema:
$ref: '#/components/schemas/Errors'
example:
errors:
- code: '10027'
title: Unprocessable Entity
detail: The server understood the syntax of the request but was unable to process the instructions.
default:
$ref: '#/components/responses/documents_GenericErrorResponse'
servers:
- url: https://api.telnyx.com/v2
description: Version 2.0.0 of the Telnyx API
/documents:
get:
summary: List all documents
description: List all documents ordered by created_at descending.
operationId: ListDocuments
x-latency-category: responsive
tags:
- Documents
parameters:
- $ref: '#/components/parameters/FilterDocumentsConsolidated'
- $ref: '#/components/parameters/SortDocumentsConsolidated'
- $ref: '#/components/parameters/documents_PageConsolidated'
responses:
'200':
description: Successful response
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/DocServiceDocument'
meta:
$ref: '#/components/schemas/PaginationMeta'
'422':
description: Unprocessable entity. Check the 'detail' field in response for details.
content:
application/json:
schema:
$ref: '#/components/schemas/Errors'
example:
errors:
- code: '10027'
title: Unprocessable Entity
detail: The server understood the syntax of the request but was unable to process the instructions.
default:
$ref: '#/components/responses/documents_GenericErrorResponse'
post:
summary: Upload a document
description: 'Upload a document.
Uploaded files must be linked to a service within 30 minutes or they will be automatically deleted.'
operationId: CreateDocument
x-latency-category: responsive
tags:
- Documents
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CreateDocServiceDocumentRequest'
multipart/form-data:
schema:
$ref: '#/components/schemas/CreateMultiPartDocServiceDocumentRequest'
required: true
responses:
'200':
description: Successful response
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/DocServiceDocument'
'422':
$ref: '#/components/responses/UnprocessableEntity'
default:
$ref: '#/components/responses/documents_GenericErrorResponse'
servers:
- url: https://api.telnyx.com/v2
description: Version 2.0.0 of the Telnyx API
/documents/{id}:
delete:
summary: Delete a document
description: 'Delete a document.
A document can only be deleted if it''s not linked to a service. If it is linked to a service, it must be unlinked prior to deleting.'
operationId: DeleteDocument
x-latency-category: responsive
tags:
- Documents
parameters:
- $ref: '#/components/parameters/Id'
responses:
'200':
description: Successful response
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/DocServiceDocument'
'422':
description: Unprocessable entity. Check the 'detail' field in response for details.
content:
application/json:
schema:
$ref: '#/components/schemas/Errors'
example:
errors:
- code: '10027'
title: Unprocessable Entity
detail: The server understood the syntax of the request but was unable to process the instructions.
default:
$ref: '#/components/responses/documents_GenericErrorResponse'
get:
summary: Retrieve a document
description: Returns the details of a single document on your account, including its metadata.
operationId: RetrieveDocument
x-latency-category: responsive
tags:
- Documents
parameters:
- $ref: '#/components/parameters/Id'
responses:
'200':
description: Successful response
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/DocServiceDocument'
'422':
description: Unprocessable entity. Check the 'detail' field in response for details.
content:
application/json:
schema:
$ref: '#/components/schemas/Errors'
example:
errors:
- code: '10027'
title: Unprocessable Entity
detail: The server understood the syntax of the request but was unable to process the instructions.
default:
$ref: '#/components/responses/documents_GenericErrorResponse'
patch:
summary: Update a document
description: Updates the specified document's attributes and returns the updated document.
operationId: UpdateDocument
x-latency-category: responsive
tags:
- Documents
parameters:
- $ref: '#/components/parameters/Id'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DocServiceDocument'
required: true
responses:
'200':
description: Successful response
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/DocServiceDocument'
'422':
description: Unprocessable entity. Check the 'detail' field in response for details.
content:
application/json:
schema:
$ref: '#/components/schemas/Errors'
example:
errors:
- code: '10027'
title: Unprocessable Entity
detail: The server understood the syntax of the request but was unable to process the instructions.
default:
$ref: '#/components/responses/documents_GenericErrorResponse'
servers:
- url: https://api.telnyx.com/v2
description: Version 2.0.0 of the Telnyx API
/documents/{id}/download:
get:
summary: Download a document
description: Downloads the raw file content of the specified document as originally uploaded.
operationId: DownloadDocument
x-latency-category: responsive
tags:
- Documents
parameters:
- $ref: '#/components/parameters/Id'
responses:
'200':
description: Successful response
content:
'*':
schema:
type: string
format: binary
example: string
'422':
description: Unprocessable entity. Check the 'detail' field in response for details.
content:
application/json:
schema:
$ref: '#/components/schemas/Errors'
example:
errors:
- code: '10027'
title: Unprocessable Entity
detail: The server understood the syntax of the request but was unable to process the instructions.
default:
$ref: '#/components/responses/documents_GenericErrorResponse'
servers:
- url: https://api.telnyx.com/v2
description: Version 2.0.0 of the Telnyx API
/documents/{id}/download_link:
get:
summary: Generate a temporary download link for a document
description: Generates a temporary pre-signed URL that can be used to download the document directly from the storage backend without authentication.
operationId: getDocumentDownloadLink
x-latency-category: responsive
tags:
- Documents
parameters:
- name: id
in: path
required: true
description: Uniquely identifies the document
schema:
type: string
format: uuid
example: 550e8400-e29b-41d4-a716-446655440000
responses:
'200':
description: Successfully generated download link
content:
application/json:
schema:
type: object
required:
- data
properties:
data:
type: object
required:
- url
properties:
url:
type: string
format: uri
description: Pre-signed temporary URL for downloading the document
example: https://s3.amazonaws.com/bucket/path/to/document?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=...
'404':
$ref: '#/components/responses/ResourceNotFound'
'422':
$ref: '#/components/responses/UnprocessableEntity'
default:
$ref: '#/components/responses/documents_GenericErrorResponse'
servers:
- url: https://api.telnyx.com/v2
description: Version 2.0.0 of the Telnyx API
components:
schemas:
DocServiceRecord:
type: object
properties:
id:
type: string
format: uuid
description: Identifies the resource.
readOnly: true
example: 6a09cdc3-8948-47f0-aa62-74ac943d6c58
record_type:
type: string
description: Identifies the type of the resource.
readOnly: true
example: sample_record_type
created_at:
type: string
description: ISO 8601 formatted date-time indicating when the resource was created.
readOnly: true
example: '2018-02-02T22:25:27.521Z'
updated_at:
type: string
description: ISO 8601 formatted date-time indicating when the resource was updated.
readOnly: true
example: '2018-02-02T22:25:27.521Z'
CreateMultiPartDocServiceDocumentRequest:
type: object
properties:
file:
description: The file you are uploading.
type: string
format: binary
customer_reference:
type: string
description: Optional reference string for customer tracking.
example: MY REF 001
DocServiceDocument:
allOf:
- $ref: '#/components/schemas/DocServiceRecord'
- type: object
properties:
record_type:
description: Identifies the type of the resource.
type: string
readOnly: true
example: document
content_type:
description: The document's content_type.
type: string
readOnly: true
example: application/pdf
size:
description: Indicates the document's filesize
type: object
readOnly: true
properties:
unit:
description: Identifies the unit
type: string
readOnly: true
example: bytes
amount:
description: The number of bytes
type: integer
readOnly: true
example: 123456
status:
type: string
description: Indicates the current document reviewing status
readOnly: true
enum:
- pending
- verified
- denied
example: pending
sha256:
description: The document's SHA256 hash provided for optional verification purposes.
type: string
readOnly: true
example: 08a96c641c3a74e44eb59afb61a24f2cb9f4d7188748e76ba4bb5edfa3cb7d1c
filename:
description: The filename of the document.
type: string
example: test-document.pdf
customer_reference:
type: string
description: Optional reference string for customer tracking.
example: MY REF 001
av_scan_status:
type: string
description: The antivirus scan status of the document.
readOnly: true
enum:
- scanned
- infected
- pending_scan
- not_scanned
example: scanned
DocServiceDocumentLink:
allOf:
- $ref: '#/components/schemas/DocServiceRecord'
- type: object
properties:
record_type:
description: Identifies the type of the resource.
type: string
readOnly: true
example: document_link
document_id:
description: Identifies the associated document.
type: string
format: uuid
readOnly: true
example: 6a09cdc3-8948-47f0-aa62-74ac943d6c58
linked_record_type:
description: The linked resource's record type.
type: string
readOnly: true
example: porting_order
linked_resource_id:
description: Identifies the linked resource.
type: string
readOnly: true
example: 132091b4-442b-4a2a-b87f-61e707e46d54
Errors:
properties:
errors:
type: array
items:
$ref: '#/components/schemas/billing-group_Error'
type: object
CreateDocServiceDocumentRequest:
type: object
properties:
url:
description: If the file is already hosted publicly, you can provide a URL and have the documents service fetch it for you.
type: string
example: https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf
file:
description: Alternatively, instead of the URL you can provide the Base64 encoded contents of the file you are uploading.
type: string
format: byte
example: ZXhhbXBsZSBvZiBlbmNvZGVkIGNvbnRlbnQ=
filename:
description: The filename of the document.
type: string
example: test-document.pdf
customer_reference:
type: string
description: A customer reference string for customer look ups.
example: MY REF 001
documents_Error:
required:
- code
- title
properties:
code:
type: string
title:
type: string
detail:
type: string
source:
type: object
properties:
pointer:
description: JSON pointer (RFC6901) to the offending entity.
type: string
parameter:
description: Indicates which query parameter caused the error.
type: string
meta:
type: object
additionalProperties: true
type: object
billing-group_Error:
type: object
required:
- code
- title
properties:
code:
type: integer
format: int32
title:
type: string
detail:
type: string
source:
type: object
properties:
pointer:
description: JSON pointer (RFC6901) to the offending entity.
type: string
parameter:
description: Indicates which query parameter caused the error.
type: string
meta:
type: object
properties: {}
additionalProperties: true
PaginationMeta:
type: object
properties:
total_pages:
type: integer
example: 3
total_results:
type: integer
example: 55
page_number:
type: integer
example: 2
page_size:
type: integer
example: 25
documents_Errors:
properties:
errors:
items:
$ref: '#/components/schemas/documents_Error'
type: array
type: object
Errors_2:
properties:
errors:
type: array
items:
$ref: '#/components/schemas/Error'
type: object
Error:
required:
- code
- title
properties:
code:
type: string
x-format: int64
title:
type: string
detail:
type: string
description: A human-readable explanation of the error.
description:
type: string
source:
type: object
properties:
pointer:
description: JSON pointer (RFC6901) to the offending entity.
type: string
format: json-pointer
parameter:
description: Indicates which query parameter caused the error.
type: string
meta:
type: object
additionalProperties: true
example:
title: Invalid street address
source:
pointer: /street_address
code: '20207'
description: The street address provided is invalid.
type: object
parameters:
FilterDocumentLinksConsolidated:
name: filter
in: query
style: deepObject
explode: true
required: false
description: 'Consolidated filter parameter for document links (deepObject style). Originally: filter[linked_record_type], filter[linked_resource_id]'
schema:
type: object
additionalProperties: false
properties:
linked_record_type:
type: string
example: porting_order
description: The linked_record_type of the document to filter on.
linked_resource_id:
type: string
format: uuid
example: 6a09cdc3-8948-47f0-aa62-74ac943d6c58
description: The linked_resource_id of the document to filter on.
SortDocumentsConsolidated:
name: sort
in: query
required: false
description: 'Consolidated sort parameter for documents (deepObject style). Originally: sort[]'
schema:
type: array
items:
type: string
enum:
- filename
- created_at
- updated_at
- -filename
- -created_at
- -updated_at
example:
- filename
description: 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.
Id:
name: id
description: Identifies the resource.
in: path
required: true
schema:
format: uuid
type: string
example: 6a09cdc3-8948-47f0-aa62-74ac943d6c58
documents_PageConsolidated:
name: page
in: query
style: deepObject
explode: true
description: 'Consolidated page parameter (deepObject style). Originally: page[size], page[number]'
schema:
type: object
properties:
size:
type: integer
minimum: 1
maximum: 250
default: 20
description: The size of the page
number:
type: integer
minimum: 1
default: 1
description: The page number to load
FilterDocumentsConsolidated:
name: filter
in: query
style: deepObject
explode: true
required: false
description: 'Consolidated filter parameter for documents (deepObject style). Originally: filter[filename][contains], filter[customer_reference][eq], filter[customer_reference][in][], filter[created_at][gt], filter[created_at][lt]'
schema:
type: object
additionalProperties: false
properties:
filename:
type: object
additionalProperties: false
properties:
contains:
type: string
example: invoice
description: Filter by string matching part of filename.
customer_reference:
type: object
additionalProperties: false
properties:
eq:
type: string
example: MY REF 001
description: Filter documents by a customer reference.
in:
type: array
items:
type: string
example:
- MY REF 001
- MY REF 002
description: Filter documents by a list of customer references.
created_at:
type: object
additionalProperties: false
properties:
gt:
type: string
format: date-time
example: '2021-04-09T22:25:27.521Z'
description: Filter by created at greater than provided value.
lt:
type: string
format: date-time
example: '2021-04-09T22:25:27.521Z'
description: Filter by created at less than provided value.
example:
filename:
contains: invoice
customer_reference:
in:
- REF001
- REF002
created_at:
gt: '2021-01-01T00:00:00Z'
responses:
ResourceNotFound:
description: Resource not found
content:
application/json:
schema:
$ref: '#/components/schemas/documents_Error'
UnprocessableEntity:
description: Unprocessable entity. Check the 'detail' field in response for details.
content:
application/json:
schema:
$ref: '#/components/schemas/Errors'
example:
errors:
- code: '10027'
title: Unprocessable Entity
detail: The server understood the syntax of the request but was unable to process the instructions.
documents_GenericErrorResponse:
description: Unexpected error
content:
application/json:
schema:
$ref: '#/components/schemas/Errors'
example:
errors:
- code: '10007'
title: Unexpected error
detail: An unexpected error occured.
ListDocServiceDocumentLinksResponse:
content:
application/json:
schema:
properties:
data:
items:
$ref: '#/components/schemas/DocServiceDocumentLink'
type: array
meta:
$ref: '#/components/schemas/PaginationMeta'
type: object
description: Successful response
documents_UnprocessableEntity:
content:
application/json:
schema:
$ref: '#/components/schemas/documents_Errors'
description: Unprocessable entity. Check the 'detail' field in response for details.
DownloadDocServiceDocumentResponse:
content:
'*':
schema:
format: binary
type: string
description: Successful response
documents_GenericErrorResponse_2:
content:
application/json:
schema:
$ref: '#/components/schemas/documents_Errors'
description: Unexpected error
DocServiceDocumentResponse:
content:
application/json:
schema:
properties:
data:
$ref: '#/components/schemas/DocServiceDocument'
type: object
description: Successful response
ListDocServiceDocumentsResponse:
content:
application/json:
schema:
properties:
data:
items:
$ref: '#/components/schemas/DocServiceDocument'
type: array
meta:
$ref: '#/components/schemas/PaginationMeta'
type: object
description: Successful response
documents_UnprocessableEntity_2:
description: Unprocessable entity. Check the 'detail' field in response for details.
content:
application/json:
schema:
$ref: '#/components/schemas/Errors_2'
example:
errors:
- code: '10027'
title: Unprocessable Entity
detail: The server understood the syntax of the request but was unable to process the instructions.
securitySchemes:
BearerAuth:
type: http
scheme: bearer
bearerFormat: API key
description: 'Telnyx API key supplied as `Authorization: Bearer <token>`. In production, auth may be validated by the API gateway and forwarded via Telnyx auth headers.'
Payment:
type: apiKey
in: header
name: Authorization
description: 'Machine Payment Protocol credential used on paid retries, sent as `Authorization: Payment ...`. Obtained by paying a challenge returned in the `WWW-Authenticate` header of a 402 response. This is not a Telnyx API key; initial challenge requests use standard bearer authentication instead.'
agent-memory_bearerAuth:
type: http
scheme: bearer
description: Telnyx API key
bearerAuth:
type: http
scheme: bearer
branded-calling_bearerAuth:
type: http
scheme: bearer
description: Telnyx API key. Generate one at https://portal.telnyx.com/#/app/api-keys.
collections_bearerAuth:
type: http
scheme: bearer
description: Telnyx API key. Collections and results are automatically scoped to the authenticated user's organization.
number-reputation_bearerAuth:
type: http
scheme: bearer
description: Telnyx API key. Generate one at https://portal.telnyx.com/#/app/api-keys.
oauthClientAuth:
type: oauth2
flows:
clientCredentials:
tokenUrl: https://api.telnyx.com/v2/oauth/token
scopes:
admin: Administrative access to Telnyx resources
authorizationCode:
authorizationUrl: https://api.telnyx.com/v2/oauth/authorize
tokenUrl: https://api.telnyx.com/v2/oauth/token
refreshUrl: https://api.telnyx.com/v2/oauth/token
scopes:
admin: Administrative access to Telnyx resources
description: OAuth 2.0 authentication for Telnyx API and MCP integrations
outbound-voice-profiles_bearerAuth:
type: http
scheme: bearer
bearerFormat: JWT
pronunciation-dicts_bearerAuth:
type: http
scheme: bearer
description: Telnyx API v2 key. Obtain from https://portal.telnyx.com
rcs-registration_bearerAuth:
type: http
scheme: bearer
bearerFormat: API key
stored-payment-transactions_bearerAuth:
type: http
scheme: bearer
bearerFormat: JWT
transcriptions-search_bearerAuth:
type: http
scheme: bearer
description: Telnyx API key. Results are automatically scoped to the authenticated user's organization.
web-search_bearerAuth:
type: http
scheme: bearer
description: Telnyx API key
pay-connectors_bearerAuth:
type: http
scheme: bearer
description: Telnyx API key, not the processor bearer token.
telnyxApiKey:
type: http
scheme: bearer
description: Management-only Telnyx account credential.
x-refined-from:
- telnyx-openapi.json
- telnyx-openapi.yml
- telnyx-openapi_2.json
x-service-info:
categories:
- communication
- developer-tools
docs:
apiReference: https://developers.telnyx.com
homepage: https://telnyx.com
llms: https://telnyx.com/llms.txt