GoFax REST API common practices

Some common approaches to developing an integration with GoFax using the REST API

When sending either Fax or SMS, transmission to the destination can take time. Therefore the result cannot be returned in the initial API response, but rather the job status must be tracked using one of the below approaches. 

Event based 

We would highly recommend using webhooks (a.k.a callback URLs) such that your integration can be notified when a fax or SMS transmission is complete or when a fax is received. 

Using an event based approach reduces the number of calls made to the API and enables your integration to track message statuses in near real-time.  

This approach is particularly effective for SMS delivery and for fax receive, where polling at an interval will introduce significant lag in updating statuses. 

Here's a high-level diagram of how your webhook listener service would operate for fax receive. 

Poll based

Alternatively, your integration could periodically poll the API to track sent or received messages. 

This approach does not require a webhook listener service, reducing complexity and allowing your integration to be installed behind NAT firewalls (doesn't need to be exposed to the internet).

However, this means your integration is unable to track state in near real-time. The status of messages will only update when polled.