Endpoint
Authentication
Requires a Plugins API token with write access.string
required
Bearer token for authentication
Request Body
The request body accepts either a single goal or multiple goals (for bulk creation).Single Goal Creation
string
required
Type of goal to createOptions:
Goal.CustomEvent- Track custom eventsGoal.Pageview- Track pageview conversionsGoal.Revenue- Track revenue goals (requires Business plan)
object
required
Goal configuration object (structure varies by goal_type)
Custom Event Goal
string
required
Name of the custom event to trackRequirements:
- Maximum length: 120 characters
- Cannot be
engagement(reserved) - Will be trimmed of leading/trailing whitespace
Signup, Purchase, Downloadobject
Custom properties filter for the goal (up to 3 properties)Requirements:
- Maximum 3 properties per goal
- Keys: 1-300 characters
- Values: 1-2000 characters
- Both keys and values must be strings
Pageview Goal
string
required
Page path to track as a goalRequirements:
- Must start with
/ - Will be trimmed of leading/trailing whitespace
- Leading slash is automatically added if missing
/pricing, /blog/*, /thank-youobject
Custom properties filter for the goal (up to 3 properties)
Revenue Goal (Business Plan)
string
required
Name of the revenue event to track
string
required
Currency code for revenue trackingRequirements:
- Must be a valid ISO 4217 currency code
- Cannot be changed once the goal is created
- Each event name can only have one currency
USD, EUR, GBPobject
Custom properties filter for the goal (up to 3 properties)
Bulk Goal Creation
array
Array of goal objects (maximum 8 goals)Each goal object follows the same structure as single goal creation.
Response
array
Array of created or retrieved goals
string
Type of goal:
Goal.CustomEvent, Goal.Pageview, or Goal.Revenueinteger
Unique identifier for the goal
string
Human-readable display name for the goal
- For custom events: same as event_name
- For pageviews: “Visit ”
string
Event name (for custom event and revenue goals)
string
Page path (for pageview goals)
string
Currency code (for revenue goals)
object
Custom properties filter configuration
Status Codes
201 Created- Goal(s) created or retrieved successfully400 Bad Request- Invalid request parameters401 Unauthorized- Missing or invalid API token402 Payment Required- Revenue goals require Business plan upgrade422 Unprocessable Entity- Validation error
Examples
Create Custom Event Goal
Create Pageview Goal
Create Goal with Custom Properties
Create Revenue Goal (Business Plan)
Bulk Create Goals
Error Responses
Validation Error
Maximum Goals Reached
Upgrade Required (Revenue Goals)
Currency Mismatch
Notes
- Goals are created with upsert behavior - if a goal already exists, it will be returned instead of creating a duplicate
- Display names are automatically generated: event name for custom events, “Visit ” for pageviews
- Leading and trailing whitespace in event names and paths is automatically trimmed
- Pageview goals automatically get a leading
/if not provided - Revenue goals cannot be created for consolidated views
- Once created, a revenue goal’s currency cannot be changed
- Custom properties require the Props feature (available on certain plans)
Related Endpoints
- List Goals - Retrieve all goals for a site
- Delete Goal - Remove a goal by ID
- Custom Events - Send custom events to track against goals