# Create role This endpoint is used to create user roles. Endpoint: POST /v3/roles Version: v3 Security: Bearer ## Request fields (application/json): - `name` (string, required) Name of the role. Example: "User Admin" - `description` (string, required) A short description of the role mentioning what can it do. Example: "Manage users for the company." - `isPlatformRole` (boolean, required) Whether role is platform provided. - `companyId` (string) Company ID which owns the role. Example: "1aeef911-44cf-49bb-83c7-e06b0d4e7ac2" - `permissions` (array, required) Permissions granted to the role. - `permissions.permission` (string, required) Permission Enum: "PLATFORM_MANAGEMENT", "TMC_MANAGEMENT", "COMPANY_MANAGEMENT", "USER_MANAGEMENT", "USER_PROFILE", "EVENT_MANAGEMENT", "REPORT_MANAGEMENT", "ACCESS_MANAGEMENT", "TRIP_MANAGEMENT", "AGENT", "DEVELOPER_PLATFORM_MANAGEMENT", "THIRD_PARTY_NOTIFICATION_MANAGEMENT" - `permissions.actions` (array, required) Actions allowed on the permission like read/write/delete. Enum: "ALL", "CREATE", "READ", "WRITE", "DELETE", "PURGE" ## Response 200 fields (application/json): - `id` (string, required) Example: "b93dc51f-12dd-46c7-b7d6-1cb12cd3f5b3" ## Response 400 fields (application/json): - `debugIdentifier` (string) Link to debug the error internally. - `errorMessages` (array) - `errorMessages.errorCode` (string) Error code to identify the specific errors. - `errorMessages.message` (string) Message containing details of error. - `errorMessages.errorParameters` (array) Error message parameters. - `errorMessages.errorParameters.name` (string) Parameter name - `errorMessages.errorParameters.value` (string) Parameter value - `errorMessages.errorDetail` (string) More details about the error. ## Response 401 fields (application/json): - `debugIdentifier` (string) Link to debug the error internally. - `errorMessages` (array) - `errorMessages.errorCode` (string) Error code to identify the specific errors. - `errorMessages.message` (string) Message containing details of error. - `errorMessages.errorParameters` (array) Error message parameters. - `errorMessages.errorParameters.name` (string) Parameter name - `errorMessages.errorParameters.value` (string) Parameter value - `errorMessages.errorDetail` (string) More details about the error. ## Response 403 fields (application/json): - `debugIdentifier` (string) Link to debug the error internally. - `errorMessages` (array) - `errorMessages.errorCode` (string) Error code to identify the specific errors. - `errorMessages.message` (string) Message containing details of error. - `errorMessages.errorParameters` (array) Error message parameters. - `errorMessages.errorParameters.name` (string) Parameter name - `errorMessages.errorParameters.value` (string) Parameter value - `errorMessages.errorDetail` (string) More details about the error.