Skip to main content
GET
/
v1
/
organizations
/
{organizationId}
/
roles
/
{id}
/
users
List Role Users
curl --request GET \
  --url https://api.example.com/v1/organizations/{organizationId}/roles/{id}/users

Path Parameters

organizationId
string
required
Organization ID
id
string
required
Role ID

Response

Returns an array of User objects assigned to the role.
{
  "data": [
    {
      "id": "user123",
      "email": "[email protected]",
      "name": "Jane Doe",
      "status": "active",
      "createdAt": "2024-03-20T10:00:00Z"
    },
    {
      "id": "user456",
      "email": "[email protected]",
      "name": "John Smith",
      "status": "active",
      "createdAt": "2024-03-21T10:00:00Z"
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 20,
    "total": 2,
    "pages": 1
  }
}

Error Responses

Role Not Found

{
  "error": {
    "code": "NOT_FOUND",
    "message": "Role not found"
  }
}

Code Examples

curl -X GET "https://api.metabind.ai/v1/organizations/org123/roles/role123/users" \
  -H "Authorization: Bearer YOUR_API_KEY"