Role
Retrieve a list of roles
Lists the roles available to the account. This includes the roles created by the account along with the shared system roles, such as the built in admin role.
Set the system query parameter to false to return only the roles created by
the account.
Permissions
| Resource | Permission | Usage |
|---|---|---|
role | read | Lists the roles for the account |
GET
/
v3
/
auth
/
role
Retrieve a list of roles
curl --request GET \
--url https://api.mezmo.com/v3/auth/role \
--header 'Authorization: <api-key>'import requests
url = "https://api.mezmo.com/v3/auth/role"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.mezmo.com/v3/auth/role', 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.mezmo.com/v3/auth/role",
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: <api-key>"
],
]);
$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.mezmo.com/v3/auth/role"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
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.mezmo.com/v3/auth/role")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mezmo.com/v3/auth/role")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"meta": {
"type": "<string>",
"page": {
"next": "<string>",
"previous": "<string>"
},
"pk": "<string>",
"links": {
"self": {
"list": {
"method": "get",
"uri": "https://api.mezmo.com/v3/auth/resource"
},
"detail": {
"method": "get",
"uri": "https://api.mezmo.com/v3/auth/resource/{resource_id}"
},
"update": {
"method": "patch",
"uri": "https://api.mezmo.com/v3/auth/resource/{resource_id}"
},
"replace": {
"method": "put",
"uri": "https://api.mezmo.com/v3/auth/resource/{resource_id}"
},
"create": {
"method": "post",
"uri": "https://api.mezmo.com/v3/auth/resource"
}
},
"related": {}
}
},
"data": [
{
"role_id": "5b7ca8b2b59ba49d58cc79ac",
"name": "Support",
"slug": "support",
"roles": [
"5b8fa85cb59ba49d588942b3"
],
"created_at": "2026-01-15T12:00:00.000Z",
"modified_at": "2026-01-15T12:00:00.000Z",
"account_id": "5b7180e8b59ba49d5883e7bd",
"system": false,
"internal": false,
"permissions": {
"view": {
"read": true,
"write": true,
"manage": false
}
},
"context_filter": [
"namespace:(default OR support) level:-debug",
"app:-secret"
]
}
]
}{
"status": 449,
"code": "<string>",
"message": "<string>",
"context": "body",
"errors": [
{
"keyword": "<string>",
"params": {},
"message": "<string>",
"instance_path": null,
"schema_path": null,
"property_name": null
}
]
}{
"status": 449,
"code": "<string>",
"message": "<string>",
"context": "body",
"errors": [
{
"keyword": "<string>",
"params": {},
"message": "<string>",
"instance_path": null,
"schema_path": null,
"property_name": null
}
]
}{
"status": 449,
"code": "<string>",
"message": "<string>",
"context": "body",
"errors": [
{
"keyword": "<string>",
"params": {},
"message": "<string>",
"instance_path": null,
"schema_path": null,
"property_name": null
}
]
}{
"status": 449,
"code": "<string>",
"message": "<string>",
"context": "body",
"errors": [
{
"keyword": "<string>",
"params": {},
"message": "<string>",
"instance_path": null,
"schema_path": null,
"property_name": null
}
]
}{
"status": 449,
"code": "<string>",
"message": "<string>",
"context": "body",
"errors": [
{
"keyword": "<string>",
"params": {},
"message": "<string>",
"instance_path": null,
"schema_path": null,
"property_name": null
}
]
}{
"status": 449,
"code": "<string>",
"message": "<string>",
"context": "body",
"errors": [
{
"keyword": "<string>",
"params": {},
"message": "<string>",
"instance_path": null,
"schema_path": null,
"property_name": null
}
]
}{
"status": 449,
"code": "<string>",
"message": "<string>",
"context": "body",
"errors": [
{
"keyword": "<string>",
"params": {},
"message": "<string>",
"instance_path": null,
"schema_path": null,
"property_name": null
}
]
}{
"status": 449,
"code": "<string>",
"message": "<string>",
"context": "body",
"errors": [
{
"keyword": "<string>",
"params": {},
"message": "<string>",
"instance_path": null,
"schema_path": null,
"property_name": null
}
]
}Authorizations
The primary authentication method for the Mezmo API.
Pass the key in the Authorization header in the format Token <ACCESS TOKEN>.
For example:
curl -H 'Authorization: Token <ACCESS TOKEN>'
This key is used for all APIs with the exception of ingest.
Query Parameters
Whether to include system roles
Response
Response format containing a list of roles both shared and organizational roles, in addition to the standard metadata object.
Response format containing a list of roles both shared and organizational roles, in addition to the standard metadata object.
Was this page helpful?
Retrieve a list of roles
curl --request GET \
--url https://api.mezmo.com/v3/auth/role \
--header 'Authorization: <api-key>'import requests
url = "https://api.mezmo.com/v3/auth/role"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.mezmo.com/v3/auth/role', 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.mezmo.com/v3/auth/role",
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: <api-key>"
],
]);
$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.mezmo.com/v3/auth/role"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
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.mezmo.com/v3/auth/role")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mezmo.com/v3/auth/role")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"meta": {
"type": "<string>",
"page": {
"next": "<string>",
"previous": "<string>"
},
"pk": "<string>",
"links": {
"self": {
"list": {
"method": "get",
"uri": "https://api.mezmo.com/v3/auth/resource"
},
"detail": {
"method": "get",
"uri": "https://api.mezmo.com/v3/auth/resource/{resource_id}"
},
"update": {
"method": "patch",
"uri": "https://api.mezmo.com/v3/auth/resource/{resource_id}"
},
"replace": {
"method": "put",
"uri": "https://api.mezmo.com/v3/auth/resource/{resource_id}"
},
"create": {
"method": "post",
"uri": "https://api.mezmo.com/v3/auth/resource"
}
},
"related": {}
}
},
"data": [
{
"role_id": "5b7ca8b2b59ba49d58cc79ac",
"name": "Support",
"slug": "support",
"roles": [
"5b8fa85cb59ba49d588942b3"
],
"created_at": "2026-01-15T12:00:00.000Z",
"modified_at": "2026-01-15T12:00:00.000Z",
"account_id": "5b7180e8b59ba49d5883e7bd",
"system": false,
"internal": false,
"permissions": {
"view": {
"read": true,
"write": true,
"manage": false
}
},
"context_filter": [
"namespace:(default OR support) level:-debug",
"app:-secret"
]
}
]
}{
"status": 449,
"code": "<string>",
"message": "<string>",
"context": "body",
"errors": [
{
"keyword": "<string>",
"params": {},
"message": "<string>",
"instance_path": null,
"schema_path": null,
"property_name": null
}
]
}{
"status": 449,
"code": "<string>",
"message": "<string>",
"context": "body",
"errors": [
{
"keyword": "<string>",
"params": {},
"message": "<string>",
"instance_path": null,
"schema_path": null,
"property_name": null
}
]
}{
"status": 449,
"code": "<string>",
"message": "<string>",
"context": "body",
"errors": [
{
"keyword": "<string>",
"params": {},
"message": "<string>",
"instance_path": null,
"schema_path": null,
"property_name": null
}
]
}{
"status": 449,
"code": "<string>",
"message": "<string>",
"context": "body",
"errors": [
{
"keyword": "<string>",
"params": {},
"message": "<string>",
"instance_path": null,
"schema_path": null,
"property_name": null
}
]
}{
"status": 449,
"code": "<string>",
"message": "<string>",
"context": "body",
"errors": [
{
"keyword": "<string>",
"params": {},
"message": "<string>",
"instance_path": null,
"schema_path": null,
"property_name": null
}
]
}{
"status": 449,
"code": "<string>",
"message": "<string>",
"context": "body",
"errors": [
{
"keyword": "<string>",
"params": {},
"message": "<string>",
"instance_path": null,
"schema_path": null,
"property_name": null
}
]
}{
"status": 449,
"code": "<string>",
"message": "<string>",
"context": "body",
"errors": [
{
"keyword": "<string>",
"params": {},
"message": "<string>",
"instance_path": null,
"schema_path": null,
"property_name": null
}
]
}{
"status": 449,
"code": "<string>",
"message": "<string>",
"context": "body",
"errors": [
{
"keyword": "<string>",
"params": {},
"message": "<string>",
"instance_path": null,
"schema_path": null,
"property_name": null
}
]
}
