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

# Send a test event to a registration

> Sends one test event of a type the registration is subscribed to, through the same delivery and signing path as a real event. The event is clearly marked as a test and carries synthetic identifiers. It is a single attempt with no retries — the outcome returned is the OBSERVED result of the actual POST: the receiver's own HTTP status verbatim when it answered, or a `detail` naming what didn't run (a pre-connect policy refusal or a timeout). Delivery targets must be registered receivers on the public internet — private, link-local/metadata, and platform-internal addresses are refused before any connection.



## OpenAPI

````yaml /openapi/public-openapi.json post /v1/webhooks/registrations/{registration_id}/test
openapi: 3.1.0
info:
  title: Purple API
  version: 0.0.0
servers:
  - url: https://api.dev.purplelabelmd.com
security: []
tags:
  - description: Sign a patient in and out and manage the browser session.
    name: Sessions & authentication
  - description: Run the server-driven intake questionnaire question by question.
    name: Intake
  - description: Address autocomplete for the intake flow.
    name: Addresses
  - description: Read the public status of a patient's enrollment.
    name: Enrollment
  - description: Track a client's onboarding progress.
    name: Onboarding
  - description: Read back the platform configuration stored for your brand.
    name: Brand configuration
  - description: Enable offerings for your brand and set their display copy.
    name: Offering configuration
  - description: Start and track payments for an order.
    name: Payments
  - description: Subscribe to platform events and manage delivery endpoints.
    name: Webhooks
paths:
  /v1/webhooks/registrations/{registration_id}/test:
    post:
      tags:
        - Webhooks
      summary: Send a test event to a registration
      description: >-
        Sends one test event of a type the registration is subscribed to,
        through the same delivery and signing path as a real event. The event is
        clearly marked as a test and carries synthetic identifiers. It is a
        single attempt with no retries — the outcome returned is the OBSERVED
        result of the actual POST: the receiver's own HTTP status verbatim when
        it answered, or a `detail` naming what didn't run (a pre-connect policy
        refusal or a timeout). Delivery targets must be registered receivers on
        the public internet — private, link-local/metadata, and
        platform-internal addresses are refused before any connection.
      operationId: testFireWebhookRegistration
      parameters:
        - in: path
          name: registration_id
          required: true
          schema:
            pattern: ^whr_[A-Za-z0-9][A-Za-z0-9_-]*$
            type: string
        - $ref: '#/components/parameters/BrandIdHeader'
        - $ref: '#/components/parameters/CorrelationIdHeader'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookTestFireRequest'
        required: false
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  data:
                    $ref: '#/components/schemas/WebhookTestFireResult'
                required:
                  - data
                type: object
          description: the observed single-shot outcome
        '404':
          $ref: '#/components/responses/EdgeNotFound'
        '422':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/EdgeProblem'
          description: event_type outside this registration's subscription (problem+json)
        '429':
          $ref: '#/components/responses/EdgeRateLimited'
      security:
        - apiKey: []
components:
  parameters:
    BrandIdHeader:
      description: >-
        Opaque brand id (brd_...). Validated to belong to the resolved client
        (§2).
      in: header
      name: X-Brand-Id
      required: true
      schema:
        pattern: ^brd_[A-Za-z0-9][A-Za-z0-9_-]*$
        type: string
    CorrelationIdHeader:
      description: >-
        An optional id you send to tie this request to your own logs. Send one
        and it is echoed back unchanged; omit it and one is assigned for you.
        Either way the id is returned in the X-Correlation-Id response header on
        every response, including errors, so you can match a response to the
        request that produced it.
      in: header
      name: X-Correlation-Id
      required: false
      schema:
        maxLength: 128
        pattern: ^[A-Za-z0-9][A-Za-z0-9._:-]*$
        type: string
  schemas:
    WebhookTestFireRequest:
      additionalProperties: false
      properties:
        event_type:
          allOf:
            - $ref: '#/components/schemas/WebhookEventType'
          description: >-
            must be one of the registration's subscribed types; defaults to the
            first
      type: object
    WebhookTestFireResult:
      description: >-
        The observed single-shot outcome — the REAL POST result
        (chore-webhook-egress-truth: on a hosted runtime the delivery actually
        leaves the process; `delivered: true` is never synthesized). A red names
        what didn't run in `detail` instead of a bare false.
      properties:
        delivered:
          type: boolean
        delivery_id:
          type: string
        detail:
          description: >-
            why the attempt did not deliver — a pre-connect wall refusal, a
            timeout, or the endpoint's status in the platform's own bounded
            words (never an endpoint's body)
          type: string
        duration_ms:
          description: observed wall-clock time of the single POST attempt (ms)
          type: integer
        ok:
          const: true
          type: boolean
        status:
          description: >-
            the endpoint's OWN HTTP status, verbatim — present only when it
            answered
          type: integer
      required:
        - ok
        - delivery_id
        - delivered
      type: object
    EdgeProblem:
      description: RFC 7807 problem+json error body.
      properties:
        detail:
          type: string
        status:
          type: integer
        title:
          type: string
        type:
          format: uri-reference
          type: string
      required:
        - type
        - title
        - status
      type: object
    WebhookEventType:
      description: >-
        The set of event-type names a webhook endpoint can subscribe to.
        Additive within v0 — new types may be added over time; existing ones are
        stable.
      enum:
        - journey.prospect.captured.v1
        - journey.intake.submitted.v1
        - journey.eligibility.evaluated.v1
        - journey.evaluation.deferred.v1
        - journey.evaluation.resumed.v1
        - journey.identity.bound.v1
        - journey.case.opened.v1
        - journey.payment.succeeded.v1
        - journey.identity.verified.v1
        - journey.visit.completed.v1
        - journey.labs.skipped.v1
        - journey.rx.transmitted.v1
        - journey.shipment.shipped.v1
        - journey.shipment.delivered.v1
        - journey.checkin.completed.v1
        - journey.step.abandoned.v1
        - onboarding.client.started.v1
        - onboarding.step.started.v1
        - onboarding.step.assigned.v1
        - onboarding.step.completed.v1
        - onboarding.step.nudged.v1
        - onboarding.step.escalated.v1
        - onboarding.agreement.executed.v1
        - onboarding.completion.gate_ready.v1
        - onboarding.completion.e2e_result.v1
        - onboarding.client.completed.v1
      type: string
  responses:
    EdgeNotFound:
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/EdgeProblem'
      description: >-
        brand not found for this tenant - identical for unknown and foreign
        brands (404, never 403; no cross-tenant existence leak, §2)
    EdgeRateLimited:
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/EdgeProblem'
      description: >-
        Too many requests. You have exceeded the request rate allowed for this
        endpoint. Wait the number of seconds given in the Retry-After response
        header, then retry the request.
      headers:
        Retry-After:
          description: Seconds to wait before you retry.
          schema:
            type: integer
        X-Correlation-Id:
          description: The correlation id for this request, echoed back.
          schema:
            type: string
  securitySchemes:
    apiKey:
      description: 'Per-client API key (M2M). Presented as `Authorization: Bearer <key>`.'
      scheme: bearer
      type: http

````