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

const client = new Telnyx({
  apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});

const response = await client.callReasons.validate({
  body: ['Appointment reminders', 'Billing inquiries'],
});

console.log(response.data);
{
  "data": {
    "all_pre_approved": false,
    "non_approved_reasons": [
      "Appointment reminders",
      "Billing inquiries"
    ],
    "requires_manual_vetting": true
  }
}

Authorizations

Authorization
string
header
required

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

Body

application/json
Required array length: 1 - 10 elements
Maximum string length: 64
Example:
[
"Appointment reminders",
"Billing inquiries"
]

Response

Per-string validation result.

data
object
required