Dashboard
APIGet Document Download | Subscription Bot API
api.botsubscription.com
GET/v1/endpoint
AuthenticationBearer
Token
Stays in this tab. Required for this endpoint — the value below is what gets sent.
Examples
curl --request GET \
  --url https://api.botsubscription.com/v1/endpoint \
  --header 'Authorization: Bearer sk_live_•••'

Get Document Download

Read documents for your Telegram subscription bot or Discord subscription bot project.

API key access: Unrestricted project key required. There is no issuable documents:read API-key scope. Restricted keys cannot call this endpoint.

Returns 200 application/json with document metadata and an optional download_url. It can still succeed when no link can be produced. This endpoint does not return PDF bytes or an HTTP redirect. The separate file URL's content type and redirects are not established by this API contract.

Document fields

Required, non-null fields: document_id (UUID string), kind (enum), filename (string, possibly empty), file_size (number of bytes), and created_at (UTC ISO datetime string).

kind is invoice, receipt, usage_report, credit_note, reverse_invoice, refund_note, or payout_statement.

Optional UUID-or-null fields: payment_request_id, invoice_id, project_id, and customer_id. project_name is an optional string-or-null. download_url is an optional URL string, never null; it is omitted when unavailable.

See document visibility rules for endpoint- and caller-specific denial behavior.

GET/v2/projects/{project_id}/documents/{document_id}/download

Authorization

Bearer API KeyRequired

Path Parameters

project_idstringrequired

Project UUID.

document_idstringrequired

Document UUID.

See API response formats and project API authentication.

Last updated: