Send a fax
Create and send a fax.
Fax content may be supplied via one or more files or URLs of supported filetypes.
This endpoint supports the following content types for the fax payload:
- Multipart/form-data
- Application/json
We will however always return a fax object in the response in application json. If you supply a callbackUrl the callback will be sent as multipart/form-data with the content of the fax as an attachment to the body, unless you specify callbackUrlContentType as application/json.
file(s)
Files may be included in the POST request as multipart/form-data parts.
contentUrl
Any URL on the Internet (including ones with basic authentication), and we'll pull it down and make it a fax. This might be useful to you if you're using a web framework for templates and creating fax files.
Please note: If you are passing fax a secure URL (starting with https://), make sure that your SSL certificate (including your intermediate cert, if you have one) is installed properly, valid, and up-to-date.
Request body
Example request
{
"to": "+15551235656",
"from": "+15551235656",
"files": [
{
"file": "{base64-encoded content}"
}
],
"id": "01F3J0G1M4WQR6HGY6HCF6JA0K",
"direction": "OUTBOUND",
"contentUrl": [
"www.google.com",
"www.sinch.com"
],
"price": {
"currencyCode": "USD",
"amount": "0.0040"
},
"pagesSentSuccessfully": 3,
"labels": {
"use-case": "fraudPrevention",
"costCenter": "sales"
},
"callbackUrl": "https://www.my-website.com/callback",
"coverPageData": {
"toName": "Acme Corp"
},
"projectId": "ae00f005-e392-44dc-b3f5-a657a2684dg3",
"serviceId": "01GVRB50KEQFFE1SGMPFRNBG6J"
}Response
The created fax
Example response
{
"id": "01F3J0G1M4WQR6HGY6HCF6JA0K",
"direction": "OUTBOUND",
"from": "+15551235656",
"to": "+15551235656",
"contentUrl": [
"www.google.com",
"www.sinch.com"
],
"price": {
"currencyCode": "USD",
"amount": "0.0040"
},
"pagesSentSuccessfully": 3,
"labels": {
"use-case": "fraudPrevention",
"costCenter": "sales"
},
"callbackUrl": "https://www.my-website.com/callback",
"coverPageData": {
"toName": "Acme Corp"
},
"projectId": "ae00f005-e392-44dc-b3f5-a657a2684dg3",
"serviceId": "01GVRB50KEQFFE1SGMPFRNBG6J"
}