List IAM grants
Lists the organization’s grants, newest first. Filter by role to see who holds it, or by principal to see the roles a user or a service account holds.
Only the organization owner can call this endpoint. Its action is iam_grants.read. Other users and service account tokens get 403.
GET
/
iam
/
grants
List IAM grants
curl --request GET \
--url https://api.telnyx.com/v2/iam/grants \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.telnyx.com/v2/iam/grants"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.telnyx.com/v2/iam/grants', 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/iam/grants",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.telnyx.com/v2/iam/grants"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.telnyx.com/v2/iam/grants")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.telnyx.com/v2/iam/grants")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "c93f1a5e-7b24-4d86-9e0a-1f5b3c7d2e48",
"organization_id": "6e9d4c3a-2f8b-4a71-9c05-3b8e1f2d7a64",
"role_id": "8c4a9715-0246-4c6f-9eca-390e13bd8af0",
"principal_type": "service_account",
"principal_id": "e6cd1ff6-6e3a-4ff3-88d5-2234142c1df2",
"record_type": "iam_grant",
"created_at": "2026-11-24T10:22:08.654321Z",
"updated_at": "2026-11-24T10:22:08.654321Z"
},
{
"id": "4b8e2d6f-1a39-4c75-8d02-6e9f3a1c5b74",
"organization_id": "6e9d4c3a-2f8b-4a71-9c05-3b8e1f2d7a64",
"role_id": "3741a8a1-5c2e-4b9d-a7f0-6e1c8d2b4f95",
"principal_type": "user",
"principal_id": "b1d7e2c4-9a3f-4e58-8c61-0f2a7d5e9b13",
"record_type": "iam_grant",
"created_at": "2026-11-22T16:05:40.118734Z",
"updated_at": "2026-11-22T16:05:40.118734Z"
}
],
"meta": {
"page_number": 1,
"page_size": 25,
"total_pages": 1,
"total_results": 2
}
}Authorizations
Query Parameters
Was this page helpful?
List IAM grants
curl --request GET \
--url https://api.telnyx.com/v2/iam/grants \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.telnyx.com/v2/iam/grants"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.telnyx.com/v2/iam/grants', 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/iam/grants",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.telnyx.com/v2/iam/grants"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.telnyx.com/v2/iam/grants")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.telnyx.com/v2/iam/grants")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "c93f1a5e-7b24-4d86-9e0a-1f5b3c7d2e48",
"organization_id": "6e9d4c3a-2f8b-4a71-9c05-3b8e1f2d7a64",
"role_id": "8c4a9715-0246-4c6f-9eca-390e13bd8af0",
"principal_type": "service_account",
"principal_id": "e6cd1ff6-6e3a-4ff3-88d5-2234142c1df2",
"record_type": "iam_grant",
"created_at": "2026-11-24T10:22:08.654321Z",
"updated_at": "2026-11-24T10:22:08.654321Z"
},
{
"id": "4b8e2d6f-1a39-4c75-8d02-6e9f3a1c5b74",
"organization_id": "6e9d4c3a-2f8b-4a71-9c05-3b8e1f2d7a64",
"role_id": "3741a8a1-5c2e-4b9d-a7f0-6e1c8d2b4f95",
"principal_type": "user",
"principal_id": "b1d7e2c4-9a3f-4e58-8c61-0f2a7d5e9b13",
"record_type": "iam_grant",
"created_at": "2026-11-22T16:05:40.118734Z",
"updated_at": "2026-11-22T16:05:40.118734Z"
}
],
"meta": {
"page_number": 1,
"page_size": 25,
"total_pages": 1,
"total_results": 2
}
}