> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kameleoon.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a new goal for an experiment

> Create a click-tracking goal for an experiment using the Automation API goals endpoint.

## Goal

Goals are metrics to track campaign success.
This tutorial creates a **Click goal** to count clicks on the `.cta-button` element.
See the [goal creation guide](/user-manual/assets/goals/create-a-goal) for more information.

## Requirements

* `access token`

The Automation API requires an [access token](/developer-docs/apis/automation-api-rest/get-started/get-started).
Retrieve the token programmatically by following the instructions in the [obtaining an access token section](/developer-docs/apis/automation-api-rest/get-started/get-started#1-obtain-an-access-token).

## Create the goal

**Endpoint:**

```
POST https://api.kameleoon.com/goals
```

| Name        | Type   | Description                                             |
| ----------- | ------ | ------------------------------------------------------- |
| description | String | Goal description (for example, "Number of CTA clicks"). |
| name        | String | Goal name (for example, "Clicks on CTA").               |
| siteId      | String | The project’s `siteId`.                                 |
| params      | Object | Includes element selectors for click tracking.          |

**Example:**

```bash theme={null}
curl -L -X POST 'https://api.kameleoon.com/goals' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
--data-raw '{
  "description": "Number of times CTA button was clicked",
  "hasMultipleConversions": true,
  "name": "Clicks on CTA",
  "params": {
    "customSelectors": [
      {
        "mode": "CUSTOM",
        "selector": ".cta-button, #bloc-789"
      }
    ]
  },
  "siteId": 29353,
  "status": "ACTIVE",
  "type": "CLICK"
}'
```
