CortexDB Docs
API Reference

/v1/temporal/phrases

Register named temporal phrases that resolve to date ranges for recall and answer.

Temporal phrases let you register a natural-language phrase (e.g. "fiscal Q3") that the temporal parser should resolve to a date range in recall and answer.

Register

POST /v1/temporal/phrases
{ "name": "fq3", "pattern": "fiscal Q3", "resolves_to": "+P6M..+P9M" }

The body is name / pattern / resolves_to

{ name, pattern, resolves_to }: pattern is the phrase text to match (required, distinct from the name label); resolves_to is two ISO-8601 durations separated by .., relative to query time. Other fields (such as anchor or expression) → 422. The response echoes { name, pattern, resolves_to }.

List and delete

  • GET /v1/temporal/phrases → { items: [{ name, pattern, resolves_to }] }.
  • DELETE /v1/temporal/phrases/{name} → 204 (the path param is the name, not the pattern).

Stability: beta.

Use explicit ranges in recall

Registered phrases are stored and listed, but recall's temporal.natural parser does not read them self-hosted: temporal: { natural: "fiscal Q3" } → 422 UNPARSEABLE_TEMPORAL (or, with natural_mode: "lenient", the phrase is dropped with a temporal_natural_ignored warning). In recall, use explicit temporal: { as_of } or valid_during ranges.

On this page