Fax Service Configuration
To start using the Fax Service, use the onboard endpoint (opens in a new tab) to request a fax number. This will purchase a fax number and associate it with your project.
Similarly, the offboard endpoint (opens in a new tab) will permanently release the number. If you onboard again, there is no way to guarantee that you get the same number again.
You can check the status of your project's Fax Service configuration using the configuration endpoint (opens in a new tab).
Onboarding a Fax Number
To onboard a fax number, call the onboarding endpoint in the fax API:
import Oystehr from '@oystehr/sdk';
const oystehr = new Oystehr({
accessToken: "<your_access_token>",
});
const response = await oystehr.fax.onboard();
A successful response would return your fax number in E.164 format:
{
"faxNumber": "+12223334444"
}
Offboarding a Fax Number
To offboard your fax number, call the offboarding endpoint in the fax API:
import Oystehr from '@oystehr/sdk';
const oystehr = new Oystehr({
accessToken: "<your_access_token>",
});
const response = await oystehr.fax.offboard();
A successful response will only return a 204
status code.
Checking Configuration
import Oystehr from '@oystehr/sdk';
const oystehr = new Oystehr({
accessToken: "<your_access_token>",
});
const response = await oystehr.fax.getConfiguration();
A successful response will return a small JSON object with the current configuration of the Fax Service for your project.
{
"configured": true,
"faxNumbers": [
"+12223334444"
]
}