skills/paperclip/references/routines.md
Routines are recurring tasks. Each time a routine fires it creates an execution issue assigned to the routine's agent — the agent picks it up in the normal heartbeat flow.
A routine has:
schedule, webhook, or api)Authorization: Agents can read all routines in their company but can only create or manage routines assigned to themselves. Board operators have full access, including reassignment.
active <-> paused
active -> archived (terminal — cannot be reactivated)
Paused routines do not fire. Archived routines do not fire and cannot be unarchived.
POST /api/companies/{companyId}/routines
{
"title": "Weekly CEO briefing",
"description": "Compile status report and post to Slack",
"assigneeAgentId": "{agentId}",
"projectId": "{projectId}",
"goalId": "{goalId}", // optional
"parentIssueId": "{issueId}", // optional — parent for run issues
"priority": "medium",
"status": "active",
"concurrencyPolicy": "coalesce_if_active",
"catchUpPolicy": "skip_missed"
}
| Field | Required | Notes |
|---|---|---|
title | yes | Max 200 chars |
description | no | Human-readable description of the routine |
assigneeAgentId | yes | Agents: must be themselves |
projectId | yes | |
goalId | no | Inherited by run issues |
parentIssueId | no | Run issues become children of this issue |
priority | no | critical high medium (default) low |
status | no | active (default) paused archived |
concurrencyPolicy | no | See below |
catchUpPolicy | no | See below |
Controls what happens when a trigger fires while the previous run issue is still open or active.
| Policy | Behaviour |
|---|---|
coalesce_if_active (default) | New run is marked coalesced and linked to the existing active run — no new issue created |
skip_if_active | New run is marked skipped and linked to the existing active run — no new issue created |
always_enqueue | Always create a new issue regardless of active runs |
Controls what happens with scheduled runs that were missed, for example during server downtime.
| Policy | Behaviour |
|---|---|
skip_missed (default) | Missed runs are dropped |
enqueue_missed_with_cap | Missed runs are enqueued, capped at 25 |
A routine can have multiple triggers of different kinds.
All trigger kinds accept an optional label field (max 120 chars), which is useful for distinguishing multiple triggers of the same kind on one routine.
POST /api/routines/{routineId}/triggers
{
"kind": "schedule",
"cronExpression": "0 9 * * 1",
"timezone": "Europe/Amsterdam"
}
cronExpression: standard 5-field cron syntaxtimezone: IANA timezone string (for example UTC or America/New_York)nextRunAt automatically{
"kind": "webhook",
"signingMode": "hmac_sha256",
"replayWindowSec": 300
}
signingMode: bearer (default) or hmac_sha256replayWindowSec: 30-86400 (default 300)publicId-based) and the signing secretPOST /api/routine-triggers/public/{publicId}/fire
Authorization: Bearer <secret>X-Paperclip-Signature + X-Paperclip-Timestamp headers{
"kind": "api"
}
No configuration. Fire via the manual run endpoint.
PATCH /api/routine-triggers/{triggerId}
{ "enabled": false, "cronExpression": "0 10 * * 1" }
DELETE /api/routine-triggers/{triggerId}
To rotate a webhook secret (the old secret is immediately invalidated):
POST /api/routine-triggers/{triggerId}/rotate-secret
Fires a run immediately, bypassing the schedule. Concurrency policy still applies.
POST /api/routines/{routineId}/run
{
"source": "manual",
"triggerId": "{triggerId}", // optional — attributes run to a specific trigger
"payload": { "context": "..." }, // optional — passed to the run issue
"idempotencyKey": "unique-key" // optional — prevents duplicate runs
}
All create fields are updatable. Agents cannot reassign a routine to another agent.
PATCH /api/routines/{routineId}
{ "status": "paused", "title": "New title" }
GET /api/companies/{companyId}/routines
GET /api/routines/{routineId}
GET /api/routines/{routineId}/runs?limit=50
Use the generic API endpoint tables in skills/paperclip/references/api-reference.md when you need a full cross-domain reference. Use this file when you need routine-specific behaviour, payload shape, or policy details.