Skip to content
SynupAPI
Get an API key
GETapi.synup.com/api/v4/roles

List User Roles

This API retrieves a list of all available user roles in the system.

It includes:

  • Role names (e.g., Admin, Manager, Viewer)
  • Permissions associated with each role
  • Role IDs for assignment and management
Requires an API key. Send it as Authorization: API <your-key> — see Getting started.

Request

Request
curl -X GET 'https://api.synup.com/api/v4/roles' \
  -H 'Authorization: API YOUR_API_KEY' \
  -H 'Content-Type: application/json'

Responses

StatusDescription
200Successfully retrieved user roles
401Unauthorized - Authentication required
403Forbidden - Insufficient permissions
Example response
{
  "data": {
    "fetchAccountRoles": [
      {
        "id": "Q3VzdG9tUm9sZToxODE3NzY=",
        "name": "Approval",
        "createdAt": "2025-01-21 19:05:43 UTC",
        "updatedAt": "2025-01-21 19:07:13 UTC"
      },
      {
        "id": "Q3VzdG9tUm9sZTo0NDUyMg==",
        "name": "Admin",
        "createdAt": "2020-02-12 07:27:46 UTC",
        "updatedAt": "2025-01-22 15:24:13 UTC"
      },
      {
        "id": "Q3VzdG9tUm9sZTo0NTI5MQ==",
        "name": "Corporate Role",
        "createdAt": "2020-02-12 07:28:05 UTC",
        "updatedAt": "2025-01-15 06:16:29 UTC"
      }
    ],
    "pagination": {
      "$ref": "#/components/schemas/Pagination"
    }
  }
}

Response body

NameTypeRequiredDescription
dataobjectoptional
data.fetchAccountRolesarray of objectoptional
data.fetchAccountRoles[].idstringrequiredBase64 encoded unique identifier for the role
data.fetchAccountRoles[].namestringrequiredName of the role
data.fetchAccountRoles[].createdAtstringrequiredRole creation timestamp
data.fetchAccountRoles[].updatedAtstringrequiredRole last update timestamp