JSON API » faxes » faxes/send
Sends a fax. The actual sending up is asynchronous, and will happen after the function returns.
Input parameters
Requires authentication and the send_fax role privilege.
| Name | Type | Description | Required | Default value | 
|---|---|---|---|---|
| auth_username | String | Authentication username. | Yes | |
| auth_password | String | Authentication password. | Yes | |
| cnumber | String | The destination to send the fax to. | Yes | |
| data | Base64 | The file to send, base64 encoded. | Yes | |
| cover | Base64 | The cover sheet, base64 encoded. Empty string for none. | No | Empty string. | 
| String | An email address to send a status report to. Empty string for none. | No | Empty string. | |
| mailbox | String | A mailbox to save the sent fax in. Empty string for none. | No | Empty string. | 
| snumber | String | A callerid for the outbound call. Empty string for unknown. | No | Empty string. | 
| customer | Integer | ID of customer to send as. | No | Customer of authentication user. | 
| header | String | Sender name to the fax header to identify the source of the faxes you send. | No | Empty string. | 
Responses
| Code | Description | 
|---|---|
| 204 | Fax sucessfully submitted for sending. | 
| 400 | Invalid input parameters specified. Check the key and message fields for more details. | 
| 401 | The authentication details provided are invalid. | 
| 402 | Your role does not allow this. | 
| 403 | Your rate plan does not allow this. | 
| 500 | An error occurred within the server. Check the key and message fields for more details. | 
Data returned
ID of the fax that was sent.
Example: With required parameters (base64 data truncated for brevity)
https://www.015pbx.net/local/api/json/faxes/send/?auth_username=user;auth_password=password;cnumber=2125551234;data=abc...{ "data" : { "id" : "fax-out-1579011681_5e1dce61d4c73_59" }, "responses" : [ { "message" : "OK", "key" : "", "code" : 204 } ]}
