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

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

const requirementGroup = await client.requirementGroups.create({
  action: 'ordering',
  country_code: 'US',
  phone_number_type: 'local',
});

console.log(requirementGroup.id);
{
  "id": "<string>",
  "country_code": "<string>",
  "phone_number_type": "<string>",
  "status": "approved",
  "action": "<string>",
  "customer_reference": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "record_type": "requirement_group",
  "regulatory_requirements": [
    {
      "requirement_id": "<string>",
      "field_value": "<string>",
      "field_type": "<string>",
      "status": "approved",
      "expires_at": "2023-11-07T05:31:56Z",
      "created_at": "2023-11-07T05:31:56Z",
      "updated_at": "2023-11-07T05:31:56Z"
    }
  ]
}

Authorizations

Authorization
string
header
required

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

Body

application/json
country_code
string
required

ISO alpha 2 country code

Example:

"US"

phone_number_type
enum<string>
required
Available options:
local,
toll_free,
mobile,
national,
shared_cost
Example:

"local"

action
enum<string>
required
Available options:
ordering,
porting
Example:

"ordering"

customer_reference
string
Example:

"My Requirement Group"

regulatory_requirements
object[]

Response

200 - application/json

Requirement group created

id
string
country_code
string
phone_number_type
string
status
enum<string>
Available options:
approved,
unapproved,
pending-approval,
declined,
expired
action
string
customer_reference
string
created_at
string<date-time>
updated_at
string<date-time>
record_type
string
Example:

"requirement_group"

regulatory_requirements
object[]