Opportunities
An Opportunity is a positive scheduling signal — a window where a task could start earlier, a resource that could take on more work, or a task that could be safely delegated. Like conflicts, opportunities are created automatically by the scheduling engine.
Planning v2 availability. The endpoints on this page behave the same with the planning-v2 flag on or off. For reference: planning v2 is merged to
mainand deployed to production (platform.clockwork-co.com), and the platform flagCLOCKWORK_PLANNING_V2is currently on globally, in production and in preview, as of 2026-10-12. Per-organization gating (CLOCKWORK_PLANNING_V2=orgs) is merged but not enabled in production, so the global flag is the only access control in effect. Exact dates: Changelog.
When to use client.opportunities
- Proactively surfacing schedule optimizations to operations staff
- Automating resource reallocation when opportunities are detected
- Building a scheduling assistant that suggests when to pull work forward
Methods
| Method | Description |
|---|---|
list(opts?) | List opportunities |
get(opportunityId) | Fetch a single opportunity |
dismiss(opportunityId) | Mark as dismissed |
opportunities.list(opts?)
const { data: opportunities } = await client.opportunities.list({ dismissed: false })
for (const opp of opportunities) {
console.log(opp.type, opp.description)
if (opp.windowStart && opp.windowEnd) {
console.log('Available window:', opp.windowStart, '→', opp.windowEnd)
}
}Opportunity types
| Type | Meaning |
|---|---|
fits_availability | A task fits within a resource's available window and could start sooner |
prep_window_open | There is prep time available before a constrained task |
can_delegate | A task could be delegated to a suggested actor |
opportunities.dismiss(opportunityId)
await client.opportunities.dismiss('opp_abc123')Type reference
interface Opportunity {
id: string
taskId: string
type: string
description: string
suggestedActorId: string | null
windowStart: string | null
windowEnd: string | null
dismissedAt: string | null
createdAt: string
}