> ## Documentation Index
> Fetch the complete documentation index at: https://docs.y.uno/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Test in the sandbox first: base URL https://api-sandbox.y.uno (Test Mode in the Dashboard). Production is https://api.y.uno (Live Mode).
> Every API request needs the public-api-key and private-secret-key headers. Get them in the Dashboard at https://dashboard.y.uno/developers (Developers > Credentials); sandbox and production keys are different.
> Send an X-Idempotency-Key (a UUID) when creating payments, refunds and cancels, so retries do not create duplicates.
> Start with the Quickstart (https://docs.y.uno/docs/quickstart.md) and the agent guide (https://docs.y.uno/agents.md). To search these docs from a coding agent, connect the docs MCP server at https://docs.y.uno/mcp.

# Actualizar un rol

> Actualiza parcialmente los permisos de un rol personalizado sin cambiar su tipo de rol

Actualización parcial de un rol personalizado. Ten en cuenta que `role_type` es inmutable: un rol con alcance `account` no puede convertirse a alcance `organization`, ni viceversa. En su lugar, crea un nuevo rol con el `role_type` deseado. Consulta [Crear un rol](https://docs.y.uno/es/reference/organizations/create-role.md).


## OpenAPI

````yaml openapi/es/organizations/update-role.json PATCH /organizations/roles/{role_id}
openapi: 3.1.0
info:
  title: Roles API - Update
  version: 1.0.0
servers:
  - url: https://api-sandbox.y.uno/v1
    description: Sandbox
  - url: https://api.y.uno/v1
    description: Production (US)
security:
  - sec0: []
    sec1: []
paths:
  /organizations/roles/{role_id}:
    patch:
      summary: Actualizar un rol
      description: >-
        Actualización parcial de un rol personalizado. Nota: role_type es
        inmutable.
      operationId: update-role
      parameters:
        - name: role_id
          in: path
          required: true
          schema:
            type: string
          description: El identificador único del rol.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  maxLength: 255
                description:
                  type: string
                  maxLength: 1024
                permission_ids:
                  type: array
                  items:
                    type: string
                testing_permission_ids:
                  type: array
                  items:
                    type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  name:
                    type: string
                  description:
                    type: string
                    nullable: true
                  admin:
                    type: boolean
                  permission_ids:
                    type: array
                    items:
                      type: string
                  testing_permission_ids:
                    type: array
                    items:
                      type: string
                  role_type:
                    type: string
                  created_at:
                    type: string
                    format: date-time
                  updated_at:
                    type: string
                    format: date-time
        '400':
          description: 'Solicitud incorrecta: error de validación'
        '404':
          description: 'No encontrado: el rol no se encontró en la organización'
components:
  securitySchemes:
    sec0:
      type: apiKey
      in: header
      name: PUBLIC-API-KEY
      x-default: <Your PUBLIC-API-KEY>
    sec1:
      type: apiKey
      in: header
      name: PRIVATE-SECRET-KEY
      x-default: <Your PRIVATE-SECRET-KEY>

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.