Skip to main content
POST
/
hooks
const axios = require('axios');
const WebhooksApiFp = require('@alohi/faxplus-api').WebhooksApiFp;
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 createWebhook() {
    const reqParams = {
        "webhook": {
            "target": "http://myapp.com/fax_received",
            "event": "fax_received"
        }
    }
    const req = await WebhooksApiFp(config).createWebhook(reqParams);
    const resp = await req(axios);
}

createWebhook()
{
  "id": "6048b47181dbe1a7d67fcc98"
}

Documentation Index

Fetch the complete documentation index at: https://apidoc.fax.plus/llms.txt

Use this file to discover all available pages before exploring further.

const axios = require('axios');
const WebhooksApiFp = require('@alohi/faxplus-api').WebhooksApiFp;
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 createWebhook() {
    const reqParams = {
        "webhook": {
            "target": "http://myapp.com/fax_received",
            "event": "fax_received"
        }
    }
    const req = await WebhooksApiFp(config).createWebhook(reqParams);
    const resp = await req(axios);
}

createWebhook()

Authorizations

Authorization
string
header
required

OAuth2 Authorization Grant

Body

application/json

Request to create new webhook

Webhook model

target
string
required

Webhook target URL

event
enum<string>
required

Webhook event type

Available options:
fax_received,
fax_sent,
fax_page_received
id
string

Webhook ID

numbers
string[] | null

A list of phone numbers used to filter webhook triggers. If specified, the webhook will only fire for inbound or outbound calls involving these numbers. Pass null to disable filtering. An empty array is invalid

Minimum array length: 1
Required string length: 2 - 16
Pattern: ^[+][1-9][0-9]{1,14}$
Example:
["+12135550123"]

Response

Webhook ID

Webhook ID

id
string
required

Webhook ID