Email to fax reseller API

Introduction

Users are uniquely identified by their email address and the fax domain. The following HTTP POST requests can be sent to http://gw.aql.com/reseller/faxapi.php.

Errors are returned in the form: ERR:Message

‘OK’ is returned for successful operations, optionally by an ID, e.g.: OK:22

List users

Request

Parameter Type Required Length Description
action Alphanumeric Yes   Value must be “listusers”
username Alphanumeric Yes   aql username
password Alphanumeric Yes   aql password

Response

A comma-separated list of email addresses and fax domains. For example:

joe@domain.com,fax.reseller.com

fred@otherdomain.net,fax.reseller.com


Get user

Request

Parameter Type Required Length Description
action Alphanumeric Yes   Value must be “getuser”
username Alphanumeric Yes   aql username
password Alphanumeric Yes   aql password
email Alphanumeric Yes   The email address of the user
faxdomain Alphanumeric Yes   The fax domain of the user

Response

item:value pairs separated by newlines.

For example:

email:joe@domain.com
faxdomain:fax.reseller.com
maxpages:
stationid:01133200032
headerinfo:Joe Bloggs
callerid:01133200032
coverpage:1
creditsused:1310
disabled:0
credit:


Change user

Request

Parameter Type Required Length Description
action Alphanumeric Yes   Value must be “changeuser”
username Alphanumeric Yes   aql username
password Alphanumeric Yes   aql password
email Alphanumeric Yes   User email address
faxdomain Alphanumeric Yes   User fax domain
maxpages Numeric No   Leave empty if you do not want to limit this
callerid Alphanumeric No    
stationid Alphanumeric No    
headerinfo Alphanumeric No    
coverpage Numeric No   The ID of the cover page. Note that this can be found using “list cover pages” action (described below).
disabled Boolean No   Disable or enable sending from this address.
credit Numeric No   Sets the amount of credit available on the user. Send to an empty value to allow user to use all the available credit on the account.
addcredit Numeric No   When a user has an individual credit limit, this adds the specified amount to the remaining balance.

Response

OK or ERR:Error Message


Add user

Parameter Type Required Length Description
action Alphanumeric Yes   Value must be “adduser”
username Alphanumeric Yes   aql username
password Alphanumeric Yes   aql password
email Alphanumeric Yes   User email address
faxdomain Alphanumeric Yes   User fax domain
stationid Alphanumeric Yes   This will also set the caller id for the call if the callerid parameter is not provided
callerid Alphanumeric No    
headerinfo Alphanumeric Yes    
maxpages Numeric No   Leave empty if you do not want to limit this
coverpage Numeric No   The ID of the cover page. Note that this can be found using “list cover pages” action (described below).

Response

OK or ERR:Error Message


List cover pages

Request

Parameter Type Required Length Description
action Alphanumeric Yes   Value must be “listcoverpages”
username Alphanumeric Yes   aql username
password Alphanumeric Yes   aql password

Response

A csv list of IDs and names in the form

5,Default Cover Page


Get cover page

Request

Parameter Type Required Length Description
action Alphanumeric Yes   Values must be “getcoverpage”
username Alphanumeric Yes   aql username
id Numeric Yes   ID obtained from the “list cover pages” action above

Response

Returns the cover page content.


Add a cover page

Request

Parameter Type Required Length Description
action Alphanumeric Yes   Value must be “addcoverpage”
username Alphanumeric Yes   aql username
password Alphanumeric Yes   aql password
name Alphanumeric Yes   The name of the cover page; an arbitrary identifier
content Alphanumeric Yes   The content of the cover page template

Response

Returns OK:<id> where <id> is the new cover page ID


Change cover page

Request

Parameter Type Required Length Description
action Alphanumeric Yes   Value must be “changecoverpage”
username Alphanumeric Yes   aql username
password Alphanumeric Yes   aql password
id Numeric Yes   ID obtained using “list cover pages” action (described above)
content Alphanumeric Yes   The new content of the cover page template

Response

Returns OK