Create a Blocking Rule

Method

POST

Path

blocking_rules/DIRECTION

Request Parameters

Name Type Description
to string One of '*', a country alpha2 ('US'), or an e.164 phone number
from string One of '*', a country alpha2 ('US'), or an e.164 phone number

Response

A JSON object with success, message, and data attributes. The data attribute contains a Blocking Rule Object.

Sample Call

This rule will block sending faxes from any caller ID to +12013615723:

curl https://api.phaxio.com/v2.1/blocking_rules/send \
  -u 'API_KEY:API_SECRET' \
  -F 'to=+12013615723' \
  -F 'from=*' 

This rule will block receiving faxes from any number in Canada to any Phaxio number you own:

curl https://api.phaxio.com/v2.1/blocking_rules/receive \
  -u 'API_KEY:API_SECRET' \
  -F 'to=*' \
  -F 'from=CA' 

Sample Response

{
  "success": true,
  "message": "Blocking rule created successfully",
  "data": {
    "id": 34567,
    "to": "*",
    "from": "+12013615723",
    "direction": "send",
    "is_locked": false
  }
}