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

# Get role by ID

GET https://api-dev.houseofapps.ai/v1/integrations/roles/{role_id}

Get role details with permissions.

Reference: https://docs.houseofapps.ai/api-reference/overview/platform/roles/external-get-role-from-id-v-1-integrations-roles-role-id-get

## Request

### Path parameters

- `role_id` (string, required) — The UUID of the role to get

### Headers

- `licenseKey` (string, required)
- `appSecret` (string, required)

## Response

### 200

OK

- `message` (string, required) — Response message describing the operation result
- `role` (RoleDetailItem, required) — Detailed role information with permissions

## Errors

### 400 Bad Request Error

Bad Request

- `status` (string, required) — Response status
- `message` (string, required) — Human-readable error message
- `statusCode` (integer, required) — HTTP status code
- `code` (string, required) — Custom application status code
- `messageKey` (string, optional) — i18n key for the message
- `errors` (list of map from string to any, optional) — Optional field-level validation errors

### 401 Unauthorized Error

Unauthorized

- `status` (string, required) — Response status
- `message` (string, required) — Human-readable error message
- `statusCode` (integer, required) — HTTP status code
- `code` (string, required) — Custom application status code
- `messageKey` (string, optional) — i18n key for the message
- `errors` (list of map from string to any, optional) — Optional field-level validation errors

### 403 Forbidden Error

Forbidden

- `status` (string, required) — Response status
- `message` (string, required) — Human-readable error message
- `statusCode` (integer, required) — HTTP status code
- `code` (string, required) — Custom application status code
- `messageKey` (string, optional) — i18n key for the message
- `errors` (list of map from string to any, optional) — Optional field-level validation errors

### 404 Not Found Error

Not Found

- `status` (string, required) — Response status
- `message` (string, required) — Human-readable error message
- `statusCode` (integer, required) — HTTP status code
- `code` (string, required) — Custom application status code
- `messageKey` (string, optional) — i18n key for the message
- `errors` (list of map from string to any, optional) — Optional field-level validation errors

### 409 Conflict Error

Conflict

- `status` (string, required) — Response status
- `message` (string, required) — Human-readable error message
- `statusCode` (integer, required) — HTTP status code
- `code` (string, required) — Custom application status code
- `messageKey` (string, optional) — i18n key for the message
- `errors` (list of map from string to any, optional) — Optional field-level validation errors

### 422 Unprocessable Entity Error

Unprocessable Entity

- `status` (string, required) — Response status
- `message` (string, required) — Human-readable error message
- `statusCode` (integer, required) — HTTP status code
- `code` (string, required) — Custom application status code
- `messageKey` (string, optional) — i18n key for the message
- `errors` (list of map from string to any, optional) — Optional field-level validation errors

### 429 Too Many Requests Error

Too Many Requests

- `status` (string, required) — Response status
- `message` (string, required) — Human-readable error message
- `statusCode` (integer, required) — HTTP status code
- `code` (string, required) — Custom application status code
- `messageKey` (string, optional) — i18n key for the message
- `errors` (list of map from string to any, optional) — Optional field-level validation errors

### 500 Internal Server Error

Internal Server Error

- `status` (string, required) — Response status
- `message` (string, required) — Human-readable error message
- `statusCode` (integer, required) — HTTP status code
- `code` (string, required) — Custom application status code
- `messageKey` (string, optional) — i18n key for the message
- `errors` (list of map from string to any, optional) — Optional field-level validation errors

### 503 Service Unavailable Error

Service Unavailable

- `status` (string, required) — Response status
- `message` (string, required) — Human-readable error message
- `statusCode` (integer, required) — HTTP status code
- `code` (string, required) — Custom application status code
- `messageKey` (string, optional) — i18n key for the message
- `errors` (list of map from string to any, optional) — Optional field-level validation errors

## Types

### RoleDetailItem

Model for detailed role information with permissions Attributes: id (str): Unique identifier for the role name (str): Human-readable name of the role description (Optional[str]): Description of the role is_default (bool): Whether this is a system role (True) or custom role (False) created_at (str): ISO timestamp when role was created updated_at (str): ISO timestamp when role was last updated permissions (List[PermissionItem]): List of permissions assigned to this role

- `id` (string, required) — Unique identifier for the role
- `name` (string, required) — Human-readable name of the role
- `is_default` (boolean, required) — Whether this is a system role (True) or custom role (False)
- `created_at` (string, required) — ISO timestamp when role was created
- `updated_at` (string, required) — ISO timestamp when role was last updated
- `permissions` (list of PermissionItem, required) — List of permissions assigned to this role
- `description` (string, optional, nullable) — Description of the role

### PermissionItem

Model for permission information in lists Attributes: id (str): Unique identifier for the permission name (str): Human-readable name of the permission code (str): Unique code for the permission category (Optional[str]): Category grouping for the permission description (Optional[str]): Description of the permission created_at (str): ISO timestamp when permission was created

- `id` (string, required) — Unique identifier for the permission
- `name` (string, required) — Human-readable name of the permission
- `code` (string, required) — Unique code for the permission
- `created_at` (string, required) — ISO timestamp when permission was created
- `category` (string, optional, nullable) — Category grouping for the permission
- `description` (string, optional, nullable) — Description of the permission

## Examples

**Response**

```json
{
  "message": "Role details retrieved successfully",
  "role": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "name": "Administrator",
    "is_default": true,
    "created_at": "2024-12-20T10:00:00Z",
    "updated_at": "2024-12-19T12:00:00Z",
    "permissions": [],
    "description": "This role can manage users and permissions."
  }
}
```

**SDK Code**

```python
import requests

url = "https://api-dev.houseofapps.ai/v1/integrations/roles/role_id"

headers = {
    "appSecret": "appSecret",
    "licenseKey": "licenseKey"
}

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

print(response.json())
```

```javascript
const url = 'https://api-dev.houseofapps.ai/v1/integrations/roles/role_id';
const options = {method: 'GET', headers: {appSecret: 'appSecret', licenseKey: 'licenseKey'}};

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

```go
package main

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

func main() {

	url := "https://api-dev.houseofapps.ai/v1/integrations/roles/role_id"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("appSecret", "appSecret")
	req.Header.Add("licenseKey", "licenseKey")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

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

url = URI("https://api-dev.houseofapps.ai/v1/integrations/roles/role_id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["appSecret"] = 'appSecret'
request["licenseKey"] = 'licenseKey'

response = http.request(request)
puts response.read_body
```

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

HttpResponse<String> response = Unirest.get("https://api-dev.houseofapps.ai/v1/integrations/roles/role_id")
  .header("appSecret", "appSecret")
  .header("licenseKey", "licenseKey")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api-dev.houseofapps.ai/v1/integrations/roles/role_id', [
  'headers' => [
    'appSecret' => 'appSecret',
    'licenseKey' => 'licenseKey',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api-dev.houseofapps.ai/v1/integrations/roles/role_id");
var request = new RestRequest(Method.GET);
request.AddHeader("appSecret", "appSecret");
request.AddHeader("licenseKey", "licenseKey");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "appSecret": "appSecret",
  "licenseKey": "licenseKey"
]

let request = NSMutableURLRequest(url: NSURL(string: "https://api-dev.houseofapps.ai/v1/integrations/roles/role_id")! 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()
```