All calls to the iFax API should be made to https://api.ifaxapp.com/v1
, which remains current with the latest minor updates. For most calls you will need to pass in your API key as parameters. You can find your API key on the “Settings” page. In iFax, there are two types of credentials: Live and Test.
If you make an API call with a live key, your balance will decrease if you perform operations that cost money (e.g. you send a fax). However, if you make calls with test keys, the iFax system will simulate faxes being sent or received and your balance will not be affected.
All iFax API responses are formatted in JSON. Need an XML response? Too bad. JSON is awesome! Click here to learn more about it.
Parameters that look like this are optional, whereas all other parameters are required.
Since our API is RESTful, each API call requires a specific HTTP method to indicate the type of operation to be performed. The client libraries will use the appropriate method for the desired operation, so the method only has to be specified when interacting with the iFax API at the HTTP level, such as when using curl:
curl -X POST https://api.ifaxapp.com/v1/customer/fax-send \
-H 'accessToken:API_KEY'
Some HTTP clients don’t support all HTTP methods. In such cases, the POST method can be used, with the method for the API call passed in the _method
parameter:
curl https://api.ifaxapp.com/v1/customer/fax-send
-F '_method=POST' \
-H 'accessToken:API_KEY'
Most API calls require authentication. The client libraries have built-in authentication handling, which will automatically authenticate each request when properly initialized.
HTTP authentication may be used simply by using the API key. For example:
cURL
curl 'https://api.ifaxapp.com/v1/customer/fax-send' \
-H 'accessToken:API_KEY'
By default, all API calls return a JSON response. Click here to learn more about it.
Webhooks allow iFax to update you in real-time about the status of your faxes. Webhooks are triggered by events such as the completion of a fax, and transmit information about the state of that fax to you via HTTP(S).
The first thing we need to send you a webhook is a destination URL. This should be a valid URI with a http
, https
scheme that points to a destination that you control. Examples of valid webhook URLs are https://www.example.com/ifax_webhook
For sent and received faxes, you can set global webhook URLs on your webhook settings page. These apply to all faxes on your iFax Acount.
Coming Soon
Currently, iFax supports two categories of webhooks: postflight and inflight. Postflight webhooks are triggered when a fax completes, regardless of success. Inflight webhooks are triggered by events during the transmission of a fax, such as the transfer of individual pages.
Inflight webhooks are disabled by default, but can be enabled on the webhook settings page.
If a webhook fails, We will automatically retry up to 5 times. There will be a backoff before each retry, which increases as follows:
Retry No. | Backoff |
---|---|
1 | 5 minutes |
2 | 10 minutes |
3 | 20 minutes |
4 | 30 minutes |
5 | 60 minutes |
Name | Value | Description |
---|---|---|
Content-type | application/json | API response will get in json format. This header is required |
Accept | application/json | The parmaters value should be pass in json format. This header is required |
accessToken | API key | API key will be unique for all users. It will get from settings page. This header is required |
Name | Type | Description |
---|---|---|
faxNumber | String | The receiptent fax number need to pass here. This parameter is required |
faxData | Array | Array of attachment will be pass here. Allow pdf & image attachment only Required at least one attachment |
{ "faxNumber" : "+12345678901", "faxData" : [{ "fileName" : "abc.pdf", "fileData" : "HTTP url of file location" }, { "fileName" : "xyz.pdf", "fileData" : "HTTP url of file location" }] }
{ "status": 1, "message": "Fax processed for sending", "data": { "jobId": 12345 } }
Name | Value | Description |
---|---|---|
Content-type | application/json | API response will get in json format. This header is required |
Accept | application/json | The parmaters value should be pass in json format. This header is required |
accessToken | API key | API key will be unique for all users. It will get from settings page. This header is required |
Name | Type | Description |
---|---|---|
jobId | Integer | It's unique id for all faxes. You will get from send fax API This parameter is required |
faxData | Array | Array of attachment will be pass here. Allow pdf & image attachment only Required at least one attachment |
{ "jobId" : 12345, "faxData" : [{ "fileName" : "abc.pdf", "fileData" : "HTTP url of file location" }, { "fileName" : "xyz.pdf", "fileData" : "HTTP url of file location" }] }
{ "status": 1, "message": "Fax processed for sending", "data": { "jobId": 12345 } }
Name | Value | Description |
---|---|---|
Content-type | application/json | API response will get in json format. This header is required |
Accept | application/json | The parmaters value should be pass in json format. This header is required |
accessToken | API key | API key will be unique for all users. It will get from settings page. This header is required |
Name | Type | Description |
---|---|---|
jobId | Integer | It's unique id for all faxes. You will get from send fax API This parameter is required |
{ "jobId" : "12345", }
{ "status": 1, "message": "Fax status response", "data": { "jobId": 12345, "fromNumber": "1234567890", "toNumber": "2092510354", "faxCallLength": 173, "faxCallStart": "2020-04-29 14:29:59 UTC", "faxCallEnd": "2020-04-29 14:32:52 UTC", "faxTotalPages": 20, "faxTransferredPages": 20, "pricePerPage": 0.11, "actualCost": 2, "faxStatus": "failed", "retryAttempt": 1, "errorMessage": "failed", "code": 12007 } }
Name | Value | Description |
---|---|---|
Content-type | application/json | API response will get in json format. This header is required |
Accept | application/json | The parmaters value should be pass in json format. This header is required |
accessToken | API key | API key will be unique for all users. It will get from settings page. This header is required |
Name | Type | Description |
---|---|---|
jobId | Integer | It's unique id for all faxes. You will get from send fax API This parameter is required |
{ "jobId" : "12345", }
{ "status": 1, "message":"Fax deleted successfully" }
Name | Value | Description |
---|---|---|
Content-type | application/json | API response will get in json format. This header is required |
Accept | application/json | The parmaters value should be pass in json format. This header is required |
accessToken | API key | API key will be unique for all users. It will get from settings page. This header is required |
Name | Type | Description |
---|---|---|
jobId | Integer | It's unique id for all faxes. You will get from send fax API This parameter is required |
{ "jobId" : "12345", }
{ "status": 1, "message":"Fax canceled successfully" }