Create goal
POST
/api/sites/{id}/goals
const url = 'https://hitkeep.com/api/sites/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/goals';const options = { method: 'POST', headers: {cookie: 'hk_token=<hk_token>', 'Content-Type': 'application/json'}, body: '{"created_at":"2026-04-15T12:00:00Z","id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","name":"example","site_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","type":"event","value":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://hitkeep.com/api/sites/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/goals \ --header 'Content-Type: application/json' \ --cookie hk_token=<hk_token> \ --data '{ "created_at": "2026-04-15T12:00:00Z", "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "name": "example", "site_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "type": "event", "value": "example" }'Creates a conversion goal.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” id
required
string format: uuid
Request Body required
Section titled “Request Body required ” Media type application/json
object
created_at
string format: date-time
id
string format: uuid
name
string
site_id
string format: uuid
type
string
value
string
Responses
Section titled “ Responses ”Created