Fire a Sume schedule from a decision, not a clock: API trigger
Set api_trigger_enabled on a Sume schedule, let Clef or Decider decide when it is worth running, then POST /v1/actions/{action_id}/runs with an idempotency key.

Use the API-call trigger. With it, an external system decides when a run starts instead of a clock, which is what you want when a decision model says whether today is worth a run. The schedule needs status of active and api_trigger_enabled of true, and your key needs actions:read and actions:write. Then POST /v1/actions/{action_id}/runs returns 202 with a receipt.
What the trigger needs
Service-account keys cannot create Action runs and fail with 403 insufficient_scope. Keys created before the trigger shipped lack the scopes and must be replaced, since scopes cannot be added to an existing key.
| Requirement | Detail |
|---|---|
| Schedule status | active |
api_trigger_enabled | true |
| Key scopes | actions:read and actions:write |
| Header | Idempotency-Key, one per decision |
import os
import requests
def fire(action_id: str, day: str, worth_it: bool) -> str | None:
if not worth_it:
return None
r = requests.post(
f"https://api.sume.com/v1/actions/{action_id}/runs",
headers={"Authorization": f"Bearer {os.environ['SUME_API_KEY']}",
"Idempotency-Key": f"{action_id}-{day}"},
json={},
timeout=30,
)
r.raise_for_status()
return r.json()["data"]["id"]
One decision, one run
Key the idempotency header to the decision, such as the schedule id and the day. If your service retries after a timeout, the receipt comes back with idempotency_hit of true instead of a second run. The schedule's saved spend cap still applies to the run.
Check the docs before you ship
Sume's limits and field names change faster than blog posts do. Read the linked docs pages for the current request fields before you ship, and send a dry_run or a low spend cap on your first real call.
Sources
Related posts
More in Agents
- Five generate_image calls in one turn: Sume MCP create budget
Hosted Sume MCP gives paid creates their own budget (20 per principal, 64 per process) and queues a call up to 20 seconds before wait_busy.
- usage.cap on a Format run: an agent reads remaining_usd_micros
A Format run receipt splits its spend cap into limit, counted and remaining USD micros. A supervising agent can read headroom before it asks for more work.
- Sume hosted MCP is not Studio Agent: the one URL to put in your client
Put https://mcp.sume.com/mcp into Claude, Cursor or Codex. Studio Agent is the in-app product, not a customer MCP server, so there is no second URL to add.
- Sume jobs_wait limits: 20 ids and 55 seconds per call
Hosted Sume MCP jobs_wait takes at most 20 job ids of 256 characters and waits up to 55 seconds. How to wait on a 30-clip storyboard in groups.
Written by Sume