Skip to main content
POST
/
wireless_blocklists
JavaScript
import Telnyx from 'telnyx';

const client = new Telnyx({
  apiKey: 'My API Key',
});

const wirelessBlocklist = await client.wirelessBlocklists.create({
  name: 'My Wireless Blocklist',
  type: 'country',
  values: ['CA', 'US'],
});

console.log(wirelessBlocklist.data);
{
  "data": {
    "id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
    "record_type": "wireless_blocklist",
    "created_at": "2018-02-02T22:25:27.521Z",
    "updated_at": "2018-02-02T22:25:27.521Z",
    "name": "North American Wireless Blocklist",
    "type": "country",
    "values": [
      "CA",
      "MX",
      "US"
    ]
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
name
string
required

The name of the Wireless Blocklist.

Example:

"My Wireless Blocklist"

type
enum<string>
required

The type of wireless blocklist.

Available options:
country,
mcc,
plmn
Example:

"country"

values
string[]
required

Values to block. The values here depend on the type of Wireless Blocklist.

ISO 3166-1 Alpha-2 Country Code.

Example:

"US"

Example:
["CA", "US"]

Response

Successful Response

data
object