Skip to main content
GET
/
agent
/
{agent_id}
/
triggers
List Agent Triggers
curl --request GET \
  --url https://api.example.com/agent/{agent_id}/triggers
Returns all configured YouTube trigger nodes for an agent.
Each agent can have multiple YouTube trigger nodes, and each trigger node can monitor multiple channels. The GET endpoint returns all triggers configured for the agent.

Request

curl -X GET "https://api.mosaic.so/agent/[agent_id]/triggers" \
  -H "Authorization: Bearer mk_your_api_key"

Response

[
  {
    "id": "8f7d6c5b-4a3e-2b1f-9d8c-1a2b3c4d5e6f",
    "type": "youtube",
    "youtube_channels": [
      "UCxxxxxxxxxxxxxx",
      "UCyyyyyyyyyyyyyy"
    ],
    "youtube_channel_details": [
      {
        "channel_id": "UCxxxxxxxxxxxxxx",
        "channel_name": "Marques Brownlee",
        "channel_handle": "@mkbhd",
        "thumbnail_url": "https://yt3.googleusercontent.com/...",
        "subscriber_count": 19200000
      },
      {
        "channel_id": "UCyyyyyyyyyyyyyy",
        "channel_name": "Cinematic Clips",
        "channel_handle": "@cinematicclips",
        "thumbnail_url": null,
        "subscriber_count": null
      }
    ],
    "callback_url": "https://your-app.com/webhooks/trigger",
    "filter_options": {
      "duration": {
        "min_seconds": 120,
        "max_seconds": 2700
      }
    }
  }
]
Returns an empty array [] if no triggers are configured. Each trigger represents a trigger node with its associated YouTube channels.
youtube_channel_details includes channel_name, channel_handle, thumbnail_url, and subscriber_count. Some fields may be null if Mosaic has not yet refreshed metadata for a channel. Always fall back to youtube_channels when details are unavailable.filter_options.duration is optional. When present, only videos within the configured duration bounds (in seconds) trigger runs for that specific trigger node. If only min_seconds is set, videos shorter than that are ignored; if only max_seconds is set, videos longer than that are ignored.When channels are added through POST /agent/{agent_id}/triggers/add_youtube_channels, a channel is moved to the selected trigger signature if it already exists on another YouTube trigger node for the same agent.Execution is deduplicated per video input target: if multiple YouTube trigger nodes match the same new video and point to the same Video Input node, Mosaic starts a single run for that target.