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

# Test trigger

> Builds an in-memory event, signs it with the resolved destination's secret exactly like a
real firing, and POSTs it synchronously - so the response carries what the destination actually
answered rather than "queued". NOTHING IS PERSISTED: no TriggerEvent, TriggerDelivery
or TriggerDedupe row is written, so a test never appears in GET .../events or the
live stream and never counts against dedupe.
            
The body carries "test": true and the event id is prefixed te_test_, both
covered by the signature - a receiver that checks either before parsing can tell a test from real
traffic without ambiguity. Omit payload to get a default
{"test":true,"trigger_id":"…","generated_at":"…"} body.
            
A RECEIVER ERROR IS A SUCCESSFUL TEST OF A BROKEN ENDPOINT: an unreachable or 5xx-answering
destination still returns 200 from this endpoint, with delivered: false and the
status code or connection error in error. This call is rate-limited to 10 per minute per
account - it is the only trigger endpoint that makes the server POST to a caller-chosen URL on
demand.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/triggers/{triggerId}/test
openapi: 3.0.0
info:
  title: Engini API
  version: v1
  description: The Engini public API.
servers:
  - url: https://api.engini.io
security:
  - Bearer: []
  - ApiKey: []
tags:
  - name: Auth
    description: Identify the caller a Developer API request is authenticated as.
  - name: On-prem agents
    description: >-
      Provision and manage agents that run Engini tasks inside a customer's
      network.
  - name: Applications
    description: >-
      Discover the applications (toolkits) available in Engini and their
      connection requirements.
  - name: Tools
    description: Browse and execute the tools exposed by Engini applications.
  - name: Toolsets
    description: Manage toolsets - named groupings of connections and tools.
  - name: McpServers
    description: >-
      Inspect and maintain MCP servers - the account-wide endpoints that expose
      Engini tools and workflows over the Model Context Protocol. Distinct from
      the MCPClient connection kind, which is Engini consuming a third-party MCP
      server.
  - name: Connections
    description: >-
      Manage connections to applications, including OAuth sign-in and
      default-connection selection.
  - name: Triggers
    description: >-
      Create triggers that fire when something changes in a connected app, and
      manage the destinations their events are delivered to.
paths:
  /v1/triggers/{triggerId}/test:
    post:
      tags:
        - Triggers
      summary: Test trigger
      description: >-
        Builds an in-memory event, signs it with the resolved destination's
        secret exactly like a

        real firing, and POSTs it synchronously - so the response carries what
        the destination actually

        answered rather than "queued". NOTHING IS PERSISTED: no TriggerEvent,
        TriggerDelivery

        or TriggerDedupe row is written, so a test never appears in GET
        .../events or the

        live stream and never counts against dedupe.
                    
        The body carries "test": true and the event id is prefixed te_test_,
        both

        covered by the signature - a receiver that checks either before parsing
        can tell a test from real

        traffic without ambiguity. Omit payload to get a default

        {"test":true,"trigger_id":"…","generated_at":"…"} body.
                    
        A RECEIVER ERROR IS A SUCCESSFUL TEST OF A BROKEN ENDPOINT: an
        unreachable or 5xx-answering

        destination still returns 200 from this endpoint, with delivered: false
        and the

        status code or connection error in error. This call is rate-limited to
        10 per minute per

        account - it is the only trigger endpoint that makes the server POST to
        a caller-chosen URL on

        demand.
      operationId: Triggers_TestTrigger
      parameters:
        - name: triggerId
          in: path
          required: true
          description: The ti_ public id of the trigger instance to test.
          schema:
            type: string
          x-position: 1
      requestBody:
        x-name: request
        description: >-
          Optional free-form payload for the synthetic event. Defaulted when
          omitted.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TriggerTestRequest'
        x-position: 2
      responses:
        '200':
          description: >-
            What the destination answered - never a record of anything, since
            nothing is stored.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TriggerTestResultView'
        '400':
          description: >-
            The payload exceeds the size cap (PAYLOAD_TOO_LARGE). Payloads are
            rejected, never truncated.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized - missing or invalid bearer token or API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden - the caller lacks access to the resource.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: No such trigger in this account, or it has no destination to test.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          description: >-
            The resolved destination is auto-disabled (DESTINATION_DISABLED).
            Re-enable it first.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: >-
            More than 10 test calls in the last minute for this account.
            Retry-After names how long to wait.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error - an unexpected error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - Bearer: []
        - ApiKey: []
components:
  schemas:
    TriggerTestRequest:
      type: object
      description: >-
        POST /v1/triggers/{triggerId}/test - optional free-form payload for the
        synthetic event.
      additionalProperties: false
      properties:
        payload:
          description: >-
            The record to sign and deliver, as-is. Defaulted server-side when
            omitted.
          nullable: true
    TriggerTestResultView:
      type: object
      description: >-
        The result of one synthetic delivery attempt - never persisted, so there
        is no id to read this back

        by. Reflects exactly what the destination answered, including a receiver
        error (delivered: false

        with a status code), which is a SUCCESSFUL test of a broken endpoint,
        not a failed call.
      additionalProperties: false
      required:
        - delivered
        - destination
      properties:
        delivered:
          type: boolean
          description: >-
            True only on a 2xx from the destination. A non-2xx is still a 200
            from this endpoint.
        event_id:
          type: string
          description: >-
            The synthetic event's id, prefixed te_test_ so it is never mistaken
            for a captured event.
        trigger_id:
          type: string
          description: The ti_ id of the trigger instance that was tested.
        destination:
          description: The destination the test was sent to.
          oneOf:
            - $ref: '#/components/schemas/TriggerDestinationView'
        status_code:
          type: integer
          description: >-
            The destination's HTTP status code, when a response was received at
            all.
          format: int32
          nullable: true
        duration_ms:
          type: integer
          description: How long the attempt took, end to end.
          format: int32
        error:
          type: string
          description: >-
            Sanitised failure reason - a status code and body excerpt, or a
            connection/timeout description.
          nullable: true
    ErrorResponse:
      type: object
      description: >-
        Unified machine-readable error envelope returned by every non-200
        Developer API response.
      additionalProperties: false
      required:
        - errorCode
        - message
        - requestId
        - timestamp
      properties:
        errorCode:
          type: string
          description: Machine-readable error code identifying the failure.
        message:
          type: string
          description: Human-readable error message.
        requestId:
          type: string
          description: Identifier of the request, for support/correlation.
        timestamp:
          type: string
          description: Timestamp when the error occurred (ISO 8601).
        details:
          type: array
          description: Per-field validation details, when applicable.
          nullable: true
          items:
            $ref: '#/components/schemas/ErrorDetail'
    TriggerDestinationView:
      type: object
      description: >-
        A named HTTP endpoint Engini delivers trigger events to. The signing
        secret is never included

        here - it is shown once, when the destination is created or its secret
        is rotated.
      additionalProperties: false
      required:
        - id
        - name
        - url
        - status
      properties:
        id:
          type: integer
          description: >-
            The numeric id, which is what POST /v1/triggers's destination_id
            takes. Routes

            address destinations by Name; this is here so a caller can bind a
            trigger to one

            without a second lookup.
          format: int32
        name:
          type: string
          description: Slug, unique per account among live destinations.
        url:
          type: string
        is_default:
          type: boolean
          description: >-
            True on the one destination that receives events from triggers
            naming no destination.
        status:
          $ref: '#/components/schemas/TriggerDestinationStatusDTO'
        consecutive_failures:
          type: integer
          description: >-
            Consecutive DEAD-LETTERED events, not failed attempts. Reset to zero
            by any successful delivery

            and by re-enabling the destination.
          format: int32
        max_consecutive_failures:
          type: integer
          description: How many consecutive dead-letters auto-disable this endpoint.
          format: int32
        last_delivery_at:
          type: string
          format: date-time
          nullable: true
        last_failure_at:
          type: string
          format: date-time
          nullable: true
        last_failure:
          type: string
          description: >-
            Why the last delivery failed, sanitised for a tenant to read - a
            status code and reason, never a

            stack trace or an internal host.
          nullable: true
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
          nullable: true
    ErrorDetail:
      type: object
      description: A single field-level error detail within an ErrorResponse.
      additionalProperties: false
      required:
        - field
        - issue
      properties:
        field:
          type: string
          description: Name of the field the issue relates to.
        issue:
          type: string
          description: Description of the issue with the field.
    TriggerDestinationStatusDTO:
      type: string
      description: >-
        Whether a destination is currently accepting deliveries. Engini disables
        one automatically after

        too many consecutive failures; updating the destination enables it
        again.
      x-enumNames:
        - Active
        - AutoDisabled
      enum:
        - active
        - auto_disabled
  securitySchemes:
    Bearer:
      type: http
      description: Enter your JWT token
      scheme: bearer
      bearerFormat: JWT
    ApiKey:
      type: apiKey
      description: >-
        Opaque Developer API key (prefix `eng_`). Authenticates as the key's
        owner and resolves the account automatically.
      name: x-api-key
      in: header

````

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