> ## 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.

# Create trigger

> Created DISABLED. Enabling is what registers the provider subscription, and that should be a
deliberate second act rather than a side effect of describing the trigger you want.
            
Send an Idempotency-Key header. Agents retry, and without one a create that timed out
on the wire but succeeded on the server double-subscribes at the provider - which the provider
meters and which delivers every event twice. A retry carrying the same key inside 24h returns the
instance the first call made; a retry that arrives while the first is still running answers 409.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/triggers
openapi: 3.0.0
info:
  title: Engini DeveloperAPI
  version: v1
  description: 'Merged public developer API spec: Identity + WorkflowApi.'
servers:
  - url: https://api.engini.io
security:
  - Bearer: []
  - ApiKey: []
tags:
  - name: Auth
    description: Identify the caller a Developer API request is authenticated as.
  - 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:
    post:
      tags:
        - Triggers
      summary: Create trigger
      description: >-
        Created DISABLED. Enabling is what registers the provider subscription,
        and that should be a

        deliberate second act rather than a side effect of describing the
        trigger you want.
                    
        Send an Idempotency-Key header. Agents retry, and without one a create
        that timed out

        on the wire but succeeded on the server double-subscribes at the
        provider - which the provider

        meters and which delivers every event twice. A retry carrying the same
        key inside 24h returns the

        instance the first call made; a retry that arrives while the first is
        still running answers 409.
      operationId: Triggers_CreateTrigger
      parameters: []
      requestBody:
        x-name: request
        description: >-
          The trigger type, connection, and the §6a parameter blocks that apply
          to it.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateTriggerRequest'
        required: true
        x-position: 1
      responses:
        '200':
          description: >-
            A previous request with this Idempotency-Key already created this
            trigger; that instance is returned unchanged.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TriggerInstanceView'
        '201':
          description: >-
            The trigger instance was created, disabled. Call enable to subscribe
            it.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TriggerInstanceView'
        '400':
          description: Bad request - malformed body or invalid parameters.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized - missing or invalid bearer token.
          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: Not found - the resource does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          description: >-
            Conflict - a create with this Idempotency-Key is still in progress
            (IDEMPOTENT_REQUEST_IN_FLIGHT). Retry shortly rather than sending a
            new key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Too many requests - rate limit exceeded.
          headers:
            Retry-After:
              description: Number of seconds to wait before retrying.
              schema:
                type: integer
          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:
    CreateTriggerRequest:
      type: object
      description: >-
        The request body of POST /v1/triggers - everything you may set when
        creating a trigger
         instance.
      additionalProperties: false
      properties:
        trigger_slug:
          type: string
          description: Required. As listed by GET /v1/triggers/types.
        application_slug:
          type: string
          description: Disambiguates a slug carried by more than one application.
          nullable: true
        connection_id:
          type: integer
          description: The connection to run against. Supply this or ConnectionName.
          format: int32
          nullable: true
        connection_name:
          type: string
          description: >-
            The connection's name, for callers that never see ids. Resolved
            within the caller's own account

            only - a name that belongs to another tenant is simply not found,
            never confirmed.
          nullable: true
        config:
          description: >-
            The trigger activity's own inputs, including eventtype where the
            type supports it.
          nullable: true
        schedule:
          description: >-
            The polling schedule. Polling triggers only; rejected on any other
            kind.
          nullable: true
          oneOf:
            - $ref: '#/components/schemas/TriggerScheduleDTO'
        poll_interval_minutes:
          type: integer
          description: >-
            Sugar for { "frequency": "minute", "interval": N }, so the simple
            polling case is one field.

            Ignored when Schedule is also supplied - the explicit block wins
            rather than the two

            being merged, because merging would make "which interval did I get"
            depend on field order.
          format: int32
          nullable: true
        listen_columns:
          type: array
          description: >-
            Which columns to watch for changes. Push triggers only; each column
            becomes its own provider subscription.
          nullable: true
          items:
            type: string
        destination_id:
          type: integer
          description: >-
            Where to deliver this trigger's events. Null means your account's
            default destination, resolved at delivery time - so re-pointing the
            default re-points this trigger too.
          format: int32
          nullable: true
        dedupe_window_hours:
          type: integer
          format: int32
          nullable: true
    TriggerInstanceView:
      type: object
      description: >-
        A trigger instance as the API returns it. status is derived on every
        read, so it reflects
         whether the trigger is really capturing right now rather than what was last written.
      additionalProperties: false
      required:
        - kind
        - status
      properties:
        id:
          type: string
        kind:
          description: >-
            D6's discriminator. Always api here; ?include=workflow is what emits
            workflow.
          oneOf:
            - $ref: '#/components/schemas/TriggerKind'
        trigger_slug:
          type: string
          nullable: true
        connection_id:
          type: integer
          format: int32
        activity_id:
          type: integer
          format: int32
        destination_id:
          type: integer
          format: int32
          nullable: true
        dedupe_window_hours:
          type: integer
          format: int32
        status:
          description: Derived from the hidden workflow, never read from the stored column.
          oneOf:
            - $ref: '#/components/schemas/TriggerInstanceStatus'
        status_reason:
          description: >-
            Why the instance is errored. Null whenever the instance is not
            blocked - see

            TriggerStatusReason for the frozen vocabulary and the derivation
            ORDER.
          nullable: true
          oneOf:
            - $ref: '#/components/schemas/TriggerStatusReason'
        blocked_since:
          type: string
          description: When the block landed. Null whenever the instance is not blocked.
          format: date-time
          nullable: true
        last_event_at:
          type: string
          format: date-time
          nullable: true
        last_error_at:
          type: string
          format: date-time
          nullable: true
        last_error:
          type: string
          description: >-
            Bounded and credential-scrubbed at the point of writing - see
            TriggerInstance.LastError.
          nullable: true
        next_run_at:
          type: string
          description: >-
            When the polling scheduler will next select this trigger. Null for
            push and manual-webhook flavours.
          format: date-time
          nullable: true
        subscription_count:
          type: integer
          description: >-
            How many subscriptions this trigger holds with the provider. Not
            always 1: a subscription
             covers a single listen column, so N listen_columns create N subscriptions - and
             providers usually meter them.
          format: int32
        created_at:
          type: string
          format: date-time
        config:
          description: The trigger activity's own inputs, as supplied on create/patch.
          nullable: true
        schedule:
          description: >-
            Present only for polling triggers. Carries effective - see
            TriggerScheduleEffectiveDTO.
          nullable: true
          oneOf:
            - $ref: '#/components/schemas/TriggerScheduleDTO'
        listen_columns:
          type: array
          description: Present only for push triggers that declare IsShowFilterChanges.
          nullable: true
          items:
            type: string
        webhook_url:
          type: string
          description: >-
            Where a manual_webhook trigger's caller must POST events - the only
            delivery flavour with

            no provider subscription, so without this the caller has no way to
            learn the endpoint (design

            spec §6, folded in from the §6b UI plan). Null for every other
            delivery flavour, and null even for

            a manual-webhook instance whose step-1 ActivityToken has never been
            persisted - see

            TriggerInstanceService.EnrichAsync for why that gate exists.
          nullable: true
    ErrorResponse:
      type: object
      description: >-
        Unified error envelope for every non-200 response from
        /api/DeveloperAPI/v1/*.

        See applications-tools-spec.md §"Error envelope".
      additionalProperties: false
      required:
        - errorCode
        - message
        - requestId
        - timestamp
        - path
      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).
        path:
          type: string
          description: Request path that produced the error.
        details:
          type: array
          description: Per-field validation details, when applicable.
          nullable: true
          items:
            $ref: '#/components/schemas/ErrorDetail'
    TriggerScheduleDTO:
      type: object
      description: >-
        The schedule parameter block: how often a polling trigger runs, plus the
        weekdays and
         time-of-day window it may run in. Polling triggers only; rejected on any other kind.
      additionalProperties: false
      required:
        - frequency
        - interval
      properties:
        frequency:
          $ref: '#/components/schemas/TriggerScheduleFrequency'
        interval:
          type: integer
          description: >-
            In units of Frequency. Must be greater than zero - a zero interval
            saves clean and then never runs.
          format: int32
        start_date:
          type: string
          description: Anchor date. Defaults to today (UTC).
          format: date-time
          nullable: true
        start_time:
          type: string
          description: Anchor time of day, HH:mm. Defaults to 00:00.
          nullable: true
        week_days:
          type: array
          description: >-
            Sun=0. Only read when Frequency is week - and a weekly schedule with
            none selected can never run.
          nullable: true
          items:
            type: integer
            format: int32
        time_frames:
          type: array
          nullable: true
          items:
            $ref: '#/components/schemas/TriggerTimeFrameDTO'
        effective:
          description: >-
            Read-only echo of what the schedule ACTUALLY does after the runtime
            floor is applied. Never read

            from a request - see TriggerScheduleEffectiveDTO for why it is on
            the response.
          nullable: true
          oneOf:
            - $ref: '#/components/schemas/TriggerScheduleEffectiveDTO'
    TriggerKind:
      type: string
      description: >-
        D6's discriminator: an api trigger is a ti_* instance, a workflow
        trigger is a

        designer-built workflow surfaced by ?include=workflow.
      x-enumNames:
        - Api
        - Workflow
      enum:
        - api
        - workflow
    TriggerInstanceStatus:
      type: string
      description: >-
        Whether a trigger is capturing events. A trigger is born Disabled;
        Errored means
         capture has stopped and status_reason says why.
      x-enumNames:
        - Enabled
        - Disabled
        - Errored
      enum:
        - enabled
        - disabled
        - errored
    TriggerStatusReason:
      type: string
      description: >-
        Why a trigger is not capturing. Set alongside status when a trigger is
        errored or
         was disabled for you; null otherwise. A closed set of six values.
      x-enumNames:
        - MaxConsecutiveFailures
        - ActivityLimit
        - Manual
        - SubscribeFailed
        - ConnectionDeleted
        - TriggerTypeRemoved
      enum:
        - max_consecutive_failures
        - activity_limit
        - manual
        - subscribe_failed
        - connection_deleted
        - trigger_type_removed
    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.
    TriggerScheduleFrequency:
      type: string
      description: >-
        The unit a polling trigger's interval is counted in - seconds, minutes,
        hours, days, weeks
         or months.
      x-enumNames:
        - Seconds
        - Minute
        - Hour
        - Day
        - Week
        - Month
      enum:
        - seconds
        - minute
        - hour
        - day
        - week
        - month
    TriggerTimeFrameDTO:
      type: object
      additionalProperties: false
      properties:
        start_hour:
          type: string
          description: HH:mm.
        end_hour:
          type: string
          description: HH:mm.
        every_minutes:
          type: integer
          description: ALWAYS minutes, whatever the parent frequency is.
          format: int32
    TriggerScheduleEffectiveDTO:
      type: object
      description: >-
        Read-only echo of what the schedule ACTUALLY does after the runtime
        floor is applied. Never read
         from a request - see TriggerScheduleEffectiveDTO for why it is on the response.
      additionalProperties: false
      required:
        - frequency
        - interval
        - clamped
      properties:
        frequency:
          $ref: '#/components/schemas/TriggerScheduleFrequency'
        interval:
          type: integer
          description: In units of Frequency, after the runtime floor.
          format: int32
        min_interval_minutes:
          type: integer
          description: >-
            The floor that applied, in minutes - this account's plan, not the
            platform default.
          format: int32
        clamped:
          type: boolean
          description: >-
            True when the runtime floor moved the requested interval, i.e. the
            schedule does not run at the requested rate.
  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

````