# TrigRun API Agentic cron infrastructure for developers and AI agents. Schedule HTTP jobs with cron expressions, recurring intervals, or one-time triggers. Native MCP support, OpenAPI spec, and structured error codes for seamless agent integration. ## Documentation - Full docs: https://docs.trigrun.com - Getting started: https://docs.trigrun.com/docs/getting-started/quickstart - API reference: https://docs.trigrun.com/docs/guides/jobs - Agent integration: https://docs.trigrun.com/docs/agent/overview - MCP server setup: https://docs.trigrun.com/docs/agent/product-mcp ## Auth - Bearer token from POST /v1/auth/signup or POST /v1/auth/login - Workspace API tokens (cron_pat_...) from POST /v1/api-tokens ## Endpoints ### Jobs - GET /v1/jobs — list jobs (filter: ?state=active|paused) - POST /v1/jobs — create job (kinds: recurring, scheduled, one_time, cron) - GET /v1/jobs/:id — get job details - PATCH /v1/jobs/:id — update job - DELETE /v1/jobs/:id — delete job - POST /v1/jobs/:id/pause — pause job - POST /v1/jobs/:id/resume — resume job - POST /v1/jobs/:id/run-now — trigger immediate execution ### Executions - GET /v1/executions — list executions - GET /v1/executions/:id — get execution with attempts - POST /v1/executions/:id/replay — re-run an execution ### Notifications - GET /v1/notification-channels — list channels - POST /v1/notification-channels — create channel (types: webhook, email, slack, discord) - DELETE /v1/notification-channels/:id — delete channel - GET /v1/jobs/:id/notification-rules — list rules for job - POST /v1/jobs/:id/notification-rules — attach channel to job (events: on_success, on_failure, on_completion) - DELETE /v1/jobs/:id/notification-rules/:ruleId — remove rule - GET /v1/notification-deliveries — list deliveries (?status=sent|failed|pending) - POST /v1/notification-deliveries/:id/retry — retry failed delivery ### Secrets - GET /v1/secrets — list secrets - POST /v1/secrets — create secret (AES-256-GCM encrypted) - DELETE /v1/secrets/:id — delete secret - Reference in job headers as secret://name ### Machine-readable - GET /openapi.json — OpenAPI 3.1 spec - GET /llms.txt — this file - GET /llms-full.txt — this file with examples ## Examples ### Create recurring job { "name": "minute-sync", "kind": "recurring", "schedule": { "every_n_minutes": 1, "timezone": "UTC" }, "request": { "url": "https://example.com/webhook", "method": "POST", "timeout_seconds": 30 }, "retry_policy": { "max_attempts": 3, "retry_on_statuses": [ 429, 500, 502, 503, 504 ] } } ### Create cron job { "name": "nightly-cleanup", "kind": "cron", "schedule": { "cron": "0 2 * * *", "timezone": "America/New_York" }, "request": { "url": "https://example.com/cleanup", "method": "POST" } } ### Create webhook notification channel { "name": "prod-alerts", "type": "webhook", "config": { "url": "https://example.com/hooks/cron", "secret": "whsec_..." } } ### Create email notification channel { "name": "team-email", "type": "email", "config": { "email": "alerts@example.com" } } ### Attach notification rule to job { "channel_id": "channel_id_here", "event": "on_failure" }