> For the complete documentation index, see [llms.txt](https://docs.violetlabs.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.violetlabs.com/es/funciones/api/webhooks-salientes/especificacion-openapi.md).

# Especificación OpenAPI

La solicitud que Violet envía a tu endpoint, como un documento de webhooks de OpenAPI 3.1.

Importa esta especificación en tus herramientas de API o genera tipos de receptor a partir de ella. La [Referencia de la carga útil](https://docs.violetlabs.com/features/api/outbound-webhooks/payload-reference) la página la renderiza, y puedes descargarla desde [openapi.gitbook.com](https://openapi.gitbook.com/o/lYcjJh2JWTqyhBJIaiRt/spec/violet-outbound-webhooks.yaml).

```yaml
openapi: 3.1.0
info:
  title: Webhooks salientes de Violet
  version: 1.0.0
  summary: La solicitud que Violet envía a tu endpoint de webhook.
  description: |
    Violet envía un `POST` JSON firmado y por lotes a tu endpoint HTTPS cuando
    cambian las entidades vigiladas. Las cargas útiles solo llevan IDs; lee los detalles a través de la
    API de Violet con una clave de API.

    Verifica `Violet-Signature` contra el cuerpo sin procesar antes de analizarlo: `v1` es un
    HMAC-SHA256 hexadecimal de `<t>.<raw body>`, firmado con el secreto de
    firma del webhook (incluido su prefijo `whsec_`). Acepta la solicitud si algún `v1`
    coincide.

    La entrega es como mínimo una vez y en orden por webhook. Deduplica por
    `eventId` y por `Violet-Delivery-Id`.
  contact:
    name: Violet Labs
    url: https://docs.violetlabs.com
servers:
  - url: https://{yourEndpoint}
    description: Tu receptor. Violet publica en la URL del endpoint configurada en el webhook.
    variables:
      yourEndpoint:
        default: example.com/hooks/violet
tags:
  - name: Webhooks salientes
    description: Solicitudes que Violet envía a tu endpoint.
security:
  - violetSignature: []
webhooks:
  violetEvents:
    post:
      operationId: receiveVioletWebhook
      tags: [Webhooks salientes]
      summary: Un lote de eventos de cambio
      description: |
        Enviado a la URL del endpoint configurada en el webhook. Una solicitud lleva
        de 1 a 500 eventos, todos del mismo sistema de origen. Responde con cualquier 2xx
        dentro de 10 segundos.
      parameters:
        - name: Violet-Signature
          in: header
          required: true
          description: |
            `t=<unix seconds>,v1=<hex>[,v1=<hex>]`. `t` es el momento de este
            intento y cambia en cada reintento. Durante las 24 horas posteriores a una
            rotación de secreto hay dos valores `v1` (el secreto nuevo y el antiguo).
          schema:
            type: string
            pattern: '^t=\d+(,v1=[0-9a-f]{64})+$'
          example: t=1792951514,v1=8f3a0c5e7b1d9f2a4c6e8b0d2f4a6c8e0b2d4f6a8c0e2b4d6f8a0c2e4b6d8f0a
        - name: Violet-Delivery-Id
          in: header
          required: true
          description: El id de la entrega; igual a `deliveryId` en el cuerpo y el mismo en cada reintento.
          schema:
            type: string
            format: uuid
        - name: User-Agent
          in: header
          required: true
          schema:
            type: string
            const: Violet-Webhooks/1.0
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookRequest'
            examples:
              entityUpdated:
                summary: Eventos de entidad en un webhook vinculado
                value:
                  deliveryId: 0199e3c6-4f2a-7b1c-8d3e-5f6a7b8c9d0e
                  timestamp: '2026-10-20T18:05:14.020Z'
                  source: teamcenter
                  subscriptionId: 0199e3c4-1d2e-7f3a-8b4c-5d6e7f8a9b0c
                  events:
                    - eventId: 0199e3c5-8a1b-7c2d-9e3f-0a1b2c3d4e5f
                      type: entity.updated
                      occurredAt: '2026-10-20T18:04:12.511Z'
                      entityId: 0198aa10-3c4d-7e5f-8a6b-7c8d9e0f1a2b
                      integrationId: 0197ff02-5e6f-7a8b-9c0d-1e2f3a4b5c6d
                      entityType: Revisión de pieza
                      explorationId: 0199d001-7a8b-7c9d-8e0f-1a2b3c4d5e6f
                    - eventId: 0199e3c5-8a1c-7d2e-8f30-1b2c3d4e5f60
                      type: entity.bom.changed
                      occurredAt: '2026-10-20T18:04:13.002Z'
                      entityId: 0198aa10-4d5e-7f60-9b7c-8d9e0f1a2b3c
                      integrationId: 0197ff02-5e6f-7a8b-9c0d-1e2f3a4b5c6d
                      entityType: Revisión de pieza
                      explorationId: 0199d001-7a8b-7c9d-8e0f-1a2b3c4d5e6f
              resyncRequired:
                summary: Resincronización después de editar la exploración
                value:
                  deliveryId: 0199e3d1-2b3c-7d4e-9f50-6a7b8c9d0e1f
                  timestamp: '2026-10-21T09:12:05.114Z'
                  source: none
                  subscriptionId: 0199e3c4-1d2e-7f3a-8b4c-5d6e7f8a9b0c
                  events:
                    - eventId: 0199e3d0-1a2b-7c3d-8e4f-5a6b7c8d9e0f
                      type: subscription.resync_required
                      occurredAt: '2026-10-21T09:12:03.000Z'
                      explorationId: 0199d001-7a8b-7c9d-8e0f-1a2b3c4d5e6f
                      reason: exploration_changed
              ping:
                summary: Solicitud de prueba
                value:
                  deliveryId: 0199e3e0-3c4d-7e5f-8061-7b8c9d0e1f2a
                  timestamp: '2026-10-21T10:00:00.000Z'
                  source: none
                  subscriptionId: 0199e3c4-1d2e-7f3a-8b4c-5d6e7f8a9b0c
                  events:
                    - eventId: 0199e3e0-3c4d-7e5f-8061-7b8c9d0e1f2b
                      type: subscription.ping
                      occurredAt: '2026-10-21T10:00:00.000Z'
      responses:
        '2XX':
          description: Entregado. El cuerpo de la respuesta se ignora.
        '408':
          description: Reintentado con backoff (1, 2, 4, 8, 16, 32, 60 minutos, luego cada hora).
        '429':
          description: Reintentado con backoff.
        '5XX':
          description: Reintentado con backoff. Los tiempos de espera y los errores de red se reintentan de la misma forma.
        default:
          description: |
            Cualquier otro 4xx, o un 3xx (no se siguen las redirecciones), es un
            fallo permanente; tres seguidos deshabilitan el webhook. Un webhook
            sin ningún 2xx durante 6 horas también se deshabilita. No se pierde nada:
            la reactivación por un administrador envía el acumulado en orden.
components:
  securitySchemes:
    violetSignature:
      type: apiKey
      in: header
      name: Violet-Signature
      description: |
        Firma HMAC-SHA256 de `<t>.<raw body>`, firmada con el
        secreto de firma del webhook. Consulta el parámetro de encabezado `Violet-Signature`.
  schemas:
    WebhookRequest:
      type: object
      additionalProperties: false
      required: [deliveryId, timestamp, source, subscriptionId, events]
      properties:
        deliveryId:
          type: string
          format: uuid
          description: Identifica esta solicitud. Igual que el encabezado `Violet-Delivery-Id` y sin cambios en los reintentos.
        timestamp:
          type: string
          format: date-time
          description: Cuándo se formó el lote. Sin cambios en los reintentos.
        source:
          type: string
          pattern: '^[a-z0-9]+(-[a-z0-9]+)*$'
          description: |
            El sistema de origen del que procede cada evento de esta solicitud, como un
            slug en minúsculas. Los conectores de un mismo producto comparten un slug (`teamcenter`,
            `altium`, `solidworks-pdm`); otras aplicaciones usan el slug de su nombre.
            `none` para pings y eventos de resincronización.
          examples: [teamcenter, altium, solidworks-pdm, duro-hub, none]
        subscriptionId:
          type: string
          format: uuid
          description: El id del webhook.
        events:
          type: array
          minItems: 1
          maxItems: 500
          items:
            $ref: '#/components/schemas/Event'
    Event:
      oneOf:
        - $ref: '#/components/schemas/EntityEvent'
        - $ref: '#/components/schemas/ResyncRequiredEvent'
        - $ref: '#/components/schemas/PingEvent'
      discriminator:
        propertyName: type
        mapping:
          entity.created: '#/components/schemas/EntityEvent'
          entity.updated: '#/components/schemas/EntityEvent'
          entity.deleted: '#/components/schemas/EntityEvent'
          entity.bom.changed: '#/components/schemas/EntityEvent'
          entity.where_used.changed: '#/components/schemas/EntityEvent'
          entity.filter_entered: '#/components/schemas/EntityEvent'
          entity.filter_exited: '#/components/schemas/EntityEvent'
          subscription.resync_required: '#/components/schemas/ResyncRequiredEvent'
          subscription.ping: '#/components/schemas/PingEvent'
    EventBase:
      type: object
      required: [eventId, type, occurredAt]
      properties:
        eventId:
          type: string
          format: uuid
          description: Único por evento y se conserva en reintentos y reentregas. Úsalo para deduplicar.
        occurredAt:
          type: string
          format: date-time
          description: Cuándo ocurrió el cambio en Violet.
        explorationId:
          type: string
          format: uuid
          description: Presente solo en webhooks vinculados a una exploración.
    EntityEvent:
      allOf:
        - $ref: '#/components/schemas/EventBase'
        - type: object
          required: [entityId, integrationId, entityType]
          properties:
            type:
              type: string
              enum:
                - entity.created
                - entity.updated
                - entity.deleted
                - entity.bom.changed
                - entity.where_used.changed
                - entity.filter_entered
                - entity.filter_exited
              description: |
                - `entity.created`: una nueva entidad de un tipo vigilado.
                - `entity.updated`: cambió una propiedad vigilada.
                - `entity.deleted`: la entidad fue eliminada (webhooks vinculados: solo las entidades de las que te informaron).
                - `entity.bom.changed`: se añadió o eliminó una línea de la BOM propia de la entidad, o cambió una cantidad.
                - `entity.where_used.changed`: la entidad se añadió o se eliminó de la BOM de un padre.
                - `entity.filter_entered`: solo vinculado; el propio cambio de la entidad hizo que coincidiera con la exploración.
                - `entity.filter_exited`: solo vinculado; el propio cambio de la entidad hizo que dejara de coincidir.
            entityId:
              type: string
              format: uuid
              description: La entidad modificada. Léela con la API de Entities.
            integrationId:
              type: string
              format: uuid
              description: La integración a la que pertenece la entidad.
            entityType:
              type: string
              description: El nombre del tipo de entidad.
              examples: [Revisión de pieza, Pieza]
    ResyncRequiredEvent:
      allOf:
        - $ref: '#/components/schemas/EventBase'
        - type: object
          required: [reason]
          properties:
            type:
              type: string
              const: subscription.resync_required
              description: Vuelve a leer todo lo que observa el webhook.
            reason:
              type: string
              enum: [exploration_changed, capture_overflow, pending_purged, full_refetch]
              description: |
                - `exploration_changed`: se editaron los filtros de la exploración vinculada.
                - `capture_overflow`: se acumularon demasiados cambios mientras el webhook estaba en pausa o deshabilitado.
                - `pending_purged`: se borraron los cambios capturados que no se habían enviado.
                - `full_refetch`: se volvió a leer por completo un sistema de origen.
            since:
              type: string
              format: date-time
              description: Cuando se conoce, vuelve a leer todo lo que cambió desde este momento.
    PingEvent:
      allOf:
        - $ref: '#/components/schemas/EventBase'
        - type: object
          properties:
            type:
              type: string
              const: subscription.ping
              description: Una prueba enviada desde la app o la API.
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.violetlabs.com/es/funciones/api/webhooks-salientes/especificacion-openapi.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
