v1

latestOpenAPI 3.1.02026-07-13250151.3 KB
outcomes

Record a new outcome measurement for an intent.

Cookie-session only — rejects pm_live_ API keys; no Authorization-header inspection. Manual validation (not zod): outcomeIndex rejected only when undefined/null so 0 passes; outcomeText/actualValue must be non-empty strings. recorded_by is set to the session user id; source defaults to 'manual'. workspace_id is derived from the intent row (no membership check beyond RLS). Inserts into intent_outcome_measurements.

post/api/v1/intents/{id}/outcomes

Path parameters

idstring required

id path parameter.

Request body

outcomeIndexnumber required

Index of the outcome being measured. Required (rejected only when undefined/null, so 0 is valid).

outcomeTextstring required

Outcome text snapshot. Required non-empty string; trimmed before insert.

actualValuestring required

Measured value. Required non-empty string; trimmed before insert.

baselineValuestring

Baseline value before the change. Stored null if falsy.

unitstring

Unit of measure. Stored null if falsy.

metboolean

Whether the outcome target was met. Stored null if not provided (uses ?? null).

sourcestring

Provenance label. Defaults to 'manual' when falsy.

Response

Measurement recorded; returns the created measurement

object required