Introduction

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.

HTTP Methods

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'
					
	            

Method Simulation

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'
	              
	            

Authentication

Most API calls require authentication. The client libraries have built-in authentication handling, which will automatically authenticate each request when properly initialized.

HTTP Authentication

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'
              			
	            	

Formats

By default, all API calls return a JSON response. Click here to learn more about it.

Webhooks

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).

Specifying Webhook URLs

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.

Specifying a Webhook Version

Coming Soon

Enabling Inflight Webhooks

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.

Retries

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
15 minutes
210 minutes
320 minutes
430 minutes
560 minutes

Send faxes

Post
https://api.ifaxapp.com/v1/customer/fax-send
NameValueDescription
Content-typeapplication/jsonAPI response will get in json format.
This header is required
Acceptapplication/jsonThe parmaters value should be pass in json format.
This header is required
accessTokenAPI keyAPI key will be unique for all users. It will get from settings page.
This header is required
NameTypeDescription
faxNumberStringThe receiptent fax number need to pass here.
This parameter is required
faxDataArrayArray 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
	                          }
	                }
	              
	            

Resend a fax

Post
https://api.ifaxapp.com/v1/customer/fax-resend
NameValueDescription
Content-typeapplication/jsonAPI response will get in json format.
This header is required
Acceptapplication/jsonThe parmaters value should be pass in json format.
This header is required
accessTokenAPI keyAPI key will be unique for all users. It will get from settings page.
This header is required
NameTypeDescription
jobIdIntegerIt's unique id for all faxes. You will get from send fax API
This parameter is required
faxDataArrayArray 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
	                          }
	                }
	            

Fax Status

Post
https://api.ifaxapp.com/v1/customer/fax-status
NameValueDescription
Content-typeapplication/jsonAPI response will get in json format.
This header is required
Acceptapplication/jsonThe parmaters value should be pass in json format.
This header is required
accessTokenAPI keyAPI key will be unique for all users. It will get from settings page.
This header is required
NameTypeDescription
jobIdIntegerIt'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
	            	}
	            }
	        	

Delete fax

Post
https://api.ifaxapp.com/v1/customer/fax-delete
NameValueDescription
Content-typeapplication/jsonAPI response will get in json format.
This header is required
Acceptapplication/jsonThe parmaters value should be pass in json format.
This header is required
accessTokenAPI keyAPI key will be unique for all users. It will get from settings page.
This header is required
NameTypeDescription
jobIdIntegerIt'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"
	            }
	        	

Cancel fax

Post
https://api.ifaxapp.com/v1/customer/fax-cancel
NameValueDescription
Content-typeapplication/jsonAPI response will get in json format.
This header is required
Acceptapplication/jsonThe parmaters value should be pass in json format.
This header is required
accessTokenAPI keyAPI key will be unique for all users. It will get from settings page.
This header is required
NameTypeDescription
jobIdIntegerIt'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"
	            }
	        	

Receive Faxes

Coming Soon