Scheduling Rules

List scheduling rule sets

get

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.

Authorizations
AuthorizationstringRequired

API key issued via POST /v1/{workspace_id}/api-keys. Pass the returned api_key value as a Bearer token.

Path parameters
workspace_idstring · uuidRequired
Query parameters
agent_kindany ofOptional
string · enumOptionalPossible values:
or
nullOptional
is_activeany ofOptional
booleanOptional
or
nullOptional
limitinteger · max: 20OptionalDefault: 10
continuation_tokenintegerOptionalDefault: 0
Responses
chevron-right
200

Successful Response

application/json
has_morebooleanRequired
continuation_tokenany ofOptional
integerOptional
or
nullOptional
totalany ofOptional
integerOptional
or
nullOptional
get
/v1/{workspace_id}/scheduling-rule-sets

Create a scheduling rule set

post

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.

Authorizations
AuthorizationstringRequired

API key issued via POST /v1/{workspace_id}/api-keys. Pass the returned api_key value as a Bearer token.

Path parameters
workspace_idstring · uuidRequired
Body
agent_kindstring · enumRequiredPossible values:
paramsone ofRequired

Per-rule-kind typed parameters. The rule_kind discriminator field selects the params shape; one row per (agent_kind, rule_kind) per workspace.

or
or
or
or
or
is_activebooleanOptionalDefault: true
Responses
post
/v1/{workspace_id}/scheduling-rule-sets

Get one scheduling rule set

get

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.

Authorizations
AuthorizationstringRequired

API key issued via POST /v1/{workspace_id}/api-keys. Pass the returned api_key value as a Bearer token.

Path parameters
workspace_idstring · uuidRequired
rule_set_idstring · uuidRequired
Responses
chevron-right
200

Successful Response

application/json

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.

idstring · uuidRequired
workspace_idstring · uuidRequired
agent_kindstring · enumRequiredPossible values:
rule_kindstring · enumRequiredPossible values:
is_activebooleanRequired
created_byany ofRequired
string · uuidOptional
or
nullOptional
created_atany ofRequired
string · date-timeOptional
or
nullOptional
updated_atany ofRequired
string · date-timeOptional
or
nullOptional
get
/v1/{workspace_id}/scheduling-rule-sets/{rule_set_id}

Delete a scheduling rule set

delete

Hard-delete. The audit log retains the deletion record.

Authorizations
AuthorizationstringRequired

API key issued via POST /v1/{workspace_id}/api-keys. Pass the returned api_key value as a Bearer token.

Path parameters
workspace_idstring · uuidRequired
rule_set_idstring · uuidRequired
Responses
delete
/v1/{workspace_id}/scheduling-rule-sets/{rule_set_id}

No content

Partially update a scheduling rule set

patch

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.

Authorizations
AuthorizationstringRequired

API key issued via POST /v1/{workspace_id}/api-keys. Pass the returned api_key value as a Bearer token.

Path parameters
workspace_idstring · uuidRequired
rule_set_idstring · uuidRequired
Body

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.

paramsany ofOptional
anyOptional
or
or
or
or
or
or
nullOptional
is_activeany ofOptional
booleanOptional
or
nullOptional
Responses
chevron-right
200

Successful Response

application/json

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.

idstring · uuidRequired
workspace_idstring · uuidRequired
agent_kindstring · enumRequiredPossible values:
rule_kindstring · enumRequiredPossible values:
is_activebooleanRequired
created_byany ofRequired
string · uuidOptional
or
nullOptional
created_atany ofRequired
string · date-timeOptional
or
nullOptional
updated_atany ofRequired
string · date-timeOptional
or
nullOptional
patch
/v1/{workspace_id}/scheduling-rule-sets/{rule_set_id}

Last updated

Was this helpful?