Add a statement to an IAM role
Adds one statement to a role. A statement has an effect, allow unless it says deny, and a list of actions: exact action IDs, wildcards such as number_order.*, or *. Every entry must match the catalog, and there is no upper limit on the number of entries. A role can hold both an allow and a deny, such as an allow of number.* and a deny of number.delete. A change applies to new requests within five seconds.
Only the organization owner can call this endpoint. Its action is iam_roles.update. Other users and service account tokens get 403.
POST
/
iam
/
roles
/
{role_id}
/
statements
curl --request POST \
--url https://api.telnyx.com/v2/iam/roles/{role_id}/statements \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"actions": [
"phone_numbers.list",
"number_order.create",
"number.update"
]
}
'{
"data": {
"id": "f319340f-b0f0-4c3e-a0e5-d5f65bc1bc4a",
"role_id": "8c4a9715-0246-4c6f-9eca-390e13bd8af0",
"effect": "allow",
"actions": [
"phone_numbers.list",
"number_order.create",
"number.update"
],
"record_type": "iam_role_statement",
"created_at": "2026-11-24T10:15:30.123456Z",
"updated_at": "2026-11-24T10:15:30.123456Z"
}
}Authorizations
Body
application/json
Was this page helpful?
curl --request POST \
--url https://api.telnyx.com/v2/iam/roles/{role_id}/statements \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"actions": [
"phone_numbers.list",
"number_order.create",
"number.update"
]
}
'{
"data": {
"id": "f319340f-b0f0-4c3e-a0e5-d5f65bc1bc4a",
"role_id": "8c4a9715-0246-4c6f-9eca-390e13bd8af0",
"effect": "allow",
"actions": [
"phone_numbers.list",
"number_order.create",
"number.update"
],
"record_type": "iam_role_statement",
"created_at": "2026-11-24T10:15:30.123456Z",
"updated_at": "2026-11-24T10:15:30.123456Z"
}
}