Skip to main content
POST
Create a goal

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

Idempotency-Key
string

Any unique string up to 255 characters, such as a UUID. A retry with the same key and body within 24 hours answers what the first call did, without writing again.

Required string length: 1 - 255

Path Parameters

site
string
required

The site: its domain as registered (example.com), or its site id.

Body

application/json
name
string
required

The goal's name, as the Goals card shows it.

Required string length: 1 - 100
type
enum<string>
required

page counts a pageview, event a custom event.

Available options:
page,
event
match
string
required

A page goal's path, * wildcards allowed, or an event goal's exact event name. A path is stored with a leading slash and no trailing one.

Required string length: 1 - 500

Response

OK

data
object
required