Scheduling Rule Sets
Configure deterministic scheduling rules that filter appointment slots before they reach the agent.
Scheduling rule sets define workspace-scoped configuration for the deterministic scheduling rules engine. Each rule set binds an agent kind and rule kind to a typed parameter block that controls how the engine filters appointment slots.
Rule sets are scoped to a workspace. The combination of agent kind and rule kind is unique per workspace - each workspace can have at most one rule set per (agent kind, rule kind) pair.
Endpoints
All endpoints are scoped to a workspace: /v1/{workspace_id}/scheduling-rule-sets
List Scheduling Rule Sets
Returns a paginated list of scheduling rule sets for the workspace.
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.
[]50Successful Response
Missing or invalid API key.
Insufficient permissions.
Validation Error
Rate limited.
GET /v1/{workspace_id}/scheduling-rule-sets HTTP/1.1
Host: platform.api-us.concurrence.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"items": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"workspace_id": "123e4567-e89b-12d3-a456-426614174000",
"agent_kind": "tms",
"rule_kind": "clinic_open_hours",
"params": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"is_active": true,
"created_by": "123e4567-e89b-12d3-a456-426614174000",
"created_at": "2026-01-01T00:00:00.000Z",
"updated_at": "2026-01-01T00:00:00.000Z"
}
],
"has_more": true,
"continuation_token": null
}Permissions: Workspace.view
Get One Scheduling Rule Set
Returns a single scheduling rule set by ID.
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.
GET /v1/{workspace_id}/scheduling-rule-sets/{rule_set_id} HTTP/1.1
Host: platform.api-us.concurrence.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"workspace_id": "123e4567-e89b-12d3-a456-426614174000",
"agent_kind": "tms",
"rule_kind": "clinic_open_hours",
"params": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"is_active": true,
"created_by": "123e4567-e89b-12d3-a456-426614174000",
"created_at": "2026-01-01T00:00:00.000Z",
"updated_at": "2026-01-01T00:00:00.000Z"
}Permissions: Workspace.view
Create a Scheduling Rule Set
Creates a new scheduling rule set. The rule_kind is determined by the discriminator field inside params.
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.
POST /v1/{workspace_id}/scheduling-rule-sets HTTP/1.1
Host: platform.api-us.concurrence.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 379
{
"agent_kind": "tms",
"params": {
"rule_kind": "clinic_open_hours",
"timezone": "text",
"monday": {
"start": "text",
"end": "text"
},
"tuesday": {
"start": "text",
"end": "text"
},
"wednesday": {
"start": "text",
"end": "text"
},
"thursday": {
"start": "text",
"end": "text"
},
"friday": {
"start": "text",
"end": "text"
},
"saturday": {
"start": "text",
"end": "text"
},
"sunday": {
"start": "text",
"end": "text"
}
},
"is_active": true
}{
"id": "123e4567-e89b-12d3-a456-426614174000",
"workspace_id": "123e4567-e89b-12d3-a456-426614174000",
"agent_kind": "tms",
"rule_kind": "clinic_open_hours",
"params": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"is_active": true,
"created_by": "123e4567-e89b-12d3-a456-426614174000",
"created_at": "2026-01-01T00:00:00.000Z",
"updated_at": "2026-01-01T00:00:00.000Z"
}Permissions: Workspace.update
Errors:
409- A rule set already exists for this (agent kind, rule kind). Update the existing row or delete it first.422- Invalid request body or rule kind discriminator
Update a Scheduling Rule Set
Partially updates an existing rule set. Only params and is_active can be changed. agent_kind and rule_kind are immutable - to change either, create a new rule set and delete the old one.
When updating params, send the complete params object for the rule kind. Partial updates within params are not supported. At least one field must be provided.
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.
PATCH /v1/{workspace_id}/scheduling-rule-sets/{rule_set_id} HTTP/1.1
Host: platform.api-us.concurrence.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 360
{
"params": {
"rule_kind": "clinic_open_hours",
"timezone": "text",
"monday": {
"start": "text",
"end": "text"
},
"tuesday": {
"start": "text",
"end": "text"
},
"wednesday": {
"start": "text",
"end": "text"
},
"thursday": {
"start": "text",
"end": "text"
},
"friday": {
"start": "text",
"end": "text"
},
"saturday": {
"start": "text",
"end": "text"
},
"sunday": {
"start": "text",
"end": "text"
}
},
"is_active": true
}{
"id": "123e4567-e89b-12d3-a456-426614174000",
"workspace_id": "123e4567-e89b-12d3-a456-426614174000",
"agent_kind": "tms",
"rule_kind": "clinic_open_hours",
"params": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"is_active": true,
"created_by": "123e4567-e89b-12d3-a456-426614174000",
"created_at": "2026-01-01T00:00:00.000Z",
"updated_at": "2026-01-01T00:00:00.000Z"
}Permissions: Workspace.update
Errors:
404- Rule set not found in this workspace422- Empty update body, or the params discriminator does not match the existing rule's kind
Delete a Scheduling Rule Set
Permanently deletes a scheduling rule set. The deletion is recorded in the audit log.
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.
DELETE /v1/{workspace_id}/scheduling-rule-sets/{rule_set_id} HTTP/1.1
Host: platform.api-us.concurrence.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
No content
Permissions: Workspace.update
Errors:
404- Rule set not found in this workspace
Example
Create a clinic open hours rule:
Update params on an existing rule:
Disable a rule without deleting it:
Last updated
Was this helpful?

