Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.hitheo.ai/llms.txt

Use this file to discover all available pages before exploring further.

Fetch, modify, or hard-delete a single Routing Studio preference. Visibility: author or any member of the owning org. Non-members receive 404 so the existence of team preferences is never leaked.

Authentication

Requires a Bearer token with the billing API key scope.

GET

Fetch the full preference snapshot.
curl https://www.hitheo.ai/api/v1/routing-preferences/{id} \
  -H "Authorization: Bearer $THEO_API_KEY"
const pref = await theo.routingPreferences.get(id);

PATCH

Update fields on an existing preference. Sending rules or examples replaces the entire collection — both are treated as single documents on save. At least one field is required.
name
string
Preference name (1–128 chars).
description
string
Free-text description (≤512 chars).
rules
object[]
Replacement rule set (≤50 rules).
examples
object[]
Replacement few-shot examples (≤30).
confidence_floor_overrides
object
Replacement per-mode confidence floors.
enabled
boolean
Pause/unpause without deleting.
is_default
boolean
Promote/demote default. One default per scope.
curl -X PATCH https://www.hitheo.ai/api/v1/routing-preferences/{id} \
  -H "Authorization: Bearer $THEO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "enabled": false }'
await theo.routingPreferences.update(id, { enabled: false });
Team-scoped preferences require the manageWebhooks permission on the active organization.

DELETE

Hard delete. Cascade-removes every key binding pointing at this preference — previously-bound keys revert to the resolution cascade (org default → user default → none).
curl -X DELETE https://www.hitheo.ai/api/v1/routing-preferences/{id} \
  -H "Authorization: Bearer $THEO_API_KEY"
await theo.routingPreferences.delete(id);

Errors

  • 400 routing_preference_invalid — Validation failure on PATCH.
  • 404 not_found — Preference doesn’t exist or isn’t visible to the caller.
  • 409 conflict — Default-uniqueness violation.