Skip to main content
POST
Create a goal

Authorizations

Authorization
string
header
required

Your project's secret key (pk_…, without the pub segment). Server-side only — never ship it to a browser. Get it from Settings → Projects in the dashboard.

Body

application/json
name
string
required
Maximum string length: 80
Example:

"Activate new workspaces"

description
string | null
Maximum string length: 1000
targetEvent
string | null

A tracked event name.

Maximum string length: 80
Example:

"activated_workspace"

guardrails
object | null

Free-form JSON object (max 4 KB serialized).

approvalMode
enum<string>
default:require_human
Available options:
require_human,
auto

Response

The created goal.

goal
object
required