Skip to main content
PUT
/
v1
/
roles
/
{id}
Update role
curl --request PUT \
  --url https://api-sandbox.rinne.com.br/core/v1/roles/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "admin",
  "permissions": [
    "user.create",
    "user.read",
    "role.create"
  ],
  "description": "Administrator role with full access"
}
'
{
  "id": "a3dbd0c2-9f79-4f86-8caa-47779b3f2793",
  "name": "admin",
  "permissions": [
    "user.create",
    "user.read",
    "role.create"
  ],
  "created_at": "2024-01-01T00:00:00.000Z",
  "updated_at": "2024-01-01T00:00:00.000Z",
  "description": "Administrator role with full access",
  "company_id": "a3dbd0c2-9f79-4f86-8caa-47779b3f2793",
  "organization_id": "a3dbd0c2-9f79-4f86-8caa-47779b3f2794"
}

Documentation Index

Fetch the complete documentation index at: https://docs.rinne.com.br/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

JWT token for user authentication

Path Parameters

id
string
required

Role ID

Body

application/json

Schema for updating a role

name
string

Role name

Required string length: 1 - 100
Example:

"admin"

permissions
string[]

Array of permission strings

Minimum array length: 1
Example:
["user.create", "user.read", "role.create"]
description
string

Role description

Maximum string length: 500
Example:

"Administrator role with full access"

Response

Role updated successfully

id
string
required

Role ID

Example:

"a3dbd0c2-9f79-4f86-8caa-47779b3f2793"

name
string
required

Role name

Example:

"admin"

permissions
string[]
required

Array of permission strings

Example:
["user.create", "user.read", "role.create"]
created_at
string<date-time>
required

Creation timestamp

Example:

"2024-01-01T00:00:00.000Z"

updated_at
string<date-time>
required

Last update timestamp

Example:

"2024-01-01T00:00:00.000Z"

description
string | null

Role description

Example:

"Administrator role with full access"

company_id
string | null

Company ID for company-specific roles

Example:

"a3dbd0c2-9f79-4f86-8caa-47779b3f2793"

organization_id
string | null

Organization role ID for role inheritance

Example:

"a3dbd0c2-9f79-4f86-8caa-47779b3f2794"