Get Started
SDKs
API Reference
- Accounts
- Numbers
- Faxes
- Files
- Outbox
- Webhooks
- Shop
Outbox
Send a fax
Send a fax to one or more destinations. For corporate members without a fax number assigned set the ‘from’ parameter to ‘no_number’. (Permitted scopes: fax:all:edit, fax:fax:edit)
POST
/
accounts
/
{user_id}
/
outbox
const axios = require('axios');
const OutboxApiFp = require('@alohi/faxplus-api').OutboxApiFp;
const Configuration = require('@alohi/faxplus-api').Configuration;
const config = new Configuration({
accessToken: accessToken,
basePath: 'https://restapi.fax.plus/v3',
// Header required only when using the OAuth2 token scheme
baseOptions: {
headers: {
"x-fax-clientid": clientId,
}
}
});
async function sendFax() {
const reqParams = {
"userId": '13d8z73c',
"payloadOutbox": {
"comment": {
"tags": [
"tag1",
"tag2"
],
"text": "text comment"
},
"files": [
"filetosend.pdf"
],
"from": "+12345667",
"options": {
"enhancement": true,
"retry": {
"count": 2,
"delay": 15
}
},
"send_time": "2000-01-01 01:02:03 +0000",
"to": [
"+12345688",
"+12345699"
],
"return_ids": true
}
}
const req = await OutboxApiFp(config).sendFax(reqParams);
const resp = await req(axios);
}
sendFax()
{
"ids": {
"+1234567890": "1a2b3c4d5e6f7890",
"+1345678912": "78901a2b3c4d5e6f"
}
}
const axios = require('axios');
const OutboxApiFp = require('@alohi/faxplus-api').OutboxApiFp;
const Configuration = require('@alohi/faxplus-api').Configuration;
const config = new Configuration({
accessToken: accessToken,
basePath: 'https://restapi.fax.plus/v3',
// Header required only when using the OAuth2 token scheme
baseOptions: {
headers: {
"x-fax-clientid": clientId,
}
}
});
async function sendFax() {
const reqParams = {
"userId": '13d8z73c',
"payloadOutbox": {
"comment": {
"tags": [
"tag1",
"tag2"
],
"text": "text comment"
},
"files": [
"filetosend.pdf"
],
"from": "+12345667",
"options": {
"enhancement": true,
"retry": {
"count": 2,
"delay": 15
}
},
"send_time": "2000-01-01 01:02:03 +0000",
"to": [
"+12345688",
"+12345699"
],
"return_ids": true
}
}
const req = await OutboxApiFp(config).sendFax(reqParams);
const resp = await req(axios);
}
sendFax()
Authorizations
OAuth2 Authorization Grant
Path Parameters
self or user id of a corporate member
Body
application/json
Request to send new outbound fax
Model for creating new outbound fax
Response
201
application/json
Outbox fax has been created successfully
Send fax handle response, will contain Destination-to-ID mapping if the corresponding flag was provided
const axios = require('axios');
const OutboxApiFp = require('@alohi/faxplus-api').OutboxApiFp;
const Configuration = require('@alohi/faxplus-api').Configuration;
const config = new Configuration({
accessToken: accessToken,
basePath: 'https://restapi.fax.plus/v3',
// Header required only when using the OAuth2 token scheme
baseOptions: {
headers: {
"x-fax-clientid": clientId,
}
}
});
async function sendFax() {
const reqParams = {
"userId": '13d8z73c',
"payloadOutbox": {
"comment": {
"tags": [
"tag1",
"tag2"
],
"text": "text comment"
},
"files": [
"filetosend.pdf"
],
"from": "+12345667",
"options": {
"enhancement": true,
"retry": {
"count": 2,
"delay": 15
}
},
"send_time": "2000-01-01 01:02:03 +0000",
"to": [
"+12345688",
"+12345699"
],
"return_ids": true
}
}
const req = await OutboxApiFp(config).sendFax(reqParams);
const resp = await req(axios);
}
sendFax()
{
"ids": {
"+1234567890": "1a2b3c4d5e6f7890",
"+1345678912": "78901a2b3c4d5e6f"
}
}