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

# Add a trigger to the running fleet

> Adds a webhook, a GitHub App subscription or a Slack mention that wakes the assigned fleet. A webhook's `url` is its delivery address. A provider the workspace has not connected answers `UZ-AGT-023`. A signing secret its vault lacks answers `UZ-AGT-025`. A second trigger of one kind and source answers `UZ-AGT-024`. Each call adds one trigger. A request repeating its `item_id` and `call_number` returns the first request's trigger and adds nothing.



## OpenAPI

````yaml https://raw.githubusercontent.com/agentsfleet/agentsfleet/main/public/openapi.json post /v1/runners/me/runs/{run_id}/triggers
openapi: 3.1.0
info:
  title: agentsfleet API
  description: API for managing workspaces, fleets, triggers, and runs.
  contact:
    name: agentsfleet
    url: https://agentsfleet.net
  license:
    name: MIT
    identifier: MIT
  version: 1.0.0
servers:
  - url: https://api.agentsfleet.net
    description: Production
security: []
paths:
  /v1/runners/me/runs/{run_id}/triggers:
    post:
      tags:
        - Fleets
      summary: Add a trigger to the running fleet
      description: >-
        Adds a webhook, a GitHub App subscription or a Slack mention that wakes
        the assigned fleet. A webhook's `url` is its delivery address. A
        provider the workspace has not connected answers `UZ-AGT-023`. A signing
        secret its vault lacks answers `UZ-AGT-025`. A second trigger of one
        kind and source answers `UZ-AGT-024`. Each call adds one trigger. A
        request repeating its `item_id` and `call_number` returns the first
        request's trigger and adds nothing.
      operationId: runner_add_trigger
      parameters:
        - name: run_id
          in: path
          description: Run identifier (version 7 universally unique identifier, or UUID).
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TriggerAddRequest'
        required: true
      responses:
        '201':
          description: The trigger
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Trigger'
        '400':
          description: The request is invalid
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemBody'
        '401':
          description: Authentication is missing, invalid, or not accepted by this endpoint
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemBody'
        '403':
          description: You do not have permission for this action
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemBody'
        '404':
          description: The resource was not found or is not accessible to you
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemBody'
        '409':
          description: The request conflicts with the resource's current state
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemBody'
        '413':
          description: The request body exceeds this endpoint's size limit
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemBody'
        '429':
          description: A request or capacity limit has been reached
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemBody'
        '500':
          description: An internal server error occurred
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemBody'
        '503':
          description: A required service is unavailable
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemBody'
      security:
        - RunnerBearerAuth: []
components:
  schemas:
    TriggerAddRequest:
      type: object
      description: '`POST /v1/runners/me/runs/{run_id}/triggers` request.'
      required:
        - fencing_token
        - item_id
        - call_number
        - kind
      properties:
        call_number:
          type: integer
          format: int64
          description: The call's number within its run, from 1, as its record names it.
          minimum: 0
        channel:
          type:
            - string
            - 'null'
          description: A mention's channel identifier.
        events:
          type:
            - array
            - 'null'
          items:
            type: string
          description: The event names that wake the fleet; absent wakes it on every event.
        fencing_token:
          type: integer
          format: int64
          description: >-
            The run's fencing token; a holder the fleet has superseded is
            refused.
          minimum: 0
        item_id:
          type: string
          description: |-
            The item this call is: a `UUIDv7` the runner mints once per call.
            A retry sends it again and gets the first result.
        kind:
          $ref: '#/components/schemas/TriggerKind'
          description: What wakes the fleet.
        repositories:
          type:
            - array
            - 'null'
          items:
            type: string
          description: The repositories whose App events wake the fleet, as `owner/name`.
        secret_name:
          type:
            - string
            - 'null'
          description: The workspace vault key holding a webhook's signing secret.
        source:
          type:
            - string
            - 'null'
          description: >-
            A webhook's source slug, the last segment of its URL; `github` for
            an

            App event and `slack` for a mention when absent.
        verifier:
          oneOf:
            - $ref: '#/components/schemas/TriggerVerifier'
              description: >-
                A webhook's signing recipe, for a source outside the built-in
                registry.
            - type: 'null'
      additionalProperties: false
    Trigger:
      type: object
      description: |-
        One trigger: a webhook source, the GitHub App subscription, or one Slack
        channel. The fleet adds it by tool; a person lists and removes it.
      required:
        - id
        - kind
        - source
        - created_at
      properties:
        channel:
          type:
            - string
            - 'null'
          description: A mention's channel identifier, or `null`.
        created_at:
          type: string
          format: date-time
          description: When the fleet added it, such as `2026-10-24T05:00:00.000Z`.
        events:
          type:
            - array
            - 'null'
          items:
            type: string
          description: The event names that wake the fleet, or `null` for every event.
        id:
          type: string
          description: 'The trigger''s identity: what a remove names.'
        kind:
          $ref: '#/components/schemas/TriggerKind'
          description: What wakes the fleet.
        repositories:
          type:
            - array
            - 'null'
          items:
            type: string
          description: The repositories whose App events wake the fleet, or `null`.
        source:
          type: string
          description: >-
            A webhook's source slug, `github` for an App event, `slack` for a
            mention.
        url:
          type:
            - string
            - 'null'
          description: >-
            A webhook's delivery address, `/v1/webhooks/{fleet_id}/{source}` on
            this

            deployment, or `null` for another kind.
    ProblemBody:
      type: object
      description: The body every refusal carries, under `application/problem+json`.
      required:
        - docs_uri
        - title
        - detail
        - error_code
        - request_id
      properties:
        action_id:
          type:
            - string
            - 'null'
          description: 'On that 409 only: the action the gate held.'
        current_state:
          type:
            - string
            - 'null'
          description: 'On a 409 only: the state that forbade the transition.'
        detail:
          type: string
          description: One sentence on what was refused and why.
        docs_uri:
          type: string
          description: Where the error code is documented.
        error_code:
          type: string
          description: The registry code, stable across releases.
        etag:
          type:
            - string
            - 'null'
          description: >-
            On a 412 only: the resource's current entity tag, to refetch and
            retry.
        gate_id:
          type:
            - string
            - 'null'
          description: 'On an answered approval gate''s 409 only: the gate that was answered.'
        local_read_permitted:
          type:
            - boolean
            - 'null'
          description: >-
            On a temporary extract outage, true authorizes one local read under
            the fleet's network policy.
        outcome:
          type:
            - string
            - 'null'
          description: 'On that 409 only: the answer that stands.'
        request_id:
          type: string
          description: The request this refusal answers, for support.
        resolved_at:
          type:
            - string
            - 'null'
          format: date-time
          description: 'On that 409 only: when the standing answer was given.'
        resolved_by:
          type:
            - string
            - 'null'
          description: 'On that 409 only: who gave it.'
        title:
          type: string
          description: A short name for the refusal, safe to show a person.
        user_message:
          type:
            - string
            - 'null'
          description: A curated sentence for end users, where the code has one.
    TriggerKind:
      type: string
      description: >-
        What wakes the fleet: a signed delivery to its own URL, an event from
        the

        workspace's GitHub App, or a mention in one Slack channel.
      enum:
        - webhook
        - app_event
        - mention
    TriggerVerifier:
      type: object
      description: >-
        How a webhook delivery from a source outside the built-in registry
        proves

        itself. It names a signing recipe, and the header that carries the
        signature

        when the recipe signs the body alone.
      required:
        - scheme
      properties:
        header:
          type:
            - string
            - 'null'
          description: The signature header, for a recipe that signs the body alone.
        scheme:
          type: string
          description: The recipe, such as `body-hex-sha256` or `svix-v1`.
      additionalProperties: false
  securitySchemes:
    RunnerBearerAuth:
      type: http
      scheme: bearer
      bearerFormat: agt_r
      description: >-
        Runner token beginning with agt_r, returned once by POST
        /v1/admin/runners

````

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