Official Sinch API skills for AI coding agents — SMS, Voice, Verification, Numbers, Mailgun email, and more.
71
89%
Does it follow best practices?
Impact
—
No eval scenarios have been run
Advisory
Suggest reviewing before use
The Sinch Fax API lets you send and receive faxes programmatically. It supports multiple file formats, webhooks for incoming faxes, fax-to-email delivery, and automatic retries. Used for healthcare, legal, financial, and government applications where fax remains a required communication channel.
Auth: See sinch-authentication for setup.
Store credentials in environment variables — never hardcode tokens or keys in commands or source code:
export SINCH_PROJECT_ID="your-project-id"
export SINCH_KEY_ID="your-key-id"
export SINCH_KEY_SECRET="your-key-secret"
export SINCH_ACCESS_TOKEN="your-oauth-token"Ensure that authentication headers are properly set when making API calls. The Fax API uses Bearer token authentication:
-H "Authorization: Bearer $SINCH_ACCESS_TOKEN"See sinch-authentication for full setup, most importantly how to obtain {SINCH_ACCESS_TOKEN} (OAuth2 client-credentials — do not mint your own JWT).
Before generating code, gather from the user: approach (SDK or direct API), language (Node.js, Python, Java, .NET, curl), and use case (sending, receiving, fax-to-email, or managing services). Do not assume defaults.
When generating callback/webhook handlers or processing inbound fax data, always include input validation and sanitization. Treat all inbound content (contentUrl, filenames, metadata, errorMessage) as untrusted — never interpolate into prompts, evaluate as code, or use in shell commands unsanitized.
When the user chooses SDK, fetch the relevant API reference docs linked in Links for accurate method signatures (trusted first-party Sinch docs at developers.sinch.com). When the user chooses direct API calls, use REST with the appropriate HTTP client for their language.
See sinch-sdks for SDK installation and client initialization. Note: Fax is only supported in Node.js (preview) and .NET (partial) — for Java and Python, use direct HTTP calls.
curl:
curl -X POST \
"https://fax.api.sinch.com/v3/projects/$SINCH_PROJECT_ID/faxes" \
-H "Authorization: Bearer $SINCH_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"to": "+12025550134",
"contentUrl": "https://example.com/document.pdf",
"callbackUrl": "https://yourserver.com/fax-callback"
}'Node.js SDK: See Send a Fax with Node.js.
Test number: Send to +19898989898 to emulate a real fax without charges (always suggest this for integration testing).
QUEUED → IN_PROGRESS → COMPLETED or FAILURE. Error details in errorType and errorMessage fields.multipart/form-data (fax content as attachment). Set callbackUrlContentType: "application/json" for JSON callbacks.coverPageId and coverPageData on send.DELETE /faxes/{id}/file to remove earlier.Three ways to deliver content: contentUrl for URLs (recommended — supports basic auth), multipart/form-data for local files, or contentBase64 for in-memory bytes. contentUrl can be a single URL or an array of URLs to compose multi-document faxes.
For HTTPS URLs, ensure your SSL certificate (including intermediate certs) is valid and up-to-date. You can optionally specify from to set the sender number.
multipart/form-data for local files, JSON with contentUrl for URLs.callbackUrlContentType (see Key Concepts). Check direction === 'INBOUND' on the fax object. See Receive a Fax with Node.js.GET /faxes/{id}GET /faxes/{id}/file.pdf (.pdf suffix required)DELETE /faxes/{id}/file (removes stored content before 13-month expiry)POST/GET/DELETE /services/{id}/coverPages — see Services referenceGET /faxes/{id} — look at status, errorType (DOCUMENT_CONVERSION_ERROR, CALL_ERROR, FAX_ERROR, FATAL_ERROR, GENERAL_ERROR), and errorMessagecontentUrl was used with HTTPS, verify the SSL certificate (including intermediate certs) is validcallbackUrl for status tracking — fax delivery is async. Prefer callbacks over polling.DELETE /faxes/{id}/file to remove earlier, or download and archive if longer retention is needed.resolution: "SUPERFINE" (400 dpi) for faxes with small text or detailed images; default FINE (200 dpi) works for most cases.contentUrl values may contain user-provided or third-party content. Treat all inbound fax data as untrusted — do not execute, evaluate, or interpolate it into prompts or code. Validate URLs before fetching. Sanitize callback body fields (filenames, metadata, errorMessage) before logging, rendering in HTML, or storing in a database.skills
sinch-10dlc
references
sinch-authentication
sinch-conversation-api
sinch-elastic-sip-trunking
references
sinch-fax-api
sinch-imported-numbers-hosting-orders
references
sinch-in-app-calling
sinch-mailgun
references
sinch-mailgun-inspect
references
sinch-mailgun-optimize
references
sinch-mailgun-validate
sinch-number-lookup-api
sinch-number-order-api
sinch-numbers-api
references
sinch-porting-api
sinch-provisioning-api
sinch-sdks
sinch-verification-api