---
title: "Get agent trigger"
method: GET
path: "/agent/{agent_id}/triggers"
tags: ["Triggers"]
---

# Get agent trigger

`GET /agent/{agent_id}/triggers`

## Request

- Base URL: `https://api.mosaic.so`
- URL: `https://api.mosaic.so/agent/{agent_id}/triggers`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-API-Key`

Retrieve the YouTube trigger configured for an agent

## Path parameters

- `agent_id` string, required

## Response `200`

Triggers retrieved successfully

- Trigger[]: Array of triggers configured for the agent. Returns empty array if no triggers are configured.
  - `id` string: Unique identifier for the trigger
  - `type` 'youtube': Type of trigger
  - `youtube_channels` string[]: List of YouTube channel IDs
  - `youtube_channel_details` YouTubeChannelDetail[]: Optional expanded channel details for the configured YouTube channels
    - `channel_id` string: YouTube channel ID
    - `channel_name` string: Display name for the YouTube channel
    - `channel_handle` string, nullable: YouTube channel handle (if available)
    - `thumbnail_url` string, nullable: URL for the channel profile picture (if available)
    - `subscriber_count` integer, nullable: Number of subscribers for the channel (if available)
  - `callback_url` string, nullable: Optional webhook URL saved on the trigger and used as `callback_url` for each triggered run.
  - `filter_options` YouTubeTriggerFilterOptions: Optional per-trigger filtering options for YouTube triggers. At least one of `min_seconds` or `max_seconds` must be set to activate duration filtering, and when both are provided `min_seconds` must be less than or equal to `max_seconds`.
    - `duration` object
      - `min_seconds` integer, nullable: Minimum video duration in seconds (inclusive).
      - `max_seconds` integer, nullable: Maximum video duration in seconds (inclusive).

## Other responses

- `401`: Authentication failed
- `404`: Resource not found

---

[API](https://skmtc.dev/mosaic/apis/mosaic-ai-api.md) - [All operations](https://skmtc.dev/mosaic/apis/mosaic-ai-api/llms.txt) - [OpenAPI document](https://skmtc.dev/mosaic/apis/mosaic-ai-api/revisions/c20e9fc606a4?raw)
