Create a schedule
Frequency options
frequency | Config | Meaning |
|---|---|---|
daily | intervalValue (days between runs, default 1) | Every N days |
weekly | dayOfWeek (0-6, Sunday=0) | On a specific weekday |
biweekly | dayOfWeek | Every two weeks on a weekday |
monthly | dayOfMonth (1-31) | Nth of the month |
custom | cronExpression | Arbitrary cron |
"America/New_York" means 9am Eastern regardless of DST.
Retry policy
When an execution fails (rail outage, insufficient funds), Sly retries automatically:- Happen hourly for 24 hours
- Then daily up to
retryWindowDays - Up to
maxRetryAttemptstotal - On final failure, schedule moves to
failedstate
retryEnabled: false = single-attempt only; failures go to failed immediately.
List schedules
next_execution_at, last_execution_at, executions_completed, and executions_remaining.
Schedule detail
Pause and resume
End a schedule
Either let it run out (hitsendDate or maxOccurrences) or cancel:
Execution state machine
Worker cadence
A background worker polls for scheduled transfers withscheduled_at <= NOW():
- Dev / sandbox: every 30 seconds
- Production: every 60 seconds
Endpoints
| Endpoint | Purpose |
|---|---|
GET /v1/scheduled-transfers | List |
POST /v1/scheduled-transfers | Create |
GET /v1/scheduled-transfers/:id | Detail |
PATCH /v1/scheduled-transfers/:id | Update (incl. pause/resume/cancel) |
Webhooks
scheduled_transfer.executed— per execution, withstatus: completed | failedscheduled_transfer.retrying— retry attempt initiatedscheduled_transfer.failed— exhausted retriesscheduled_transfer.completed— schedule finished (endDate / maxOccurrences)
Common patterns
Payroll (bi-weekly every other Friday):POST /v1/scheduled-transfers with frequency: daily, startDate: <future>, maxOccurrences: 1, or better — the direct POST /v1/transfers with scheduled_at param.
Coordinating with mandates
If you’re already using AP2 mandates for recurring payments, do you also need scheduled transfers? Usually not:| Mandate | Scheduled transfer |
|---|---|
| Agent decides when to execute within scope | Fixed cadence, no agent in the loop |
| Partner defines rules, agent acts | Partner defines every execution |
| Best for: agent-driven subscriptions | Best for: treasury / payroll / internal |
