Scheduling Rule Sets
Configure deterministic scheduling rules that filter appointment slots before they reach the agent.
Endpoints
List Scheduling Rule Sets
List all scheduling rule sets for the workspace. Optional filters: agent_kind (tms / ketamine / general), is_active. Used by the agent-engine rules engine and by operators inspecting config.
API key issued via POST /v1/{workspace_id}/api-keys. Pass the returned api_key value as a Bearer token.
100Successful Response
Missing or invalid API key.
Insufficient permissions.
Validation Error
Rate limited.
Get One Scheduling Rule Set
Fetch one rule set by id. Returns 404 when the row doesn't exist in this workspace (the RLS policy means cross-workspace lookups surface as 404, never as a row from the wrong workspace).
Permissions: Workspace.view.
API key issued via POST /v1/{workspace_id}/api-keys. Pass the returned api_key value as a Bearer token.
Successful Response
Wire shape for a single rule set. params stays as dict
here (not the discriminated union) so add-a-new-kind doesn't break
older clients still on the previous SDK version — the SDK's typed
helpers can re-validate into RuleParams when needed.
Missing or invalid API key.
Insufficient permissions.
Rule set not found in this workspace.
Validation Error
Rate limited.
Create a Scheduling Rule Set
Create one rule set for (agent_kind, rule_kind). Returns 409 if a row already exists for that key — use PATCH on the existing row or DELETE first.
API key issued via POST /v1/{workspace_id}/api-keys. Pass the returned api_key value as a Bearer token.
Per-rule-kind typed parameters. The rule_kind discriminator field selects the params shape; one row per (agent_kind, rule_kind) per workspace.
trueSuccessful Response
Wire shape for a single rule set. params stays as dict
here (not the discriminated union) so add-a-new-kind doesn't break
older clients still on the previous SDK version — the SDK's typed
helpers can re-validate into RuleParams when needed.
Missing or invalid API key.
Insufficient permissions.
Rule set already exists for this (agent_kind, rule_kind).
Invalid request body or rule_kind discriminator.
Rate limited.
Update a Scheduling Rule Set
Update params and/or is_active on an existing rule set. agent_kind and rule_kind are immutable — to change either, create a new rule set and delete the old one.
API key issued via POST /v1/{workspace_id}/api-keys. Pass the returned api_key value as a Bearer token.
Partial update — fields not provided are unchanged. params
must be the full per-kind shape (no patch within params); send the
whole RuleParams or omit.
Successful Response
Wire shape for a single rule set. params stays as dict
here (not the discriminated union) so add-a-new-kind doesn't break
older clients still on the previous SDK version — the SDK's typed
helpers can re-validate into RuleParams when needed.
Missing or invalid API key.
Insufficient permissions.
Rule set not found in this workspace.
Submitted params discriminator does not match the existing rule's rule_kind.
Rate limited.
Delete a Scheduling Rule Set
Hard-delete. The audit log retains the deletion record.
API key issued via POST /v1/{workspace_id}/api-keys. Pass the returned api_key value as a Bearer token.
Successful Response
No content
Missing or invalid API key.
Insufficient permissions.
Rule set not found in this workspace.
Validation Error
Rate limited.
No content
Rule Set Model
Rule Kinds
clinic_open_hours
clinic_open_hourstms_mapping_release
tms_mapping_releasetms_session_grid
tms_session_gridketamine_block_overlap
ketamine_block_overlapninety_day_rolling
ninety_day_rollingconcurrent_start_block
concurrent_start_blockExample
Last updated
Was this helpful?

