> ## 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.

# Reemplazar permisos de cuenta de un usuario

> Reemplaza todas las asignaciones de permisos de cuenta de un usuario por un conjunto nuevo

Reemplaza todas las asignaciones de permisos de cuenta de un usuario. Es un reemplazo completo: cualquier permiso de cuenta existente que no se incluya en la solicitud se eliminará.


## OpenAPI

````yaml openapi/es/organizations/replace-user-account-permissions.json PUT /organizations/users/{user_id}/account-permissions
openapi: 3.1.0
info:
  title: User Account Permissions API - Replace
  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/users/{user_id}/account-permissions:
    put:
      summary: Reemplazar los permisos de cuentas de un usuario
      description: >-
        Reemplaza todas las asignaciones de permisos de cuentas de un usuario.
        Es un reemplazo completo.
      operationId: replace-user-account-permissions
      parameters:
        - name: user_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: UUID del usuario.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - account_permissions
              properties:
                account_permissions:
                  type: array
                  items:
                    type: object
                    required:
                      - account_id
                      - role_id
                    properties:
                      account_id:
                        type: string
                        format: uuid
                      role_id:
                        type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  user_id:
                    type: string
                    format: uuid
                  account_permissions:
                    type: array
                    items:
                      type: object
                      properties:
                        account_id:
                          type: string
                          format: uuid
                        account_name:
                          type: string
                        role_id:
                          type: string
                        role_name:
                          type: string
                        account_group_id:
                          type:
                            - string
                            - 'null'
                          format: uuid
                          description: >-
                            Se establece cuando el acceso proviene de la
                            concesión de un grupo de cuentas, `null` en caso
                            contrario.
                  updated_at:
                    type:
                      - string
                      - 'null'
                    format: date-time
              example:
                user_id: bf3d9b16-1523-4a48-a425-95cb7dc426cc
                account_permissions:
                  - account_id: a858ec8f-cb93-45c0-ad61-b9fa1f893b72
                    account_name: Account 1
                    role_id: rol_sAnEykYxo6e4x2wY
                    role_name: Admin
                    account_group_id: null
                updated_at: null
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.