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

# Update an IRRF command (e.g. re-learn)



## OpenAPI

````yaml https://portal.unicontrol.me/v1/openapi put /v1/irrf-commands/{id}
openapi: 3.1.0
info:
  title: Unicontrol API
  description: Welcome
  version: 1.0.0
servers:
  - url: http://0.0.0.0:3000
    description: Local Server
  - url: https://portal.test.flexhome.casa
    description: Development
  - url: https://portal.unicontrol.me
    description: Production
security:
  - bearerAuth: []
paths:
  /v1/irrf-commands/{id}:
    put:
      tags:
        - IRRF Commands
      summary: Update an IRRF command (e.g. re-learn)
      operationId: putV1Irrf-commandsById
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: integer
          description: ID numérico do comando
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                code:
                  type: string
                  description: Novo código IR
                command_name:
                  type: string
                  description: Novo nome do comando
                remote_entity_id:
                  type: string
                  description: Novo blaster IR
            example:
              code: 0000 006C updated...
              command_name: power
      responses:
        '200':
          description: Command updated
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                  entity_registry_id:
                    type: integer
                  config_entry_id:
                    type: integer
                  command_name:
                    type: string
                  code:
                    type: string
                  remote_entity_id:
                    type: string
                  user_id:
                    type: string
              example:
                id: 1
                entity_registry_id: 5
                config_entry_id: 2
                command_name: power
                code: 0000 006C 0022 0002...
                remote_entity_id: remote.ir_blaster
                user_id: user_abc123
        '401':
          description: Não autenticado
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
              example:
                error: unauthorized
        '404':
          description: Recurso não encontrado
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
              example:
                message: not found
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````