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

# Actualizar evento

> Cambia nombre o ajustes de un evento.



## OpenAPI

````yaml /es/automations-api/api-reference/openapi-automations.json patch /v1/events/{eventId}
openapi: 3.0.3
info:
  title: 'Notifique API v1: Automatizaciones y eventos'
  version: 1.0.0
  description: >-
    Definición de **eventos** (nombre + esquema `payload` opcional),
    **automatizaciones** como gráfico (activador por evento o **mensaje
    entrante** en un canal, retrasos, condiciones, incluido **`source:
    "message"`** en entrante, **`endFlow`** para finalizar una sucursal, envíos
    multicanal, actualizaciones de contactos, etc.) y **activador** mediante
    `POST /v1/events/send`. Autenticación: encabezado `Authorization: Bearer
    sk_live_...` o `x-api-key`. Todos los cuerpos usan **camelCase**.


    **Alcances:** `events:read` | `events:write` | `automations:read` |
    `automations:write`. Los pasos de envío (`sendTemplate`, correos
    electrónicos directos, etc.) aún requieren las claves de envío del canal
    correspondiente.


    **Paginación:** consulta `page` (≥1, predeterminado 1) y `limit` (1 a 100,
    predeterminado 20), como cadenas o números coherentes.


    **Espacio de trabajo bloqueado** devuelve **402** con `Payment Required`.


    **Incorporación:** en cualquier ruta `/v1`, si la incorporación está
    incompleta, el middleware devuelve **403** con `code: ONBOARDING_REQUIRED`
    (cuerpo similar a otros 403).
servers:
  - url: https://api.notifique.dev
    description: Producción
security:
  - ntfAutoBearerAuth: []
  - ntfAutoApiKeyHeader: []
tags:
  - name: Eventos
    description: CRUD de configuración de eventos + disparador `POST /v1/events/send`.
  - name: Automatizaciones
    description: CRUD de automatizaciones, listado de parada y ejecución.
  - name: Runs
    description: Historial y detalles de ejecuciones (`AutomationRun` + pasos).
paths:
  /v1/events/{eventId}:
    patch:
      tags:
        - Eventos
      summary: Actualizar evento
      description: Cambia nombre o ajustes de un evento.
      operationId: ntfAuto_patchEvent
      parameters:
        - $ref: '#/components/parameters/NtfAuto_eventId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NtfAuto_EventPatchBody'
      responses:
        '200':
          $ref: '#/components/responses/NtfAuto_EventPatch200'
        '400':
          $ref: '#/components/responses/NtfAuto_EventPatch400'
        '401':
          $ref: '#/components/responses/NtfAuto_401'
        '402':
          $ref: '#/components/responses/NtfAuto_402'
        '403':
          $ref: '#/components/responses/NtfAuto_403EventsWrite'
        '404':
          $ref: '#/components/responses/NtfAuto_EventNotFound'
        '409':
          $ref: '#/components/responses/NtfAuto_EventNameConflict'
components:
  parameters:
    NtfAuto_eventId:
      name: eventId
      in: path
      required: true
      schema:
        type: string
      description: Ocúpate del registro `AutomationEvent`.
  schemas:
    NtfAuto_EventPatchBody:
      type: object
      properties:
        name:
          type: string
          minLength: 1
          maxLength: 256
        schemaJson:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/NtfAuto_EventPayloadSchema'
    NtfAuto_EventPayloadSchema:
      type: object
      additionalProperties:
        type: string
        enum:
          - string
          - number
          - boolean
          - date
        description: '`date`: cadena ISO-8601 analizable en el disparador.'
      description: 'Objeto plano: nombre de campo → tipo esperado en `payload`.'
    NtfAuto_EventPatchResponse:
      type: object
      required:
        - success
        - data
      properties:
        success:
          type: boolean
          enum:
            - true
        data:
          type: object
          required:
            - id
            - name
            - schemaJson
            - updatedAt
          properties:
            id:
              type: string
            name:
              type: string
            schemaJson:
              nullable: true
              type: object
              additionalProperties:
                type: string
            updatedAt:
              type: string
              format: date-time
    NtfAuto_ErrorWithOptionalCode:
      type: object
      required:
        - success
        - error
      properties:
        success:
          type: boolean
          enum:
            - false
        error:
          type: string
        message:
          type: string
        code:
          type: string
    NtfAuto_ErrorEnvelope401:
      type: object
      required:
        - success
        - error
        - message
      properties:
        success:
          type: boolean
          enum:
            - false
        error:
          type: string
          example: Unauthorized
        message:
          type: string
    NtfAuto_ErrorPaymentRequired:
      type: object
      required:
        - success
        - error
        - message
      properties:
        success:
          type: boolean
          enum:
            - false
        error:
          type: string
          enum:
            - Payment Required
        message:
          type: string
          example: Plan expired or suspended
    NtfAuto_ErrorForbiddenScope:
      type: object
      required:
        - success
        - error
        - message
      properties:
        success:
          type: boolean
          enum:
            - false
        error:
          type: string
          enum:
            - Forbidden
        message:
          type: string
    NtfAuto_ErrorNotFound:
      type: object
      required:
        - success
        - error
        - message
      properties:
        success:
          type: boolean
          enum:
            - false
        error:
          type: string
          enum:
            - Not Found
        message:
          type: string
    NtfAuto_ErrorConflict:
      type: object
      required:
        - success
        - error
        - message
      properties:
        success:
          type: boolean
          enum:
            - false
        error:
          type: string
          enum:
            - Conflict
        message:
          type: string
  responses:
    NtfAuto_EventPatch200:
      description: Actualizado.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/NtfAuto_EventPatchResponse'
    NtfAuto_EventPatch400:
      description: Nombre no válido o esquema no válido.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/NtfAuto_ErrorWithOptionalCode'
    NtfAuto_401:
      description: >-
        Clave faltante o no válida. En el middleware global de `/v1` también
        ocurre cuando no hay una clave API.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/NtfAuto_ErrorEnvelope401'
          examples:
            route:
              value:
                success: false
                error: Unauthorized
                message: Invalid or missing API Key
                code: UNAUTHORIZED
            middleware:
              value:
                success: false
                error: Unauthorized
                message: >-
                  API Key is required. Provide Authorization: Bearer <key> or
                  x-api-key header.
                code: UNAUTHORIZED
    NtfAuto_402:
      description: Plano caducado o espacio de trabajo suspendido.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/NtfAuto_ErrorPaymentRequired'
          example:
            success: false
            error: Payment Required
            message: Plan expired or suspended
            code: WORKSPACE_BLOCKED
    NtfAuto_403EventsWrite:
      description: Sin alcance `events:write`.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/NtfAuto_ErrorForbiddenScope'
          example:
            success: false
            error: Forbidden
            message: 'Missing scope: events:write'
            code: FORBIDDEN
    NtfAuto_EventNotFound:
      description: El evento no existe o ya ha sido eliminado.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/NtfAuto_ErrorNotFound'
          example:
            success: false
            error: Not Found
            message: Event not found
            code: NOT_FOUND
    NtfAuto_EventNameConflict:
      description: Ya existe un evento con el mismo nombre en el espacio de trabajo.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/NtfAuto_ErrorConflict'
          example:
            success: false
            error: Conflict
            message: An event with this name already exists
            code: CONFLICT
  securitySchemes:
    ntfAutoBearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: '`Authorization: Bearer sk_live_...`'
    ntfAutoApiKeyHeader:
      type: apiKey
      in: header
      name: x-api-key
      description: Mismo valor de clave, sin prefijo de portador.

````