Fulfill an action requirement for a sub number order
Submits the end user’s details to the external verification provider and returns the requirement action. Australia mobile ID verification is currently the only action requirement. It generates a unique Onfido verification link, returned in requirement_action.value, which you share with the end user. The end user’s first_name and last_name must be nested inside a requirement object; sending them at the top level is rejected.
curl --request POST \
--url https://api.telnyx.com/v2/external_requirements/{regulatory_requirement_id}/sub_number_orders/{sub_number_order_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"requirement": {
"first_name": "Jane",
"last_name": "Doe"
}
}
'import requests
url = "https://api.telnyx.com/v2/external_requirements/{regulatory_requirement_id}/sub_number_orders/{sub_number_order_id}"
payload = { "requirement": {
"first_name": "Jane",
"last_name": "Doe"
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({requirement: {first_name: 'Jane', last_name: 'Doe'}})
};
fetch('https://api.telnyx.com/v2/external_requirements/{regulatory_requirement_id}/sub_number_orders/{sub_number_order_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.telnyx.com/v2/external_requirements/{regulatory_requirement_id}/sub_number_orders/{sub_number_order_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'requirement' => [
'first_name' => 'Jane',
'last_name' => 'Doe'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.telnyx.com/v2/external_requirements/{regulatory_requirement_id}/sub_number_orders/{sub_number_order_id}"
payload := strings.NewReader("{\n \"requirement\": {\n \"first_name\": \"Jane\",\n \"last_name\": \"Doe\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.telnyx.com/v2/external_requirements/{regulatory_requirement_id}/sub_number_orders/{sub_number_order_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"requirement\": {\n \"first_name\": \"Jane\",\n \"last_name\": \"Doe\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.telnyx.com/v2/external_requirements/{regulatory_requirement_id}/sub_number_orders/{sub_number_order_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"requirement\": {\n \"first_name\": \"Jane\",\n \"last_name\": \"Doe\"\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"sub_order_id": "5f8e6b1a-2d3c-4e5f-9a0b-1c2d3e4f5a6b",
"regulatory_requirement_id": "a5b8f1d2-3c4e-4f6a-8b9c-0d1e2f3a4b5c",
"requirement_action": {
"type": "id_verification",
"value": "https://verify.onfido.com/v/8f3c2a1b-9d4e-4f6a-8b9c-0d1e2f3a4b5c"
}
}
}{
"errors": [
{
"code": "10007",
"title": "Unexpected error",
"detail": "An unexpected error occured.",
"source": {
"pointer": "/base",
"parameter": "<string>"
},
"meta": {
"url": "https://developers.telnyx.com/docs/overview/errors/10015"
}
}
]
}{
"errors": [
{
"code": "10009",
"title": "Authentication failed",
"detail": "Could not understand the provided credentials.",
"meta": {
"url": "https://developers.telnyx.com/docs/overview/errors/10009"
}
}
]
}{
"errors": [
{
"code": "10007",
"title": "Unexpected error",
"detail": "An unexpected error occured.",
"source": {
"pointer": "/base",
"parameter": "<string>"
},
"meta": {
"url": "https://developers.telnyx.com/docs/overview/errors/10015"
}
}
]
}{
"errors": [
{
"code": "10007",
"title": "Unexpected error",
"detail": "An unexpected error occured.",
"source": {
"pointer": "/base",
"parameter": "<string>"
},
"meta": {
"url": "https://developers.telnyx.com/docs/overview/errors/10015"
}
}
]
}{
"errors": [
{
"code": "10007",
"title": "Unexpected error",
"detail": "An unexpected error occured.",
"source": {
"pointer": "/base",
"parameter": "<string>"
},
"meta": {
"url": "https://developers.telnyx.com/docs/overview/errors/10015"
}
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The ID of the regulatory (action) requirement. For Australia mobile ID verification this is b7c72fb8-fa08-4529-aaf6-b9117d3f3698.
The ID of the sub number order the requirement belongs to.
Body
The end user's identity details for the action requirement. Australia mobile ID verification is currently the only action requirement. It requires first_name and last_name, the same fields the corresponding GET lists in fields_required.
Show child attributes
Show child attributes
Response
Action requirement submitted successfully.
Show child attributes
Show child attributes
Was this page helpful?
curl --request POST \
--url https://api.telnyx.com/v2/external_requirements/{regulatory_requirement_id}/sub_number_orders/{sub_number_order_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"requirement": {
"first_name": "Jane",
"last_name": "Doe"
}
}
'import requests
url = "https://api.telnyx.com/v2/external_requirements/{regulatory_requirement_id}/sub_number_orders/{sub_number_order_id}"
payload = { "requirement": {
"first_name": "Jane",
"last_name": "Doe"
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({requirement: {first_name: 'Jane', last_name: 'Doe'}})
};
fetch('https://api.telnyx.com/v2/external_requirements/{regulatory_requirement_id}/sub_number_orders/{sub_number_order_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.telnyx.com/v2/external_requirements/{regulatory_requirement_id}/sub_number_orders/{sub_number_order_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'requirement' => [
'first_name' => 'Jane',
'last_name' => 'Doe'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.telnyx.com/v2/external_requirements/{regulatory_requirement_id}/sub_number_orders/{sub_number_order_id}"
payload := strings.NewReader("{\n \"requirement\": {\n \"first_name\": \"Jane\",\n \"last_name\": \"Doe\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.telnyx.com/v2/external_requirements/{regulatory_requirement_id}/sub_number_orders/{sub_number_order_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"requirement\": {\n \"first_name\": \"Jane\",\n \"last_name\": \"Doe\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.telnyx.com/v2/external_requirements/{regulatory_requirement_id}/sub_number_orders/{sub_number_order_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"requirement\": {\n \"first_name\": \"Jane\",\n \"last_name\": \"Doe\"\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"sub_order_id": "5f8e6b1a-2d3c-4e5f-9a0b-1c2d3e4f5a6b",
"regulatory_requirement_id": "a5b8f1d2-3c4e-4f6a-8b9c-0d1e2f3a4b5c",
"requirement_action": {
"type": "id_verification",
"value": "https://verify.onfido.com/v/8f3c2a1b-9d4e-4f6a-8b9c-0d1e2f3a4b5c"
}
}
}{
"errors": [
{
"code": "10007",
"title": "Unexpected error",
"detail": "An unexpected error occured.",
"source": {
"pointer": "/base",
"parameter": "<string>"
},
"meta": {
"url": "https://developers.telnyx.com/docs/overview/errors/10015"
}
}
]
}{
"errors": [
{
"code": "10009",
"title": "Authentication failed",
"detail": "Could not understand the provided credentials.",
"meta": {
"url": "https://developers.telnyx.com/docs/overview/errors/10009"
}
}
]
}{
"errors": [
{
"code": "10007",
"title": "Unexpected error",
"detail": "An unexpected error occured.",
"source": {
"pointer": "/base",
"parameter": "<string>"
},
"meta": {
"url": "https://developers.telnyx.com/docs/overview/errors/10015"
}
}
]
}{
"errors": [
{
"code": "10007",
"title": "Unexpected error",
"detail": "An unexpected error occured.",
"source": {
"pointer": "/base",
"parameter": "<string>"
},
"meta": {
"url": "https://developers.telnyx.com/docs/overview/errors/10015"
}
}
]
}{
"errors": [
{
"code": "10007",
"title": "Unexpected error",
"detail": "An unexpected error occured.",
"source": {
"pointer": "/base",
"parameter": "<string>"
},
"meta": {
"url": "https://developers.telnyx.com/docs/overview/errors/10015"
}
}
]
}