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

# Probar webhook

> Envía un aviso de prueba firmado al webhook, sea cual sea su suscripción.

**Cuándo usarla:** Para comprobar que el servidor recibe y verifica los avisos.


## OpenAPI

````yaml /api-reference/openapi.es.json post /webhooks/{id}/test
openapi: 3.1.0
info:
  title: API de Brelio
  version: '1'
  description: >-
    Todo lo que una persona hace en Brelio lo puede hacer un programa, con los
    mismos permisos, auditoría y límites. Cada endpoint se deriva del catálogo
    de operaciones.
servers:
  - url: https://api.brelio.app/v1
security: []
tags:
  - name: Agenda
  - name: Huecos libres
  - name: Citas
  - name: Pacientes
  - name: Profesionales
  - name: Servicios
  - name: Webhooks
  - name: Centros y accesos
  - name: Datos para integraciones
paths:
  /webhooks/{id}/test:
    post:
      tags:
        - Webhooks
      summary: Probar webhook
      description: >-
        Envía un aviso de prueba firmado al webhook, sea cual sea su
        suscripción.


        **Cuándo usarla:** Para comprobar que el servidor recibe y verifica los
        avisos.
      operationId: webhooks.test
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            pattern: >-
              ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
            description: Id del endpoint del webhook.
        - name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 8
            maxLength: 255
          description: >-
            Único por comando; reutilízala solo para reintentar la misma
            llamada.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties: {}
              required: []
            examples:
              example1:
                summary: Test
                value:
                  id: 0b9a4a1e-6a4c-4d43-9a39-4c1f3a0d2b11
      responses:
        '200':
          description: Correcto
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    format: uuid
                    pattern: >-
                      ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                  eventType:
                    type: string
                    const: webhookEndpoint.tested
                required:
                  - id
                  - eventType
                additionalProperties: false
        '401':
          description: Problem Details (RFC 9457) con un `code` estable
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '402':
          description: Problem Details (RFC 9457) con un `code` estable
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '403':
          description: Problem Details (RFC 9457) con un `code` estable
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '422':
          description: Problem Details (RFC 9457) con un `code` estable
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '429':
          description: Problem Details (RFC 9457) con un `code` estable
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '503':
          description: Problem Details (RFC 9457) con un `code` estable
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
      security:
        - bearer: []
components:
  schemas:
    Problem:
      type: object
      required:
        - type
        - title
        - status
        - code
        - detail
        - request_id
        - params
      properties:
        type:
          type: string
        title:
          type: string
        status:
          type: integer
        code:
          type: string
        detail:
          type: string
        request_id:
          type: string
        hint:
          type: string
        retryAfterSeconds:
          type: integer
        params:
          type: object
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      description: >-
        Clave de API de Brelio (de organización o personal) o un token de acceso
        de WorkOS.

````

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