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

# Reenviar entrega de webhook

> Envía la entrega otra vez, ahora, con el mismo webhook-id, y devuelve el intento. Funciona con el endpoint desactivado, para verificar una corrección antes de reactivar. Requiere una clave API con el alcance write.



## OpenAPI

````yaml /openapi.es.json post /v1/webhook-deliveries/{delivery_id}/retry
openapi: 3.1.0
info:
  title: API de Bevits
  version: 1.0.0
  description: >-
    API pública de Bevits para consultar y gestionar datos de CRM, clientes,
    compras, segmentos, etiquetas, automatizaciones, recetas, campañas,
    plantillas de email, identidad de marca, eventos personalizados y webhooks.
  license:
    name: Proprietary
    identifier: LicenseRef-Proprietary
servers:
  - url: https://api.bevits.com
    description: Producción
security:
  - bearerAuth: []
tags:
  - name: Sistema
    description: Disponibilidad de la API.
  - name: Identidad
    description: Identidad de la organización y de la clave API.
  - name: Clientes
    description: Clientes y sus relaciones.
  - name: Segmentos
    description: Segmentos de clientes.
  - name: Compras
    description: >-
      Compras de las integraciones de tienda y compras creadas por la API por
      quienes venden con su propio sistema.
  - name: Datos del CRM
    description: Etiquetas y definiciones de atributos.
  - name: Automatizaciones
    description: Flows de automatización.
  - name: Campañas
    description: Campañas de email, WhatsApp y SMS.
  - name: Cuenta y marca
    description: Contexto de la cuenta, identidad de marca e imágenes.
  - name: Recetas
    description: Automatizaciones listas creadas a partir de recetas, con deshacer.
  - name: Plantillas de email
    description: Creación e importación de plantillas de email.
  - name: Eventos
    description: Eventos personalizados enviados por la tienda y sus tipos.
  - name: Webhooks
    description: Endpoints que reciben los eventos de la tienda y el registro de entregas.
paths:
  /v1/webhook-deliveries/{delivery_id}/retry:
    post:
      tags:
        - Webhooks
      summary: Reenviar entrega de webhook
      description: >-
        Envía la entrega otra vez, ahora, con el mismo webhook-id, y devuelve el
        intento. Funciona con el endpoint desactivado, para verificar una
        corrección antes de reactivar. Requiere una clave API con el alcance
        write.
      operationId: retryWebhookDelivery
      parameters:
        - $ref: '#/components/parameters/IdempotencyKey'
        - $ref: '#/components/parameters/WebhookDeliveryId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
              description: Envía un objeto JSON vacío ({}).
            example: {}
      responses:
        '200':
          $ref: '#/components/responses/WebhookDeliveryDetail'
        '400':
          $ref: '#/components/responses/InvalidBody'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/WriteScopeRequired'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/IdempotencyConflict'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  parameters:
    IdempotencyKey:
      name: Idempotency-Key
      in: header
      description: >-
        Clave única de la operación, de 1 a 255 caracteres (un UUID, por
        ejemplo). Repetir la misma clave con el mismo cuerpo dentro de 24 horas
        devuelve la respuesta original en lugar de ejecutarla de nuevo.
      schema:
        type: string
    WebhookDeliveryId:
      name: delivery_id
      in: path
      description: ID de la entrega (wdl_…).
      schema:
        type: string
        pattern: ^wdl_[A-Za-z0-9_-]+$
      required: true
  responses:
    WebhookDeliveryDetail:
      description: La entrega, con el cuerpo enviado y los intentos.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/WebhookDeliveryDetail'
          example:
            object: webhook_delivery
            id: wdl_0mgc2k1a7000a1b2c3d4e5f6g7
            endpoint_id: wep_0mgc2k1a7000a1b2c3d4e5f6g7
            event_id: wev_0mgc2k1a7000a1b2c3d4e5f6g7h8
            event_type: email.clicked
            status: succeeded
            attempts: 2
            next_attempt_at: null
            last_attempt_at: '2026-11-23T14:04:02.000Z'
            last_response_status: 200
            last_error_code: null
            succeeded_at: '2026-11-23T14:04:02.180Z'
            created_at: '2026-11-23T14:03:01.120Z'
            event:
              id: wev_0mgc2k1a7000a1b2c3d4e5f6g7h8
              object: webhook_event
              type: email.clicked
              api_version: '2026-11-23'
              occurred_at: '2026-11-23T14:03:00.000Z'
              created_at: '2026-11-23T14:03:01.120Z'
              livemode: true
              data:
                customer:
                  id: cus_ckabc123
                  email: ana@exemplo.com.br
                  phone: '+5511988887777'
                  external_id: u_8842
                email:
                  id: 0f5c2a9e
                  subject: Seu cupom chegou
                  to: ana@exemplo.com.br
                source:
                  type: flow
                  id: flw_ckdef456
                  name: Boas-vindas
                link:
                  url: https://loja.exemplo.com.br/cupom
                user_agent: null
            attempt_log:
              - attempt: 1
                trigger: automatic
                url: https://api.example.com/webhooks/bevits
                started_at: '2026-11-23T14:03:01.200Z'
                duration_ms: 15000
                response_status: null
                response_body: null
                error_code: timeout
                error_message: No response within 15 seconds.
              - attempt: 2
                trigger: automatic
                url: https://api.example.com/webhooks/bevits
                started_at: '2026-11-23T14:04:02.000Z'
                duration_ms: 180
                response_status: 200
                response_body: '{"ok":true}'
                error_code: null
                error_message: null
    InvalidBody:
      description: >-
        Cuerpo de la solicitud ausente, que no es un objeto JSON, o parámetro de
        ruta inválido.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Unauthorized:
      description: Clave API ausente, inválida, expirada o revocada.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              type: authentication_error
              message: Invalid API key.
              request_id: req_07f6cdc3c20249d6afcd90b4
    WriteScopeRequired:
      description: La clave API no tiene el alcance write.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              type: permission_denied
              code: missing_scope
              message: This API key does not have the required "write" scope.
              param: scope
              request_id: req_07f6cdc3c20249d6afcd90b4
    NotFound:
      description: El recurso no existe o pertenece a otra organización.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    IdempotencyConflict:
      description: La Idempotency-Key ya se usó con otro cuerpo de solicitud.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    RateLimited:
      description: Límite de solicitudes superado.
      headers:
        Retry-After:
          $ref: '#/components/headers/RetryAfter'
        X-RateLimit-Limit:
          $ref: '#/components/headers/RateLimitLimit'
        X-RateLimit-Remaining:
          $ref: '#/components/headers/RateLimitRemaining'
        X-RateLimit-Reset:
          $ref: '#/components/headers/RateLimitReset'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/RateLimitErrorResponse'
    InternalError:
      description: Error inesperado en el servidor.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  schemas:
    WebhookDeliveryDetail:
      allOf:
        - $ref: '#/components/schemas/WebhookDelivery'
        - type: object
          properties:
            event:
              $ref: '#/components/schemas/WebhookEventEnvelope'
            attempt_log:
              type: array
              items:
                $ref: '#/components/schemas/WebhookAttempt'
          required:
            - event
            - attempt_log
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          $ref: '#/components/schemas/Error'
    RateLimitErrorResponse:
      allOf:
        - $ref: '#/components/schemas/ErrorResponse'
        - type: object
          required:
            - retry_after
          properties:
            retry_after:
              type: integer
              minimum: 1
              description: Segundos antes de volver a intentarlo.
    WebhookDelivery:
      type: object
      properties:
        object:
          type: string
          enum:
            - webhook_delivery
        id:
          type: string
        endpoint_id:
          type: string
        event_id:
          type: string
        event_type:
          type: string
        status:
          type: string
          enum:
            - pending
            - succeeded
            - failed
        attempts:
          type: integer
        next_attempt_at:
          type:
            - string
            - 'null'
          format: date-time
        last_attempt_at:
          type:
            - string
            - 'null'
          format: date-time
        last_response_status:
          type:
            - integer
            - 'null'
        last_error_code:
          type:
            - string
            - 'null'
          description: >-
            También endpoint_disabled o endpoint_deleted, cuando el endpoint
            dejó de estar disponible con la entrega pendiente.
        succeeded_at:
          type:
            - string
            - 'null'
          format: date-time
        created_at:
          type: string
          format: date-time
      required:
        - object
        - id
        - endpoint_id
        - event_id
        - event_type
        - status
        - attempts
        - next_attempt_at
        - last_attempt_at
        - last_response_status
        - last_error_code
        - succeeded_at
        - created_at
    WebhookEventEnvelope:
      type: object
      properties:
        id:
          type: string
          description: Igual al encabezado webhook-id, el mismo en cada intento.
        object:
          type: string
          enum:
            - webhook_event
        type:
          type: string
          enum:
            - email.delivered
            - email.opened
            - email.clicked
            - email.bounced
            - email.complained
            - contact.unsubscribed
            - customer.created
            - whatsapp.message.delivered
            - whatsapp.message.read
            - whatsapp.message.replied
            - purchase.created
            - order.created
            - order.paid
            - order.fulfilled
            - order.cancelled
        api_version:
          type: string
        occurred_at:
          type: string
          format: date-time
        created_at:
          type: string
          format: date-time
        livemode:
          type: boolean
        data:
          type: object
          description: Según el tipo; ver el catálogo.
      required:
        - id
        - object
        - type
        - api_version
        - occurred_at
        - created_at
        - livemode
        - data
      description: El cuerpo que recibe cada endpoint.
    WebhookAttempt:
      type: object
      properties:
        attempt:
          type: integer
        trigger:
          type: string
          enum:
            - automatic
            - manual
            - test
        url:
          type: string
        started_at:
          type: string
          format: date-time
        duration_ms:
          type: integer
        response_status:
          type:
            - integer
            - 'null'
        response_body:
          type:
            - string
            - 'null'
          description: El primer kilobyte de la respuesta.
        error_code:
          type:
            - string
            - 'null'
          enum:
            - timeout
            - connection_failed
            - dns_failed
            - private_address
            - tls_error
            - redirect_not_followed
            - non_2xx_response
            - endpoint_disabled
            - endpoint_deleted
            - internal_error
            - null
        error_message:
          type:
            - string
            - 'null'
      required:
        - attempt
        - trigger
        - url
        - started_at
        - duration_ms
        - response_status
        - response_body
        - error_code
        - error_message
    Error:
      type: object
      required:
        - type
        - message
        - request_id
      properties:
        type:
          type: string
          enum:
            - authentication_error
            - conflict
            - internal_error
            - invalid_request
            - not_found
            - permission_denied
            - rate_limited
            - service_unavailable
            - validation_error
        code:
          type: string
          description: >-
            Motivo estable y legible por máquina dentro de type, como
            invalid_event_name. Presente cuando el error tiene un motivo con
            nombre.
        message:
          type: string
        param:
          type: string
          description: >-
            Ruta completa del campo con problema, como customer.email o
            events[3].name.
        suggestion:
          type: string
          description: Un valor que sería aceptado, cuando existe uno obvio.
        request_id:
          type: string
          pattern: ^req_[a-f0-9]{24}$
  headers:
    RetryAfter:
      description: Segundos antes de volver a intentarlo.
      schema:
        type: integer
        minimum: 1
    RateLimitLimit:
      description: Límite total de la ventana actual.
      schema:
        type: integer
        example: 600
    RateLimitRemaining:
      description: Solicitudes restantes en la ventana actual.
      schema:
        type: integer
        example: 599
    RateLimitReset:
      description: Instante UTC en que termina la ventana actual.
      schema:
        type: string
        format: date-time
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: bvt_live_...
      description: Clave API creada en la configuración de la organización.

````

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