Skip to main content
PATCH
/
requirement_groups
/
{id}
JavaScript
import Telnyx from 'telnyx';

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

const requirementGroup = await client.requirementGroups.update('id');

console.log(requirementGroup.id);
import os
from telnyx import Telnyx

client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
requirement_group = client.requirement_groups.update(
id="id",
)
print(requirement_group.id)
package main

import (
"context"
"fmt"

"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)

func main() {
client := telnyx.NewClient(
option.WithAPIKey("My API Key"),
)
requirementGroup, err := client.RequirementGroups.Update(
context.TODO(),
"id",
telnyx.RequirementGroupUpdateParams{},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", requirementGroup.ID)
}
package com.telnyx.sdk.example;

import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.requirementgroups.RequirementGroup;
import com.telnyx.sdk.models.requirementgroups.RequirementGroupUpdateParams;

public final class Main {
private Main() {}

public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();

RequirementGroup requirementGroup = client.requirementGroups().update("id");
}
}
require "telnyx"

telnyx = Telnyx::Client.new(api_key: "My API Key")

requirement_group = telnyx.requirement_groups.update("id")

puts(requirement_group)
<?php

require_once dirname(__DIR__) . '/vendor/autoload.php';

use Telnyx\Client;
use Telnyx\Core\Exceptions\APIException;

$client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API Key');

try {
$requirementGroup = $client->requirementGroups->update(
'id',
customerReference: '0002',
regulatoryRequirements: [
[
'fieldValue' => 'new requirement value',
'requirementID' => '53970723-fbff-4f46-a975-f62be6c1a585',
],
],
);

var_dump($requirementGroup);
} catch (APIException $e) {
echo $e->getMessage();
}
telnyx requirement-groups update \
--api-key 'My API Key' \
--id id
curl --request PATCH \
--url https://api.telnyx.com/v2/requirement_groups/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"customer_reference": "0002",
"regulatory_requirements": [
{
"requirement_id": "53970723-fbff-4f46-a975-f62be6c1a585",
"field_value": "new requirement value"
}
]
}
'
{
  "id": "<string>",
  "country_code": "<string>",
  "phone_number_type": "<string>",
  "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>",
      "expires_at": "2023-11-07T05:31:56Z",
      "created_at": "2023-11-07T05:31:56Z",
      "updated_at": "2023-11-07T05:31:56Z"
    }
  ]
}
{
"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

Authorization
string
header
required

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

Path Parameters

id
string
required

ID of the requirement group

Body

application/json
customer_reference
string

Reference for the customer

Example:

"0002"

regulatory_requirements
object[]

Response

Updated requirement group

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[]