Send and manage faxes via the Sinch Fax API.
Commands that need a fax service use --service-id, then the configured default, then an API lookup. The lookup uses your only fax service, or asks which one if you have several (without prompts, the command fails). To set defaults:
sinch config set fax serviceID=<your-service-id>
sinch config set fax senderNumber=+15551234567 # optional default senderSend a fax from a file or URL.
sinch fax send [options]| Option | Description |
|---|---|
--to <number> | Recipient fax number in E.164 format. Repeatable for several recipients |
--file <path> | Local file to send (PDF, TIF, TIFF, DOC, DOCX, TXT, HTML, HTM, JPG, PNG; CLI max 20 MB). Repeatable |
--content-url <url> | URL of the content to send. Repeatable |
--from <number> | Sender fax number. Falls back to config, then the service default |
--service-id <id> | Fax service ID. Falls back to config, then an API lookup |
--header-text <text> | Text at the top of each page (50 characters max) |
--header-page-numbers / --no-header-page-numbers | Include or leave out page numbers in the header |
--header-timezone <tz> | TZ database name for the header timestamp |
--resolution <resolution> | FINE or SUPERFINE |
--max-retries <n> | Number of retries (0-5) |
--retry-delay <seconds> | Delay between retries, in seconds |
--callback-url <url> | Webhook URL for the completion notification |
--callback-content-type <type> | multipart/form-data or application/json |
--image-conversion <method> | HALFTONE or MONOCHROME |
--label <key=value> | Metadata label. Repeatable |
--cover-page-id <id> | Cover page ID |
--cover-data <key=value> | Cover page data. Repeatable |
--progress-notifications / --no-progress-notifications | Turn progress notifications on or off |
--all | Also prompt for header text, resolution, retries, callback URL, image conversion. Interactive only |
--non-interactive | Skip prompts; fail if required options are missing |
--wait | Wait for each fax to finish before exiting, up to 300 seconds per fax |
--json | Output as JSON |
If --to and content are omitted, the command prompts interactively.
The CLI rejects local files over 20 MB before sending. This is a CLI check, not a Sinch Fax API limit, and it does not apply to --content-url.
Example
sinch fax send --to +12025550134 --file ./document.pdf
sinch fax send --to +12025550134 --content-url https://example.com/doc.pdfWith --json, the result is an object with a faxes array, one entry per recipient (with --wait, the completed faxes):
{ "faxes": [{ "id": "01HZ...", "status": "QUEUED" }] }List faxes, with optional filters.
sinch fax list [options]| Option | Description |
|---|---|
-l, --limit <number> | Page size (the CLI still fetches every page) |
--direction <direction> | INBOUND or OUTBOUND |
--status <status> | QUEUED, IN_PROGRESS, COMPLETED or FAILURE |
--from <number> | Sender number starts with this |
--to <number> | Recipient number starts with this |
--service-id <id> | Fax service ID |
--created <date> | Created on this date (ISO 8601) |
--created-after <date> | Created after this date |
--created-before <date> | Created before this date |
--json | Output as JSON |
Delete a fax's stored content.
sinch fax delete-content <fax-id> [--force] [--non-interactive] [--json]Asks for confirmation unless you pass --force or --json. --non-interactive needs --force. With --json it prints { "deleted": true, "faxId": "<id>" }.
Manage fax services.
sinch fax services list [-l, --limit <number>] [--json]
sinch fax services get <service-id> [--json]
sinch fax services create [options]
sinch fax services update <service-id> [options]
sinch fax services delete <service-id> [--force] [--json]
sinch fax services numbers <service-id> [-l, --limit <number>] [--json]create and update options:
| Option | Description |
|---|---|
--name <name> | Service name |
--webhook-url <url> | Incoming fax webhook URL |
--webhook-content-type <type> | Webhook content type |
--default-from <number> | Default sender number |
--retries <n> | Number of retries (0-5) |
--retry-delay <seconds> | Seconds between retries |
--resolution <resolution> | FINE or SUPERFINE |
--image-conversion <method> | HALFTONE or MONOCHROME |
--save-outbound / --no-save-outbound | Save outbound fax documents, or not |
--save-inbound / --no-save-inbound | Save inbound fax documents, or not |
--default | create only: make it the project's default service |
--non-interactive | create only: no prompts |
--json | Output as JSON |
With --json, services delete prints { "deleted": true, "serviceId": "<id>" }.
Manage fax-to-email configurations.
sinch fax emails list [--service-id <id>] [-l, --limit <number>] [--json]
sinch fax emails add [options]
sinch fax emails update <email> [options]
sinch fax emails delete <email> [--service-id <id>] [--force] [--json]
sinch fax emails numbers <email> [--service-id <id>] [--json]| Option | Description |
|---|---|
--service-id <id> | Fax service. If left out, the CLI uses the configured one or looks it up |
--email <email> | add only: the email address |
--number <phone> | Phone number; repeatable. On update the numbers replace the existing ones, and at least one is required |
--permissions <perm> | both (default), send or receive |
--non-interactive | add only: no prompts |
--json | Output as JSON |
With --json, emails delete prints { "deleted": true, "email": "<email>" }.
Manage the cover pages of a fax service.
sinch fax cover-pages list [--service-id <id>] [--json]
sinch fax cover-pages get <cover-page-id> [--service-id <id>] [--json]
sinch fax cover-pages add [--service-id <id>] [--name <name>] [--file <path>] [--non-interactive] [--json]
sinch fax cover-pages delete <cover-page-id> [--service-id <id>] [--force] [--json]add takes the file type from the file extension. With --json, cover-pages delete prints { "deleted": true, "coverPageId": "<id>" }.
Receive incoming fax events on your machine.
sinch fax listen [--port <port>] [--service-id <id>] [--url <url>] [--json]Starts a local HTTP server on 127.0.0.1 (port 3000 by default) and prints each event it receives. It does not open a tunnel. Pass --url with a public URL that forwards to that port, and the CLI sets it as the fax service's incoming webhook (JSON content type). When you stop it with Ctrl+C, the CLI puts back the service's previous webhook URL, but the content type stays JSON. --json prints each event as JSON, but the status lines also go to stdout, so the output is not pure JSON.
Every fax list command prints an object with one named array. Since 0.7.0; see the changelog.
| Command | Shape |
|---|---|
sinch fax list --json | { "faxes": [...] } |
sinch fax services list --json | { "services": [...] } |
sinch fax services numbers <service-id> --json | { "numbers": [...] } |
sinch fax emails list --json | { "emails": [...] } |
sinch fax emails numbers <email> --json | { "numbers": [...] } |
sinch fax cover-pages list --json | { "coverPages": [...] } |
sinch fax list --json | jq '.faxes[0].id'Get the current status of a fax.
sinch fax status <fax-id> [options]| Option | Description |
|---|---|
--wait | Poll until the fax completes or fails |
--timeout <seconds> | Timeout for --wait mode (default: 300) |
--watch | Continuously poll and redisplay status |
--interval <seconds> | Poll interval for --watch (default: 5) |
--json | Output as JSON |
Get complete details for a fax, including pricing and retry configuration.
sinch fax get <fax-id> [--json]Download the content of a fax as a PDF.
sinch fax download <fax-id> [-o <filename>] [--json]| Option | Description |
|---|---|
-o, --output <filename> | Output filename (default: <fax-id>.pdf; - writes the PDF to stdout) |
--json | Print the result as JSON instead of a progress message |
With --json the command prints the saved file and exits:
{ "faxId": "01ABC", "path": "/home/me/01ABC.pdf", "bytes": 48213 }--json cannot be combined with -o -, because stdout carries the PDF. That combination is rejected with an error on stderr and exit code 1. Other failures print { "error": "...", "statusCode": ..., "serverBody": "..." } to stdout and exit with code 1.



