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

# triggers.list(): the project's triggers, newest first



## OpenAPI

````yaml /api-reference/openapi.json get /triggers
openapi: 3.1.0
info:
  title: paddock API
  version: 1.0.0
  description: >-
    The paddock API. Send an API key, or a session token on its own session, as
    a bearer token.
servers:
  - url: https://api.paddock.build/v1
security:
  - bearer: []
paths:
  /triggers:
    get:
      summary: 'triggers.list(): the project''s triggers, newest first'
      operationId: listTriggers
      parameters:
        - $ref: '#/components/parameters/Limit'
        - $ref: '#/components/parameters/Cursor'
      responses:
        '200':
          description: A page of triggers
          headers:
            Request-Id:
              $ref: '#/components/headers/RequestId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TriggerPage'
        default:
          $ref: '#/components/responses/Error'
components:
  parameters:
    Limit:
      name: limit
      in: query
      required: false
      description: Page size
      schema:
        type: integer
        minimum: 1
        maximum: 200
        default: 50
    Cursor:
      name: cursor
      in: query
      required: false
      description: The nextCursor of the previous page
      schema:
        type: string
  headers:
    RequestId:
      description: The request's ID, for support and logs
      schema:
        type: string
  schemas:
    TriggerPage:
      allOf:
        - $ref: '#/components/schemas/Page'
        - type: object
          properties:
            data:
              type: array
              items:
                $ref: '#/components/schemas/Trigger'
    Page:
      description: >-
        Every resource list returns one page: a cursor-paged slice of items.
        Typed pages extend it.
      type: object
      required:
        - data
        - nextCursor
      properties:
        data:
          type: array
        nextCursor:
          type:
            - string
            - 'null'
    Trigger:
      type: object
      required:
        - id
        - url
        - name
        - verification
        - dedupe
        - rules
        - createdAt
        - updatedAt
      properties:
        id:
          type: string
          pattern: ^trg_[0-7][0-9a-hjkmnp-tv-z]{25}$
        url:
          description: https://trigger.paddock.build/trg_…
          type: string
        name:
          type: string
        verification:
          oneOf:
            - $ref: '#/components/schemas/Verification'
            - type: 'null'
        dedupe:
          type:
            - string
            - 'null'
          description: 'CEL yielding a string; null: the body''s SHA-256.'
        rules:
          type: array
          items:
            $ref: '#/components/schemas/Rule'
        createdAt:
          $ref: '#/components/schemas/Timestamp'
        updatedAt:
          $ref: '#/components/schemas/Timestamp'
    ErrorBody:
      description: The body of every non-2xx response.
      type: object
      required:
        - error
      properties:
        error:
          $ref: '#/components/schemas/ErrorObject'
    Verification:
      description: >-
        HMAC-SHA256 of the raw body with the trigger's secret, as lowercase hex
        after prefix, in header.
      type: object
      required:
        - header
        - prefix
      properties:
        header:
          type: string
        prefix:
          type: string
    Rule:
      type: object
      required:
        - name
        - enabled
        - filter
        - agentId
        - session
        - sessionSettings
        - message
      properties:
        name:
          description: '[a-z0-9-], 1 to 64 characters, unique in the trigger.'
          type: string
        enabled:
          type: boolean
        filter:
          type:
            - string
            - 'null'
          description: CEL; null matches every event.
        agentId:
          type: string
          pattern: ^agt_[0-7][0-9a-hjkmnp-tv-z]{25}$
        session:
          $ref: '#/components/schemas/SessionChoice'
        sessionSettings:
          $ref: '#/components/schemas/SessionSettings'
        message:
          description: >-
            A template: plain text with {{path}} placeholders that place values
            from the event.
          type: string
    Timestamp:
      description: RFC 3339 in UTC with milliseconds.
      type: string
      format: date-time
      pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9]{3}Z$
      x-go-type: wire.Timestamp
      x-go-type-import:
        path: github.com/wenfengwang/paddock/internal/wire
    ErrorObject:
      type: object
      required:
        - code
        - message
      properties:
        code:
          $ref: '#/components/schemas/ErrorCode'
        message:
          type: string
        details:
          type: object
    SessionChoice:
      oneOf:
        - $ref: '#/components/schemas/SessionKeyChoice'
        - $ref: '#/components/schemas/SessionNewChoice'
    SessionSettings:
      description: >-
        As agent.sessions.create takes them, literal; used only when a session
        is created. triggerKey is set by the rule and refused in metadata.
      type: object
      additionalProperties: false
      properties:
        cwd:
          type: string
        systemPrompt:
          type: string
        metadata:
          $ref: '#/components/schemas/Metadata'
    ErrorCode:
      type: string
      enum:
        - invalid_request
        - unauthorized
        - forbidden
        - not_found
        - conflict
        - payload_too_large
        - unsupported
        - unavailable
        - internal
    SessionKeyChoice:
      description: >-
        The session whose triggerKey metadata is the rendered key, found or
        created.
      type: object
      additionalProperties: false
      required:
        - mode
        - key
      properties:
        mode:
          const: key
        key:
          description: >-
            A template: plain text with {{path}} placeholders that place values
            from the event.
          type: string
    SessionNewChoice:
      description: A new session per event.
      type: object
      additionalProperties: false
      required:
        - mode
      properties:
        mode:
          const: new
    Metadata:
      description: The customer's own string keys and values; never case-converted.
      type: object
      additionalProperties:
        type: string
  responses:
    Error:
      description: Every non-2xx response
      headers:
        Request-Id:
          $ref: '#/components/headers/RequestId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorBody'
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      description: An API key, or a session token on its own session

````

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