> This page is for Developers.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.emnify.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.emnify.com/_mcp/server.

# Retrieve a role with its permissions

GET https://cdn.emnify.net/api/v1/organisation/{orgId}/role/{roleId}

Required permissions Beta [Learn more](/developers/api-guidelines/permissions#how-permissions-work)`Organisation.Role` + `Get`Roles: Administrator UserReturns a single role with its full permission list.
Works for both system and custom roles.Use `my` in place of a numeric `orgId` to target the caller's own Workspace.

Reference: https://docs.emnify.com/developers/api/permission-and-role-management/get-organisation-role

## Authentication

- `Authorization` header (bearer token, required) — An `auth_token` should be provided to authenticate a session. To obtain an `auth_token`, see the [`/api/v1/authenticate` **POST** request](/developers/api/authentication/authenticate).

## Request

### Path parameters

- `roleId` (integer, required) — Numeric identifier of the role.
- `orgId` (ApiV1OrganisationOrgIdRoleRoleIdGetParametersOrgId, required) — Workspace identifier. Either a positive integer organization ID, or the literal string `my` to target the caller's own Workspace.

## Response

### 200

Successful response.

- `id` (double, required) — Unique role identifier.
- `name` (string, required) — Display name of the role.
- `name_translation_key` (string, required, nullable) — Translation key for the role name. Set for system roles only.
- `description` (string, required) — Human-readable description of the role. An empty string when no description has been set.
- `description_translation_key` (string, required, nullable) — Translation key for the role description. Set for system roles only.
- `user_count` (double, required) — Number of users assigned to this role in the Workspace.
- `type` (enum, required) — Whether this is a system-defined role or an organization's custom role.
  - Allowed values: `system`, `custom`
- `is_system_role` (boolean, required) — True for built-in system roles, which can't be modified or deleted.
- `permissions` (list of RolePermissionOutputDto, optional) — Full list of permissions assigned to this role.

## Errors

### 404 Not Found Error

Role not found.

- `status_code` (integer, optional)
- `message` (string, optional)

## Types

### ApiV1OrganisationOrgIdRoleRoleIdGetParametersOrgId

### RolePermissionOutputDto

- `id` (double, required) — Unique permission identifier.
- `resource` (string, required) — Resource the permission applies to.
- `action` (string, required) — Action the permission grants on the resource.

## Examples

**Response**

```json
{
  "id": 1,
  "name": "Administrator",
  "name_translation_key": "user_role_administrator_name",
  "description": "Full access to all organization features and settings.",
  "description_translation_key": "user_role_administrator_description",
  "user_count": 4,
  "type": "system",
  "is_system_role": true,
  "permissions": [
    {
      "id": 1,
      "resource": "ApiCallback",
      "action": "List"
    },
    {
      "id": 2,
      "resource": "Endpoint",
      "action": "List"
    },
    {
      "id": 3,
      "resource": "Endpoint",
      "action": "Create"
    },
    {
      "id": 4,
      "resource": "Endpoint",
      "action": "Delete"
    },
    {
      "id": 5,
      "resource": "ServicePolicy",
      "action": "List"
    }
  ]
}
```

**SDK Code**

```python Administrator Role
import requests

url = "https://cdn.emnify.net/api/v1/organisation/my/role/12"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript Administrator Role
const url = 'https://cdn.emnify.net/api/v1/organisation/my/role/12';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Administrator Role
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://cdn.emnify.net/api/v1/organisation/my/role/12"

	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(res)
	fmt.Println(string(body))

}
```

```ruby Administrator Role
require 'uri'
require 'net/http'

url = URI("https://cdn.emnify.net/api/v1/organisation/my/role/12")

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
```

```java Administrator Role
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://cdn.emnify.net/api/v1/organisation/my/role/12")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php Administrator Role
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://cdn.emnify.net/api/v1/organisation/my/role/12', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp Administrator Role
using RestSharp;

var client = new RestClient("https://cdn.emnify.net/api/v1/organisation/my/role/12");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift Administrator Role
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://cdn.emnify.net/api/v1/organisation/my/role/12")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```