Create a new intent spec (status defaults to draft) under a product in the authenticated workspace.
Rate-limited by the 'intents' bucket (200/h sliding window, keyed user:<userId> or ip:<ip>). Billing-gated: when the workspace intent quota is reached, returns 403 with body { error: 'plan_limit_reached', metric: 'intents', current, limit, plan }. A v1 API create is agent-authored: it starts at status 'draft', version 1, origin 'agent', and authorization 'pending'; the response notice tells the caller not to implement until a signed-in human authorizes it. Fires a Slack 'intent_status_changed' notification and an 'intent_created' analytics event (both fire-and-forget). Response is built from a re-fetch with relations (INTENT_WITH_RELATIONS_SELECT) so edgeCases are populated; evidenceIds empty on a fresh create.
Query parameters
Required ONLY for cookie-session auth; identifies the target workspace. Ignored for API-key auth.
Request body
Example request
{
"outcomes": [
{
"measurement": {
"source": {
"provider": "posthog",
"queryRef": {
"kind": "saved_insight"
}
}
}
}
]
}Response
Created — returns the full mapped intent