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

> ## Agent Instructions
> Flowsign is one word with a lowercase s.
> The REST API base URL is https://my.flowsign.app and every endpoint lives under /api/v1.
> When answering API questions, cite the HTTP method and endpoint path.
> API access needs the Enterprise plan and an API key with the API access permission.

# Send a test event

> Sends a signed sample of the chosen event to the endpoint straight away, even while it is paused or failing, and returns the outcome. The payload carries `"test": true` and sample data in the event's usual shape. A test delivery is tried once, is listed with the endpoint's deliveries, and never counts towards the endpoint failing. Requires canManageWebhooks.



## OpenAPI

````yaml /api-reference/openapi.json post /api/v1/webhooks/{endpointId}/test
openapi: 3.0.3
info:
  title: Flowsign API
  version: 1.0.0
  description: >-
    Public v1 API for Flowsign. Every endpoint is authenticated with a Bearer
    API key (prefix `fsk_`). Errors use `{ error, details? }`; success responses
    wrap payload data as `{ data }`.


    An organisation is divided into workspaces. A key is issued for one
    workspace and acts there on every request (see `GET /api/v1/workspaces`);
    `X-Workspace-Id` is optional and may only name that workspace. Packages,
    templates, contacts and members are scoped to the key's workspace.
servers:
  - url: https://my.flowsign.app
    description: Production
security:
  - ApiKey: []
paths:
  /api/v1/webhooks/{endpointId}/test:
    post:
      tags:
        - Webhooks
      summary: Send a test event
      description: >-
        Sends a signed sample of the chosen event to the endpoint straight away,
        even while it is paused or failing, and returns the outcome. The payload
        carries `"test": true` and sample data in the event's usual shape. A
        test delivery is tried once, is listed with the endpoint's deliveries,
        and never counts towards the endpoint failing. Requires
        canManageWebhooks.
      operationId: postWebhooksByEndpointIdTest
      parameters:
        - schema:
            type: string
          required: true
          name: endpointId
          in: path
        - schema:
            type: string
            description: >-
              The workspace the key was issued for, as returned by `GET
              /api/v1/workspaces`. Optional: omitting it acts in the key's
              workspace, and any other id is rejected with 401.
          required: false
          name: x-workspace-id
          in: header
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                event:
                  allOf:
                    - $ref: '#/components/schemas/WebhookEventType'
                    - description: >-
                        The event to send a sample of. The endpoint must be
                        subscribed to it.
              required:
                - event
      responses:
        '201':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      deliveryId:
                        type: string
                        description: >-
                          Id of the test delivery, also sent as the
                          `x-flowsign-delivery-id` header.
                        example: cmg1hb9r40008v8p9k2n7ya5c
                      status:
                        $ref: '#/components/schemas/WebhookDeliveryStatus'
                      responseStatus:
                        type: integer
                        nullable: true
                        description: >-
                          HTTP status the endpoint returned. Null when no
                          response was received.
                        example: 200
                      error:
                        type: string
                        nullable: true
                        description: Why the attempt failed. Null when it was delivered.
                        example: HTTP 503
                    required:
                      - deliveryId
                      - status
                      - responseStatus
                      - error
                required:
                  - data
        '400':
          description: The request body is not valid JSON
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Missing or invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '402':
          description: Caller's plan does not include this feature (publicApi / webhooks)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: API key present but caller lacks the required permission
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: No webhook endpoint with that id in the caller's workspace
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: Request failed schema validation; details keyed by field
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded; see `Retry-After`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    WebhookEventType:
      type: string
      enum:
        - PACKAGE_SENT
        - PACKAGE_COMPLETED
        - PACKAGE_VOIDED
        - PACKAGE_EXPIRED
        - PACKAGE_DECLINED
        - PACKAGE_ON_HOLD
        - PACKAGE_RESUMED
        - PACKAGE_SCHEDULED
        - PACKAGE_DELETED
        - SESSION_SENT
        - SESSION_OPENED
        - SESSION_COMPLETED
        - SESSION_DECLINED
        - SESSION_REMINDED
        - SESSION_CANCELLED
      description: >-
        Event name. PACKAGE_SENT: a package was sent to its recipients.
        PACKAGE_COMPLETED: every recipient finished and the package is complete.
        PACKAGE_VOIDED: the sender voided the package. PACKAGE_EXPIRED: the
        package passed its expiry before completing. PACKAGE_DECLINED: a
        recipient declined and the package stopped. PACKAGE_ON_HOLD: the sender
        paused signing on the package. PACKAGE_RESUMED: a package on hold went
        back out for signing. PACKAGE_SCHEDULED: the package was scheduled to
        send later, or moved to a new time. PACKAGE_DELETED: a package that was
        scheduled or out for signing was deleted. SESSION_SENT: one recipient's
        signing invitation was sent. SESSION_OPENED: a recipient opened their
        signing link. SESSION_COMPLETED: a recipient finished their step.
        SESSION_DECLINED: a recipient declined their step. SESSION_REMINDED: a
        recipient was sent a reminder. SESSION_CANCELLED: a recipient's open
        signing session ended because the package was declined, voided, expired
        or deleted, or a correction removed them.
      example: PACKAGE_COMPLETED
    WebhookDeliveryStatus:
      type: string
      enum:
        - PENDING
        - DELIVERED
        - FAILED
        - EXHAUSTED
      description: >-
        PENDING is recorded and waiting for its first attempt, or held while the
        endpoint is paused or failing. FAILED has failed at least once and has a
        retry scheduled for `nextAttemptAt`. DELIVERED got a 2xx response.
        EXHAUSTED used up every attempt, or its host was refused.
      example: DELIVERED
    Error:
      type: object
      properties:
        error:
          type: string
          description: What went wrong, in plain words.
          example: 'Missing permission: canSendPackages'
        details:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
          description: >-
            Validation problems keyed by field path. Present only on 422
            responses.
          example:
            recipients.0.email:
              - Invalid email
      required:
        - error
  securitySchemes:
    ApiKey:
      type: http
      scheme: bearer
      bearerFormat: fsk_*

````