Request the document
Use an enabled MultiTEL API account. Send HTTP Basic credentials for a password account, or a Bearer token for a token account. Account permissions and IP restrictions still apply. Do not use internal worker credentials.
curl --silent --show-error --get --user "$API_USER:$API_PASSWORD" \
--data-urlencode job_id=0123456789abcdef0123456789abcdef \
--dump-header fax-response.headers --output fax-response.bin \
https://api.multitel.net/v3/fax_downloadUse the same required 32-character hexadecimal job_id as fax_status. The customer request is restricted to the authenticated owner. This example saves the response headers and bytes separately so that an API error is not mistaken for a PDF.
Handle a file or a JSON error
Success returns raw document bytes with Content-Type and Content-Disposition attachment headers, not a JSON envelope. Check those headers before naming, opening or processing the saved file. The response may be a PDF, TIFF or the original uploaded format, depending on which document is available. A queued job may return its original source before conversion.
Failure returns the normal JSON status/response envelope. API code 400 means missing or malformed job_id; 401 means missing authentication; 404 means the job or its file is unavailable for this account. Check the Content-Type and status.code even when HTTP status is 200.
Availability and privacy
A job record does not guarantee a downloadable file forever; a retention period has not been verified. Save authorized documents to your own controlled storage when needed. The returned file can contain private recipient information. Downloads do not transmit a new fax.