Skip to main content

Get Company Custom Roles

GET/companies/{id}/custom-roles
Agency-scoped keys

This endpoint is not available for agency-scoped API keys.

Summary​

Returns a paginated list of custom roles for a company within the API key scope. Requires read:companies.

Each custom role has a base role of projectRequestor, projectApprover, or projectFinance. Use the returned id as companyRoleId when creating a user. Use the portal to change an existing user's custom role assignment.

URL Parameters​

NameTypeRequiredDescription
idstringYesCompany ObjectId or reference

Query Parameters​

NameTypeRequiredDescription
pageintegerNoPage number (default 1)
limitintegerNoRecords per page (default 50, max 200)
querystringNoCase-insensitive search against custom role name
sortByenum(createdAt, updatedAt, name)NoSort field (default name)
sortOrderenum(asc, desc)NoSort direction (default asc)
fieldsstringNoComma-separated list of response fields to return

Request Example​

curl -X GET 'https://api.requidex.com/api/open/v1/companies/{id}/custom-roles' \
-H 'Authorization: Bearer <API_KEY>' \
-H 'Accept: application/json'

Response Fields​

FieldTypeDescription
idstringCustom role ObjectId
namestringCustom role name
rolestringBase role: projectRequestor, projectApprover, or projectFinance
companystringCompany ObjectId
createdAtstringCreation timestamp
updatedAtstringLast update timestamp

Response Example (200)​

{
"success": true,
"data": [
{
"id": "507f1f77bcf86cd799439019",
"name": "Supervisor",
"company": "507f1f77bcf86cd799439011",
"role": "projectApprover",
"createdAt": "2026-01-10T12:00:00.000Z",
"updatedAt": "2026-02-20T14:03:12.111Z"
}
],
"meta": { "page": 1, "limit": 50, "total": 1 }
}

MCP Tool​

The MCP server exposes this operation as open_api_list_company_custom_roles with the inputs id, page, limit, query, sortBy, sortOrder, and fields.

Errors​

HTTP StatusDescription
400Invalid filters or parameters
401Missing, invalid, revoked, or expired API key
403Missing scope, IP restriction, or agency-scoped key
404Company not found within the key scope
405Method not allowed on Open API routes
429Rate limit exceeded
500Failed to fetch company custom roles