---
metadata:
  - name: generator
    content: Diplodoc Platform v5.48.2
alternate:
  - https://yandex.com.tr/dev/metrika/en/management/openapi/goal/editGoal.md
  - https://yandex.com.tr/dev/metrika/ru/management/openapi/goal/editGoal.md
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.com.tr/dev/metrika/en/llms.txt

<!-- source: en/management-src/Managing-goals/editGoal.md -->
<div class="openapi">

# Changing a goal

<!-- markdownlint-disable-file -->

Changes settings for the specified tag goal.

## Request

<div class="openapi__requests">

<div class="openapi__request__wrapper" style="--method: var(--dc-openapi-methods-put);margin-bottom: 12px">

<div class="openapi__request">

PUT {.openapi__method}
```text translate=no
https://api-metrika.yandex.net/management/v1/counter/{counterId}/goal/{goalId}
```

</div>

</div>

</div>

### Path parameters

#|
|| **Name** | **Description** ||
||

_counterId_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: integer

ID of the tag whose goal you want to change.
{.table-cell}
||
||

_goalId_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: integer

ID of the goal whose settings you want to change.
{.table-cell}
||
|#{.json-schema-properties}

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "goal": {
    "id": 0,
    "name": "example",
    "type": "example",
    "default_price": 0.5,
    "is_favorite": true,
    "status": "example",
    "conditions": [
      {}
    ],
    "flag": "example"
  }
}
```

{% endcut %}

#|
|| **Name** | **Description** ||
||

_goal_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
{% cut "**One of 13 types**" %}{.json-schema-combinators data-marker=or}

- **Type**: [ActionGoal](#entity-ActionGoal)

  JavaScript event.

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "id": 0,
    "name": "example",
    "type": "example",
    "default_price": 0.5,
    "is_favorite": true,
    "status": "example",
    "conditions": [
      {
        "type": "example",
        "url": "example"
      }
    ],
    "flag": "example"
  }
  ```

  {% endcut %}

- **Type**: [ChatGoal](#entity-ChatGoal)

  Click or tap on a chat.

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "id": 0,
    "name": "example",
    "type": "example",
    "default_price": 0.5,
    "is_favorite": true,
    "status": "example",
    "conditions": [
      null
    ]
  }
  ```

  {% endcut %}

- **Type**: [CompositeGoal](#entity-CompositeGoal)

  Multi-step goal.
  Used for grouping and setting the order of usual goals.
  The "Page view" and "JavaScript event" goals can be steps of a multi-step goal.
  A step is considered completed if all the previous steps were completed and all the current step's conditions were met.


  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "id": 0,
    "name": "example",
    "type": "example",
    "default_price": 0.5,
    "is_favorite": true,
    "status": "example",
    "steps": [
      {
        "id": 0,
        "name": "example",
        "type": "example",
        "default_price": 0.5,
        "is_favorite": true,
        "status": "example",
        "conditions": [
          {}
        ],
        "flag": "example"
      }
    ]
  }
  ```

  {% endcut %}

- **Type**: [DepthGoal](#entity-DepthGoal)

  Page depth.
  The goal is considered achieved if the user viewed the specified number of site pages.


  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "id": 0,
    "name": "example",
    "type": "example",
    "default_price": 0.5,
    "is_favorite": true,
    "status": "example",
    "depth": 2
  }
  ```

  {% endcut %}

- **Type**: [EmailGoal](#entity-EmailGoal)

  Clicks or taps on an email address.

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "id": 0,
    "name": "example",
    "type": "example",
    "default_price": 0.5,
    "is_favorite": true,
    "status": "example",
    "conditions": [
      {
        "type": "example",
        "url": "example"
      }
    ],
    "flag": "example"
  }
  ```

  {% endcut %}

- **Type**: [FileGoal](#entity-FileGoal)

  File download.
  The goal is considered achieved if the user downloaded any file or a specific file.


  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "id": 0,
    "name": "example",
    "type": "example",
    "default_price": 0.5,
    "is_favorite": true,
    "status": "example",
    "conditions": [
      {
        "type": "example",
        "url": "example"
      }
    ],
    "flag": "example"
  }
  ```

  {% endcut %}

- **Type**: [MessengerGoal](#entity-MessengerGoal)

  Click-through to a messaging app.
  The goal will be achieved once the user clicks the link to the messaging app.


  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "id": 0,
    "name": "example",
    "type": "example",
    "default_price": 0.5,
    "is_favorite": true,
    "status": "example",
    "conditions": [
      {
        "type": "example",
        "url": "example"
      }
    ],
    "flag": "example"
  }
  ```

  {% endcut %}

- **Type**: [PaymentSystemGoal](#entity-PaymentSystemGoal)

  Payment systems.
  The goal is considered achieved if the user makes a payment via a payment system.


  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "id": 0,
    "name": "example",
    "type": "example",
    "default_price": 0.5,
    "is_favorite": true,
    "status": "example"
  }
  ```

  {% endcut %}

- **Type**: [PhoneGoal](#entity-PhoneGoal)

  Clicks or taps on the phone number.

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "id": 0,
    "name": "example",
    "type": "example",
    "default_price": 0.5,
    "is_favorite": true,
    "status": "example",
    "conditions": [
      {
        "type": "example",
        "url": "example"
      }
    ],
    "flag": "example",
    "hide_phone_number": true
  }
  ```

  {% endcut %}

- **Type**: [SiteSearchGoal](#entity-SiteSearchGoal)

  Site search.
  The goal will be achieved when performing a site search if there is at least one match in the URL specified in the GET parameters.


  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "id": 0,
    "name": "example",
    "type": "example",
    "default_price": 0.5,
    "is_favorite": true,
    "status": "example",
    "conditions": [
      {
        "type": "example",
        "url": "example"
      }
    ],
    "flag": "example"
  }
  ```

  {% endcut %}

- **Type**: [SocialNetworkGoal](#entity-SocialNetworkGoal)

  Click-through to a social network.
  The goal will be achieved once the user clicks the link to the social network.


  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "id": 0,
    "name": "example",
    "type": "example",
    "default_price": 0.5,
    "is_favorite": true,
    "status": "example",
    "conditions": [
      {
        "type": "example",
        "url": "example"
      }
    ],
    "flag": "example"
  }
  ```

  {% endcut %}

- **Type**: [UrlGoal](#entity-UrlGoal)

  Pageviews.
  Achieved when at least one condition is met.


  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "id": 0,
    "name": "example",
    "type": "example",
    "default_price": 0.5,
    "is_favorite": true,
    "status": "example",
    "conditions": [
      {
        "type": "example",
        "url": "example"
      }
    ],
    "flag": "example"
  }
  ```

  {% endcut %}

- **Type**: [VisitDurationGoal](#entity-VisitDurationGoal)

  Session duration.
  The goal will be achieved if the session duration exceeds the specified one.


  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "id": 0,
    "name": "example",
    "type": "example",
    "default_price": 0.5,
    "is_favorite": true,
    "status": "example",
    "duration": 1
  }
  ```

  {% endcut %}

{% endcut %}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "id": 0,
  "name": "example",
  "type": "example",
  "default_price": 0.5,
  "is_favorite": true,
  "status": "example",
  "conditions": [
    {
      "type": "example",
      "url": "example"
    }
  ],
  "flag": "example"
}
```

{% endcut %}
{.table-cell}
||
|#{.json-schema-properties}

</div>

<div class="openapi-entity">

### GoalE {#entity-GoalE}

#|
|| **Name** | **Description** ||
||

_name_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

Goal name.

_Min length:_{.json-schema-reset .json-schema-assertion} `0`

_Max length:_{.json-schema-reset .json-schema-assertion} `255`

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_type_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

Goal type:
- `action`: JavaScript event.
- `chat`: Click on a chat.
- `email`: Click on an email address.
- `file`: File download.
- `messenger`: Click-through to a messenger.
- `number`: Number of views.
- `payment_system`: Payment system.
- `phone`: Click on a phone number.
- `search`: Site search.
- `social`: Click-through to social media.
- `step`: Multi-step goal.
- `url`: Pageviews.
- `visit_duration`: Session duration.


_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_default_price_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: number

Default goal cost.
{.table-cell}
||
||

_id_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: integer

ID of the goal. Specify this parameter when changing and deleting a tag goal.
{.table-cell}
||
||

_is_favorite_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: boolean

Whether the goal is favorite:
- 0: False (default).
- 1: True.

{.table-cell}
||
||

_status_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
|#{.json-schema-properties}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "id": 0,
  "name": "example",
  "type": "example",
  "default_price": 0.5,
  "is_favorite": true,
  "status": "example"
}
```

{% endcut %}

</div>

<div class="openapi-entity">

### GoalCondition {#entity-GoalCondition}

List of structures with the goal conditions.

#|
|| **Name** | **Description** ||
||

_type_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

Condition type:
- `contain`: Contains.
- `exact`: Matches exactly.
- `start`: Starts with.
- `regexp`: Matches a regular expression.
- `action`: Special type of conditions for the “JavaScript event” goals.
- `messenger`: Special type of conditions for “form“ goals, path in the DOM tree.
- `all_files`: Attribute for “Open messenger“ goals.
- `file`: Downloading a specific file for “File downloads” goals.
- `search`: Attribute for "Site search" goals.
- `all_social`: Special condition type for `social` goals (all social networks).
- `social`: Special condition type for `social` goals (a specific social network).
- `regexp_action`: JS event matches a regular expression (used exclusively in a step of a multi-step goal).
- `contain_action`: JS event contains (used only in a step of a multi-step goal).


_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_url_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

The value depends on the goal type:
- **Page view**. The URL of the page or a section of the page for the condition.
- **Click on email** or **Click on phone number**. Email or phone number specified in the links on the site. Learn more about tracking clicks on [email addresses](https://yandex.com/support/metrica/simple-goal/email.html) or [phone numbers](https://yandex.com/support/metrica/simple-goal/tel.html).
- **Open a messaging app**. Name of the messaging app retrieved using the [GET management/v1/messengers](https://yandex.com.tr/dev/metrika/en/management/openapi/goal/getMessengers.md) method, or the `all_messengers` value.
- **Site search**. The GET parameter that is used for site search. Yandex Metrica automatically recognizes the `q`, `text`, `query`, and `search` parameters. If the site uses a different parameter, specify it in the request.
- **File download**. File name. For example, `example.pdf`. You can leave this blank if you want to track all file downloads on the site.
- **Click-through to a social network**. The name of the social network, obtained using the [GET management/v1/social_networks](https://yandex.com.tr/dev/metrika/en/management/openapi/goal/getSocialNetworks.md) method, or the `all_social` value.


_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
|#{.json-schema-properties}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "type": "example",
  "url": "example"
}
```

{% endcut %}

</div>

<div class="openapi-entity">

### ActionGoal {#entity-ActionGoal}

JavaScript event.

{% cut "**All of 2 types**" %}{.json-schema-combinators data-marker=and}

- **Type**: [GoalE](#entity-GoalE)

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "id": 0,
    "name": "example",
    "type": "example",
    "default_price": 0.5,
    "is_favorite": true,
    "status": "example"
  }
  ```

  {% endcut %}

- {% cut "**Type**: object" %}

  #|
  ||

  _conditions_{.json-schema-reset .json-schema-property}
  {.table-cell}|
  **Type**: [GoalCondition](#entity-GoalCondition)[]

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  [
    {
      "type": "example",
      "url": "example"
    }
  ]
  ```

  {% endcut %}
  {.table-cell}
  ||
  ||

  _flag_{.json-schema-reset .json-schema-property}
  {.table-cell}|
  **Type**: string

  Goal type for Yandex Market clients:
  - `basket`: **Shopping cart**, shopping cart page.
  - `order`: **Order**, order confirmation page.


  _Example:_{.json-schema-reset .json-schema-example} `example`
  {.table-cell}
  ||
  |#{.json-schema-properties}

  {% endcut %}

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "conditions": [
      {
        "type": "example",
        "url": "example"
      }
    ],
    "flag": "example"
  }
  ```

  {% endcut %}

{% endcut %}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "id": 0,
  "name": "example",
  "type": "example",
  "default_price": 0.5,
  "is_favorite": true,
  "status": "example",
  "conditions": [
    {
      "type": "example",
      "url": "example"
    }
  ],
  "flag": "example"
}
```

{% endcut %}

</div>

<div class="openapi-entity">

### ChatGoalCondition {#entity-ChatGoalCondition}

List of structures with the goal conditions.

#|
|| **Name** | **Description** ||
||

_field_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

What the goal applies to:
- `chat_answered`: Status of a chat response.
- `chat_platform`: Chat platform.
- `chat_tag`: Chat tag.


_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
|#{.json-schema-properties}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "field": "example"
}
```

{% endcut %}

</div>

<div class="openapi-entity">

### ChatGoalConditionAnswered {#entity-ChatGoalConditionAnswered}

{% cut "**All of 2 types**" %}{.json-schema-combinators data-marker=and}

- **Type**: [ChatGoalCondition](#entity-ChatGoalCondition)

  List of structures with the goal conditions.

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "field": "example"
  }
  ```

  {% endcut %}

- {% cut "**Type**: object" %}

  #|
  ||

  _answered_{.json-schema-reset .json-schema-property}
  {.table-cell}|
  **Type**: boolean

  Status of a chat response.
  {.table-cell}
  ||
  |#{.json-schema-properties}

  {% endcut %}

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "answered": true
  }
  ```

  {% endcut %}

{% endcut %}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "field": "example",
  "answered": true
}
```

{% endcut %}

</div>

<div class="openapi-entity">

### ChatGoalConditionPlatform {#entity-ChatGoalConditionPlatform}

{% cut "**All of 2 types**" %}{.json-schema-combinators data-marker=and}

- **Type**: [ChatGoalCondition](#entity-ChatGoalCondition)

  List of structures with the goal conditions.

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "field": "example"
  }
  ```

  {% endcut %}

- {% cut "**Type**: object" %}

  #|
  ||

  _platform_{.json-schema-reset .json-schema-property}
  {.table-cell}|
  **Type**: string

  Chat platform.
  Possible values:
  - `telegram`
  - `viber`
  - `whatsApp`


  _Example:_{.json-schema-reset .json-schema-example} `telegram`
  {.table-cell}
  ||
  |#{.json-schema-properties}

  {% endcut %}

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "platform": "telegram"
  }
  ```

  {% endcut %}

{% endcut %}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "field": "example",
  "platform": "telegram"
}
```

{% endcut %}

</div>

<div class="openapi-entity">

### ChatGoalConditionTag {#entity-ChatGoalConditionTag}

{% cut "**All of 2 types**" %}{.json-schema-combinators data-marker=and}

- **Type**: [ChatGoalCondition](#entity-ChatGoalCondition)

  List of structures with the goal conditions.

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "field": "example"
  }
  ```

  {% endcut %}

- {% cut "**Type**: object" %}

  #|
  ||

  _operator_{.json-schema-reset .json-schema-property}
  {.table-cell}|
  **Type**: string

  Condition type. Possible values:
  - `contain`: Contains.
  - `exact`: Matches exactly.
  - `start`: Starts with.
  - `regexp`: Matches a regular expression.


  _Example:_{.json-schema-reset .json-schema-example} `example`
  {.table-cell}
  ||
  ||

  _value_{.json-schema-reset .json-schema-property}
  {.table-cell}|
  **Type**: string

  _Min length:_{.json-schema-reset .json-schema-assertion} `1`

  _Max length:_{.json-schema-reset .json-schema-assertion} `1024`

  _Example:_{.json-schema-reset .json-schema-example} `example`
  {.table-cell}
  ||
  |#{.json-schema-properties}

  {% endcut %}

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "operator": "example",
    "value": "example"
  }
  ```

  {% endcut %}

{% endcut %}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "field": "example",
  "operator": "example",
  "value": "example"
}
```

{% endcut %}

</div>

<div class="openapi-entity">

### ChatGoal {#entity-ChatGoal}

Click or tap on a chat.

{% cut "**All of 2 types**" %}{.json-schema-combinators data-marker=and}

- **Type**: [GoalE](#entity-GoalE)

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "id": 0,
    "name": "example",
    "type": "example",
    "default_price": 0.5,
    "is_favorite": true,
    "status": "example"
  }
  ```

  {% endcut %}

- {% cut "**Type**: object" %}

  #|
  ||

  _conditions_{.json-schema-reset .json-schema-property}
  {.table-cell}|
  {% cut "**Type**: array" %}

  {% cut "**One of 3 types**" %}{.json-schema-combinators data-marker=or}

  - **Type**: [ChatGoalConditionAnswered](#entity-ChatGoalConditionAnswered)

    {% cut "**Example**" %}{.json-schema-example}

    ```json translate=no
    {
      "field": "example",
      "answered": true
    }
    ```

    {% endcut %}

  - **Type**: [ChatGoalConditionPlatform](#entity-ChatGoalConditionPlatform)

    {% cut "**Example**" %}{.json-schema-example}

    ```json translate=no
    {
      "field": "example",
      "platform": "telegram"
    }
    ```

    {% endcut %}

  - **Type**: [ChatGoalConditionTag](#entity-ChatGoalConditionTag)

    {% cut "**Example**" %}{.json-schema-example}

    ```json translate=no
    {
      "field": "example",
      "operator": "example",
      "value": "example"
    }
    ```

    {% endcut %}

  {% endcut %}

  {% endcut %}

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  [
    {
      "field": "example",
      "answered": true
    }
  ]
  ```

  {% endcut %}
  {.table-cell}
  ||
  |#{.json-schema-properties}

  {% endcut %}

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "conditions": [
      {
        "field": "example",
        "answered": true
      }
    ]
  }
  ```

  {% endcut %}

{% endcut %}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "id": 0,
  "name": "example",
  "type": "example",
  "default_price": 0.5,
  "is_favorite": true,
  "status": "example",
  "conditions": [
    null
  ]
}
```

{% endcut %}

</div>

<div class="openapi-entity">

### ConditionalGoal {#entity-ConditionalGoal}

List of steps in a multi-step goal.

#|
|| **Name** | **Description** ||
||

_name_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

Goal name.

_Min length:_{.json-schema-reset .json-schema-assertion} `0`

_Max length:_{.json-schema-reset .json-schema-assertion} `255`

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_type_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

Goal type:
- `action`: JavaScript event.
- `chat`: Click on a chat.
- `email`: Click on an email address.
- `file`: File download.
- `messenger`: Click-through to a messenger.
- `number`: Number of views.
- `payment_system`: Payment system.
- `phone`: Click on a phone number.
- `search`: Site search.
- `social`: Click-through to social media.
- `step`: Multi-step goal.
- `url`: Pageviews.
- `visit_duration`: Session duration.


_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_conditions_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: [GoalCondition](#entity-GoalCondition)[]

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
[
  {
    "type": "example",
    "url": "example"
  }
]
```

{% endcut %}
{.table-cell}
||
||

_default_price_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: number

Default goal cost.
{.table-cell}
||
||

_flag_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

Goal type for Yandex Market clients:
- `basket`: **Shopping cart**, shopping cart page.
- `order`: **Order**, order confirmation page.


_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_id_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: integer

ID of the goal. Specify this parameter when changing and deleting a tag goal.
{.table-cell}
||
||

_is_favorite_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: boolean

Whether the goal is favorite:
- 0: False (default).
- 1: True.

{.table-cell}
||
||

_status_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
|#{.json-schema-properties}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "id": 0,
  "name": "example",
  "type": "example",
  "default_price": 0.5,
  "is_favorite": true,
  "status": "example",
  "conditions": [
    {
      "type": "example",
      "url": "example"
    }
  ],
  "flag": "example"
}
```

{% endcut %}

</div>

<div class="openapi-entity">

### CompositeGoal {#entity-CompositeGoal}

Multi-step goal.
Used for grouping and setting the order of usual goals.
The "Page view" and "JavaScript event" goals can be steps of a multi-step goal.
A step is considered completed if all the previous steps were completed and all the current step's conditions were met.


{% cut "**All of 2 types**" %}{.json-schema-combinators data-marker=and}

- **Type**: [GoalE](#entity-GoalE)

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "id": 0,
    "name": "example",
    "type": "example",
    "default_price": 0.5,
    "is_favorite": true,
    "status": "example"
  }
  ```

  {% endcut %}

- {% cut "**Type**: object" %}

  #|
  ||

  _steps_{.json-schema-reset .json-schema-property}
  {.table-cell}|
  **Type**: [ConditionalGoal](#entity-ConditionalGoal)[]

  _Min items:_{.json-schema-reset .json-schema-assertion} `0`

  _Max items:_{.json-schema-reset .json-schema-assertion} `5`

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  [
    {
      "id": 0,
      "name": "example",
      "type": "example",
      "default_price": 0.5,
      "is_favorite": true,
      "status": "example",
      "conditions": [
        {
          "type": "example",
          "url": "example"
        }
      ],
      "flag": "example"
    }
  ]
  ```

  {% endcut %}
  {.table-cell}
  ||
  |#{.json-schema-properties}

  {% endcut %}

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "steps": [
      {
        "id": 0,
        "name": "example",
        "type": "example",
        "default_price": 0.5,
        "is_favorite": true,
        "status": "example",
        "conditions": [
          {
            "type": "example",
            "url": "example"
          }
        ],
        "flag": "example"
      }
    ]
  }
  ```

  {% endcut %}

{% endcut %}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "id": 0,
  "name": "example",
  "type": "example",
  "default_price": 0.5,
  "is_favorite": true,
  "status": "example",
  "steps": [
    {
      "id": 0,
      "name": "example",
      "type": "example",
      "default_price": 0.5,
      "is_favorite": true,
      "status": "example",
      "conditions": [
        {}
      ],
      "flag": "example"
    }
  ]
}
```

{% endcut %}

</div>

<div class="openapi-entity">

### DepthGoal {#entity-DepthGoal}

Page depth.
The goal is considered achieved if the user viewed the specified number of site pages.


{% cut "**All of 2 types**" %}{.json-schema-combinators data-marker=and}

- **Type**: [GoalE](#entity-GoalE)

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "id": 0,
    "name": "example",
    "type": "example",
    "default_price": 0.5,
    "is_favorite": true,
    "status": "example"
  }
  ```

  {% endcut %}

- {% cut "**Type**: object" %}

  #|
  ||

  _depth_{.json-schema-reset .json-schema-property}
  {.table-cell}|
  **Type**: integer

  Number of pages viewed by the user.

  _Min value:_{.json-schema-reset .json-schema-assertion} `2`
  {.table-cell}
  ||
  |#{.json-schema-properties}

  {% endcut %}

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "depth": 2
  }
  ```

  {% endcut %}

{% endcut %}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "id": 0,
  "name": "example",
  "type": "example",
  "default_price": 0.5,
  "is_favorite": true,
  "status": "example",
  "depth": 2
}
```

{% endcut %}

</div>

<div class="openapi-entity">

### EmailGoal {#entity-EmailGoal}

Clicks or taps on an email address.

{% cut "**All of 2 types**" %}{.json-schema-combinators data-marker=and}

- **Type**: [GoalE](#entity-GoalE)

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "id": 0,
    "name": "example",
    "type": "example",
    "default_price": 0.5,
    "is_favorite": true,
    "status": "example"
  }
  ```

  {% endcut %}

- {% cut "**Type**: object" %}

  #|
  ||

  _conditions_{.json-schema-reset .json-schema-property}
  {.table-cell}|
  **Type**: [GoalCondition](#entity-GoalCondition)[]

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  [
    {
      "type": "example",
      "url": "example"
    }
  ]
  ```

  {% endcut %}
  {.table-cell}
  ||
  ||

  _flag_{.json-schema-reset .json-schema-property}
  {.table-cell}|
  **Type**: string

  Goal type for Yandex Market clients:
  - `basket`: **Shopping cart**, shopping cart page.
  - `order`: **Order**, order confirmation page.


  _Example:_{.json-schema-reset .json-schema-example} `example`
  {.table-cell}
  ||
  |#{.json-schema-properties}

  {% endcut %}

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "conditions": [
      {
        "type": "example",
        "url": "example"
      }
    ],
    "flag": "example"
  }
  ```

  {% endcut %}

{% endcut %}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "id": 0,
  "name": "example",
  "type": "example",
  "default_price": 0.5,
  "is_favorite": true,
  "status": "example",
  "conditions": [
    {
      "type": "example",
      "url": "example"
    }
  ],
  "flag": "example"
}
```

{% endcut %}

</div>

<div class="openapi-entity">

### FileGoal {#entity-FileGoal}

File download.
The goal is considered achieved if the user downloaded any file or a specific file.


{% cut "**All of 2 types**" %}{.json-schema-combinators data-marker=and}

- **Type**: [GoalE](#entity-GoalE)

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "id": 0,
    "name": "example",
    "type": "example",
    "default_price": 0.5,
    "is_favorite": true,
    "status": "example"
  }
  ```

  {% endcut %}

- {% cut "**Type**: object" %}

  #|
  ||

  _conditions_{.json-schema-reset .json-schema-property}
  {.table-cell}|
  **Type**: [GoalCondition](#entity-GoalCondition)[]

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  [
    {
      "type": "example",
      "url": "example"
    }
  ]
  ```

  {% endcut %}
  {.table-cell}
  ||
  ||

  _flag_{.json-schema-reset .json-schema-property}
  {.table-cell}|
  **Type**: string

  Goal type for Yandex Market clients:
  - `basket`: **Shopping cart**, shopping cart page.
  - `order`: **Order**, order confirmation page.


  _Example:_{.json-schema-reset .json-schema-example} `example`
  {.table-cell}
  ||
  |#{.json-schema-properties}

  {% endcut %}

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "conditions": [
      {
        "type": "example",
        "url": "example"
      }
    ],
    "flag": "example"
  }
  ```

  {% endcut %}

{% endcut %}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "id": 0,
  "name": "example",
  "type": "example",
  "default_price": 0.5,
  "is_favorite": true,
  "status": "example",
  "conditions": [
    {
      "type": "example",
      "url": "example"
    }
  ],
  "flag": "example"
}
```

{% endcut %}

</div>

<div class="openapi-entity">

### MessengerGoal {#entity-MessengerGoal}

Click-through to a messaging app.
The goal will be achieved once the user clicks the link to the messaging app.


{% cut "**All of 2 types**" %}{.json-schema-combinators data-marker=and}

- **Type**: [GoalE](#entity-GoalE)

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "id": 0,
    "name": "example",
    "type": "example",
    "default_price": 0.5,
    "is_favorite": true,
    "status": "example"
  }
  ```

  {% endcut %}

- {% cut "**Type**: object" %}

  #|
  ||

  _conditions_{.json-schema-reset .json-schema-property}
  {.table-cell}|
  **Type**: [GoalCondition](#entity-GoalCondition)[]

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  [
    {
      "type": "example",
      "url": "example"
    }
  ]
  ```

  {% endcut %}
  {.table-cell}
  ||
  ||

  _flag_{.json-schema-reset .json-schema-property}
  {.table-cell}|
  **Type**: string

  Goal type for Yandex Market clients:
  - `basket`: **Shopping cart**, shopping cart page.
  - `order`: **Order**, order confirmation page.


  _Example:_{.json-schema-reset .json-schema-example} `example`
  {.table-cell}
  ||
  |#{.json-schema-properties}

  {% endcut %}

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "conditions": [
      {
        "type": "example",
        "url": "example"
      }
    ],
    "flag": "example"
  }
  ```

  {% endcut %}

{% endcut %}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "id": 0,
  "name": "example",
  "type": "example",
  "default_price": 0.5,
  "is_favorite": true,
  "status": "example",
  "conditions": [
    {
      "type": "example",
      "url": "example"
    }
  ],
  "flag": "example"
}
```

{% endcut %}

</div>

<div class="openapi-entity">

### PaymentSystemGoal {#entity-PaymentSystemGoal}

Payment systems.
The goal is considered achieved if the user makes a payment via a payment system.


{% cut "**All of 1 type**" %}{.json-schema-combinators data-marker=and}

- **Type**: [GoalE](#entity-GoalE)

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "id": 0,
    "name": "example",
    "type": "example",
    "default_price": 0.5,
    "is_favorite": true,
    "status": "example"
  }
  ```

  {% endcut %}

{% endcut %}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "id": 0,
  "name": "example",
  "type": "example",
  "default_price": 0.5,
  "is_favorite": true,
  "status": "example"
}
```

{% endcut %}

</div>

<div class="openapi-entity">

### PhoneGoal {#entity-PhoneGoal}

Clicks or taps on the phone number.

{% cut "**All of 2 types**" %}{.json-schema-combinators data-marker=and}

- **Type**: [GoalE](#entity-GoalE)

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "id": 0,
    "name": "example",
    "type": "example",
    "default_price": 0.5,
    "is_favorite": true,
    "status": "example"
  }
  ```

  {% endcut %}

- {% cut "**Type**: object" %}

  #|
  ||

  _conditions_{.json-schema-reset .json-schema-property}
  {.table-cell}|
  **Type**: [GoalCondition](#entity-GoalCondition)[]

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  [
    {
      "type": "example",
      "url": "example"
    }
  ]
  ```

  {% endcut %}
  {.table-cell}
  ||
  ||

  _flag_{.json-schema-reset .json-schema-property}
  {.table-cell}|
  **Type**: string

  Goal type for Yandex Market clients:
  - `basket`: **Shopping cart**, shopping cart page.
  - `order`: **Order**, order confirmation page.


  _Example:_{.json-schema-reset .json-schema-example} `example`
  {.table-cell}
  ||
  ||

  _hide_phone_number_{.json-schema-reset .json-schema-property}
  {.table-cell}|
  **Type**: boolean

  Hide the phone number on desktop devices.
  {.table-cell}
  ||
  |#{.json-schema-properties}

  {% endcut %}

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "conditions": [
      {
        "type": "example",
        "url": "example"
      }
    ],
    "flag": "example",
    "hide_phone_number": true
  }
  ```

  {% endcut %}

{% endcut %}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "id": 0,
  "name": "example",
  "type": "example",
  "default_price": 0.5,
  "is_favorite": true,
  "status": "example",
  "conditions": [
    {
      "type": "example",
      "url": "example"
    }
  ],
  "flag": "example",
  "hide_phone_number": true
}
```

{% endcut %}

</div>

<div class="openapi-entity">

### SiteSearchGoal {#entity-SiteSearchGoal}

Site search.
The goal will be achieved when performing a site search if there is at least one match in the URL specified in the GET parameters.


{% cut "**All of 2 types**" %}{.json-schema-combinators data-marker=and}

- **Type**: [GoalE](#entity-GoalE)

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "id": 0,
    "name": "example",
    "type": "example",
    "default_price": 0.5,
    "is_favorite": true,
    "status": "example"
  }
  ```

  {% endcut %}

- {% cut "**Type**: object" %}

  #|
  ||

  _conditions_{.json-schema-reset .json-schema-property}
  {.table-cell}|
  **Type**: [GoalCondition](#entity-GoalCondition)[]

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  [
    {
      "type": "example",
      "url": "example"
    }
  ]
  ```

  {% endcut %}
  {.table-cell}
  ||
  ||

  _flag_{.json-schema-reset .json-schema-property}
  {.table-cell}|
  **Type**: string

  Goal type for Yandex Market clients:
  - `basket`: **Shopping cart**, shopping cart page.
  - `order`: **Order**, order confirmation page.


  _Example:_{.json-schema-reset .json-schema-example} `example`
  {.table-cell}
  ||
  |#{.json-schema-properties}

  {% endcut %}

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "conditions": [
      {
        "type": "example",
        "url": "example"
      }
    ],
    "flag": "example"
  }
  ```

  {% endcut %}

{% endcut %}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "id": 0,
  "name": "example",
  "type": "example",
  "default_price": 0.5,
  "is_favorite": true,
  "status": "example",
  "conditions": [
    {
      "type": "example",
      "url": "example"
    }
  ],
  "flag": "example"
}
```

{% endcut %}

</div>

<div class="openapi-entity">

### SocialNetworkGoal {#entity-SocialNetworkGoal}

Click-through to a social network.
The goal will be achieved once the user clicks the link to the social network.


{% cut "**All of 2 types**" %}{.json-schema-combinators data-marker=and}

- **Type**: [GoalE](#entity-GoalE)

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "id": 0,
    "name": "example",
    "type": "example",
    "default_price": 0.5,
    "is_favorite": true,
    "status": "example"
  }
  ```

  {% endcut %}

- {% cut "**Type**: object" %}

  #|
  ||

  _conditions_{.json-schema-reset .json-schema-property}
  {.table-cell}|
  **Type**: [GoalCondition](#entity-GoalCondition)[]

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  [
    {
      "type": "example",
      "url": "example"
    }
  ]
  ```

  {% endcut %}
  {.table-cell}
  ||
  ||

  _flag_{.json-schema-reset .json-schema-property}
  {.table-cell}|
  **Type**: string

  Goal type for Yandex Market clients:
  - `basket`: **Shopping cart**, shopping cart page.
  - `order`: **Order**, order confirmation page.


  _Example:_{.json-schema-reset .json-schema-example} `example`
  {.table-cell}
  ||
  |#{.json-schema-properties}

  {% endcut %}

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "conditions": [
      {
        "type": "example",
        "url": "example"
      }
    ],
    "flag": "example"
  }
  ```

  {% endcut %}

{% endcut %}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "id": 0,
  "name": "example",
  "type": "example",
  "default_price": 0.5,
  "is_favorite": true,
  "status": "example",
  "conditions": [
    {
      "type": "example",
      "url": "example"
    }
  ],
  "flag": "example"
}
```

{% endcut %}

</div>

<div class="openapi-entity">

### UrlGoal {#entity-UrlGoal}

Pageviews.
Achieved when at least one condition is met.


{% cut "**All of 2 types**" %}{.json-schema-combinators data-marker=and}

- **Type**: [GoalE](#entity-GoalE)

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "id": 0,
    "name": "example",
    "type": "example",
    "default_price": 0.5,
    "is_favorite": true,
    "status": "example"
  }
  ```

  {% endcut %}

- {% cut "**Type**: object" %}

  #|
  ||

  _conditions_{.json-schema-reset .json-schema-property}
  {.table-cell}|
  **Type**: [GoalCondition](#entity-GoalCondition)[]

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  [
    {
      "type": "example",
      "url": "example"
    }
  ]
  ```

  {% endcut %}
  {.table-cell}
  ||
  ||

  _flag_{.json-schema-reset .json-schema-property}
  {.table-cell}|
  **Type**: string

  Goal type for Yandex Market clients:
  - `basket`: **Shopping cart**, shopping cart page.
  - `order`: **Order**, order confirmation page.


  _Example:_{.json-schema-reset .json-schema-example} `example`
  {.table-cell}
  ||
  |#{.json-schema-properties}

  {% endcut %}

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "conditions": [
      {
        "type": "example",
        "url": "example"
      }
    ],
    "flag": "example"
  }
  ```

  {% endcut %}

{% endcut %}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "id": 0,
  "name": "example",
  "type": "example",
  "default_price": 0.5,
  "is_favorite": true,
  "status": "example",
  "conditions": [
    {
      "type": "example",
      "url": "example"
    }
  ],
  "flag": "example"
}
```

{% endcut %}

</div>

<div class="openapi-entity">

### VisitDurationGoal {#entity-VisitDurationGoal}

Session duration.
The goal will be achieved if the session duration exceeds the specified one.


{% cut "**All of 2 types**" %}{.json-schema-combinators data-marker=and}

- **Type**: [GoalE](#entity-GoalE)

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "id": 0,
    "name": "example",
    "type": "example",
    "default_price": 0.5,
    "is_favorite": true,
    "status": "example"
  }
  ```

  {% endcut %}

- {% cut "**Type**: object" %}

  #|
  ||

  _duration_{.json-schema-reset .json-schema-property}
  {.table-cell}|
  **Type**: integer

  Session duration in seconds.

  _Min value:_{.json-schema-reset .json-schema-assertion} `1`
  {.table-cell}
  ||
  |#{.json-schema-properties}

  {% endcut %}

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "duration": 1
  }
  ```

  {% endcut %}

{% endcut %}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "id": 0,
  "name": "example",
  "type": "example",
  "default_price": 0.5,
  "is_favorite": true,
  "status": "example",
  "duration": 1
}
```

{% endcut %}

</div>

## Responses

<div class="openapi__response__code__200">

## 200 OK

OK

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "goal": {
    "id": 0,
    "name": "example",
    "type": "example",
    "default_price": 0.5,
    "goal_source": "example",
    "is_favorite": true,
    "status": "example",
    "conditions": [
      {}
    ],
    "flag": "example"
  }
}
```

{% endcut %}

#|
|| **Name** | **Description** ||
||

_goal_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
{% cut "**One of 13 types**" %}{.json-schema-combinators data-marker=or}

- **Type**: [ActionGoal](#entity-ActionGoal1)

  JavaScript event.

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "id": 0,
    "name": "example",
    "type": "example",
    "default_price": 0.5,
    "goal_source": "example",
    "is_favorite": true,
    "status": "example",
    "conditions": [
      {
        "type": "example",
        "url": "example"
      }
    ],
    "flag": "example"
  }
  ```

  {% endcut %}

- **Type**: [ChatGoal](#entity-ChatGoal1)

  Click or tap on a chat.

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "id": 0,
    "name": "example",
    "type": "example",
    "default_price": 0.5,
    "goal_source": "example",
    "is_favorite": true,
    "status": "example",
    "conditions": [
      null
    ]
  }
  ```

  {% endcut %}

- **Type**: [CompositeGoal](#entity-CompositeGoal1)

  Multi-step goal.
  Used for grouping and setting the order of usual goals.
  The "Page view" and "JavaScript event" goals can be steps of a multi-step goal.
  A step is considered completed if all the previous steps were completed and all the current step's conditions were met.


  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "id": 0,
    "name": "example",
    "type": "example",
    "default_price": 0.5,
    "goal_source": "example",
    "is_favorite": true,
    "status": "example",
    "steps": [
      {
        "id": 0,
        "name": "example",
        "type": "example",
        "default_price": 0.5,
        "goal_source": "example",
        "is_favorite": true,
        "status": "example",
        "conditions": [
          {}
        ],
        "flag": "example"
      }
    ]
  }
  ```

  {% endcut %}

- **Type**: [DepthGoal](#entity-DepthGoal1)

  Page depth.
  The goal is considered achieved if the user viewed the specified number of site pages.


  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "id": 0,
    "name": "example",
    "type": "example",
    "default_price": 0.5,
    "goal_source": "example",
    "is_favorite": true,
    "status": "example",
    "depth": 2
  }
  ```

  {% endcut %}

- **Type**: [EmailGoal](#entity-EmailGoal1)

  Clicks or taps on an email address.

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "id": 0,
    "name": "example",
    "type": "example",
    "default_price": 0.5,
    "goal_source": "example",
    "is_favorite": true,
    "status": "example",
    "conditions": [
      {
        "type": "example",
        "url": "example"
      }
    ],
    "flag": "example"
  }
  ```

  {% endcut %}

- **Type**: [FileGoal](#entity-FileGoal1)

  File download.
  The goal is considered achieved if the user downloaded any file or a specific file.


  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "id": 0,
    "name": "example",
    "type": "example",
    "default_price": 0.5,
    "goal_source": "example",
    "is_favorite": true,
    "status": "example",
    "conditions": [
      {
        "type": "example",
        "url": "example"
      }
    ],
    "flag": "example"
  }
  ```

  {% endcut %}

- **Type**: [MessengerGoal](#entity-MessengerGoal1)

  Click-through to a messaging app.
  The goal will be achieved once the user clicks the link to the messaging app.


  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "id": 0,
    "name": "example",
    "type": "example",
    "default_price": 0.5,
    "goal_source": "example",
    "is_favorite": true,
    "status": "example",
    "conditions": [
      {
        "type": "example",
        "url": "example"
      }
    ],
    "flag": "example"
  }
  ```

  {% endcut %}

- **Type**: [PaymentSystemGoal](#entity-PaymentSystemGoal1)

  Payment systems.
  The goal is considered achieved if the user makes a payment via a payment system.


  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "id": 0,
    "name": "example",
    "type": "example",
    "default_price": 0.5,
    "goal_source": "example",
    "is_favorite": true,
    "status": "example"
  }
  ```

  {% endcut %}

- **Type**: [PhoneGoal](#entity-PhoneGoal1)

  Clicks or taps on the phone number.

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "id": 0,
    "name": "example",
    "type": "example",
    "default_price": 0.5,
    "goal_source": "example",
    "is_favorite": true,
    "status": "example",
    "conditions": [
      {
        "type": "example",
        "url": "example"
      }
    ],
    "flag": "example",
    "hide_phone_number": true
  }
  ```

  {% endcut %}

- **Type**: [SiteSearchGoal](#entity-SiteSearchGoal1)

  Site search.
  The goal will be achieved when performing a site search if there is at least one match in the URL specified in the GET parameters.


  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "id": 0,
    "name": "example",
    "type": "example",
    "default_price": 0.5,
    "goal_source": "example",
    "is_favorite": true,
    "status": "example",
    "conditions": [
      {
        "type": "example",
        "url": "example"
      }
    ],
    "flag": "example"
  }
  ```

  {% endcut %}

- **Type**: [SocialNetworkGoal](#entity-SocialNetworkGoal1)

  Click-through to a social network.
  The goal will be achieved once the user clicks the link to the social network.


  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "id": 0,
    "name": "example",
    "type": "example",
    "default_price": 0.5,
    "goal_source": "example",
    "is_favorite": true,
    "status": "example",
    "conditions": [
      {
        "type": "example",
        "url": "example"
      }
    ],
    "flag": "example"
  }
  ```

  {% endcut %}

- **Type**: [UrlGoal](#entity-UrlGoal1)

  Pageviews.
  Achieved when at least one condition is met.


  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "id": 0,
    "name": "example",
    "type": "example",
    "default_price": 0.5,
    "goal_source": "example",
    "is_favorite": true,
    "status": "example",
    "conditions": [
      {
        "type": "example",
        "url": "example"
      }
    ],
    "flag": "example"
  }
  ```

  {% endcut %}

- **Type**: [VisitDurationGoal](#entity-VisitDurationGoal1)

  Session duration.
  The goal will be achieved if the session duration exceeds the specified one.


  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "id": 0,
    "name": "example",
    "type": "example",
    "default_price": 0.5,
    "goal_source": "example",
    "is_favorite": true,
    "status": "example",
    "duration": 1
  }
  ```

  {% endcut %}

{% endcut %}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "id": 0,
  "name": "example",
  "type": "example",
  "default_price": 0.5,
  "goal_source": "example",
  "is_favorite": true,
  "status": "example",
  "conditions": [
    {
      "type": "example",
      "url": "example"
    }
  ],
  "flag": "example"
}
```

{% endcut %}
{.table-cell}
||
|#{.json-schema-properties}

</div>

<div class="openapi-entity">

### GoalE {#entity-GoalE1}

#|
|| **Name** | **Description** ||
||

_name_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

Goal name.

_Min length:_{.json-schema-reset .json-schema-assertion} `0`

_Max length:_{.json-schema-reset .json-schema-assertion} `255`

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_type_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

Goal type:
- `action`: JavaScript event.
- `chat`: Click on a chat.
- `email`: Click on an email address.
- `file`: File download.
- `messenger`: Click-through to a messenger.
- `number`: Number of views.
- `payment_system`: Payment system.
- `phone`: Click on a phone number.
- `search`: Site search.
- `social`: Click-through to social media.
- `step`: Multi-step goal.
- `url`: Pageviews.
- `visit_duration`: Session duration.


_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_default_price_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: number

Default goal cost.
{.table-cell}
||
||

_goal_source_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

Indicates how the goal was created:
- `user`: The goal was created by a Yandex Metrica user.
- `auto`: The goal was created automatically. Such goals include [automatic goals](https://yandex.ru/support/metrica/general/auto-goals.html?lang=en) and the **Call** goal (created when [passing call data](https://yandex.com.tr/dev/metrika/en/management/calls.md)).


_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_id_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: integer

ID of the goal. Specify this parameter when changing and deleting a tag goal.
{.table-cell}
||
||

_is_favorite_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: boolean

Whether the goal is favorite:
- 0: False (default).
- 1: True.

{.table-cell}
||
||

_status_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
|#{.json-schema-properties}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "id": 0,
  "name": "example",
  "type": "example",
  "default_price": 0.5,
  "goal_source": "example",
  "is_favorite": true,
  "status": "example"
}
```

{% endcut %}

</div>

<div class="openapi-entity">

### ActionGoal {#entity-ActionGoal1}

JavaScript event.

{% cut "**All of 2 types**" %}{.json-schema-combinators data-marker=and}

- **Type**: [GoalE](#entity-GoalE1)

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "id": 0,
    "name": "example",
    "type": "example",
    "default_price": 0.5,
    "goal_source": "example",
    "is_favorite": true,
    "status": "example"
  }
  ```

  {% endcut %}

- {% cut "**Type**: object" %}

  #|
  ||

  _conditions_{.json-schema-reset .json-schema-property}
  {.table-cell}|
  **Type**: [GoalCondition](#entity-GoalCondition)[]

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  [
    {
      "type": "example",
      "url": "example"
    }
  ]
  ```

  {% endcut %}
  {.table-cell}
  ||
  ||

  _flag_{.json-schema-reset .json-schema-property}
  {.table-cell}|
  **Type**: string

  Goal type for Yandex Market clients:
  - `basket`: **Shopping cart**, shopping cart page.
  - `order`: **Order**, order confirmation page.


  _Example:_{.json-schema-reset .json-schema-example} `example`
  {.table-cell}
  ||
  |#{.json-schema-properties}

  {% endcut %}

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "conditions": [
      {
        "type": "example",
        "url": "example"
      }
    ],
    "flag": "example"
  }
  ```

  {% endcut %}

{% endcut %}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "id": 0,
  "name": "example",
  "type": "example",
  "default_price": 0.5,
  "goal_source": "example",
  "is_favorite": true,
  "status": "example",
  "conditions": [
    {
      "type": "example",
      "url": "example"
    }
  ],
  "flag": "example"
}
```

{% endcut %}

</div>

<div class="openapi-entity">

### ChatGoal {#entity-ChatGoal1}

Click or tap on a chat.

{% cut "**All of 2 types**" %}{.json-schema-combinators data-marker=and}

- **Type**: [GoalE](#entity-GoalE1)

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "id": 0,
    "name": "example",
    "type": "example",
    "default_price": 0.5,
    "goal_source": "example",
    "is_favorite": true,
    "status": "example"
  }
  ```

  {% endcut %}

- {% cut "**Type**: object" %}

  #|
  ||

  _conditions_{.json-schema-reset .json-schema-property}
  {.table-cell}|
  {% cut "**Type**: array" %}

  {% cut "**One of 3 types**" %}{.json-schema-combinators data-marker=or}

  - **Type**: [ChatGoalConditionAnswered](#entity-ChatGoalConditionAnswered)

    {% cut "**Example**" %}{.json-schema-example}

    ```json translate=no
    {
      "field": "example",
      "answered": true
    }
    ```

    {% endcut %}

  - **Type**: [ChatGoalConditionPlatform](#entity-ChatGoalConditionPlatform)

    {% cut "**Example**" %}{.json-schema-example}

    ```json translate=no
    {
      "field": "example",
      "platform": "telegram"
    }
    ```

    {% endcut %}

  - **Type**: [ChatGoalConditionTag](#entity-ChatGoalConditionTag)

    {% cut "**Example**" %}{.json-schema-example}

    ```json translate=no
    {
      "field": "example",
      "operator": "example",
      "value": "example"
    }
    ```

    {% endcut %}

  {% endcut %}

  {% endcut %}

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  [
    {
      "field": "example",
      "answered": true
    }
  ]
  ```

  {% endcut %}
  {.table-cell}
  ||
  |#{.json-schema-properties}

  {% endcut %}

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "conditions": [
      {
        "field": "example",
        "answered": true
      }
    ]
  }
  ```

  {% endcut %}

{% endcut %}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "id": 0,
  "name": "example",
  "type": "example",
  "default_price": 0.5,
  "goal_source": "example",
  "is_favorite": true,
  "status": "example",
  "conditions": [
    null
  ]
}
```

{% endcut %}

</div>

<div class="openapi-entity">

### ConditionalGoal {#entity-ConditionalGoal1}

List of steps in a multi-step goal.

#|
|| **Name** | **Description** ||
||

_name_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

Goal name.

_Min length:_{.json-schema-reset .json-schema-assertion} `0`

_Max length:_{.json-schema-reset .json-schema-assertion} `255`

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_type_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

Goal type:
- `action`: JavaScript event.
- `chat`: Click on a chat.
- `email`: Click on an email address.
- `file`: File download.
- `messenger`: Click-through to a messenger.
- `number`: Number of views.
- `payment_system`: Payment system.
- `phone`: Click on a phone number.
- `search`: Site search.
- `social`: Click-through to social media.
- `step`: Multi-step goal.
- `url`: Pageviews.
- `visit_duration`: Session duration.


_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_conditions_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: [GoalCondition](#entity-GoalCondition)[]

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
[
  {
    "type": "example",
    "url": "example"
  }
]
```

{% endcut %}
{.table-cell}
||
||

_default_price_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: number

Default goal cost.
{.table-cell}
||
||

_flag_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

Goal type for Yandex Market clients:
- `basket`: **Shopping cart**, shopping cart page.
- `order`: **Order**, order confirmation page.


_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_goal_source_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

Indicates how the goal was created:
- `user`: The goal was created by a Yandex Metrica user.
- `auto`: The goal was created automatically. Such goals include [automatic goals](https://yandex.ru/support/metrica/general/auto-goals.html?lang=en) and the **Call** goal (created when [passing call data](https://yandex.com.tr/dev/metrika/en/management/calls.md)).


_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_id_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: integer

ID of the goal. Specify this parameter when changing and deleting a tag goal.
{.table-cell}
||
||

_is_favorite_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: boolean

Whether the goal is favorite:
- 0: False (default).
- 1: True.

{.table-cell}
||
||

_status_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
|#{.json-schema-properties}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "id": 0,
  "name": "example",
  "type": "example",
  "default_price": 0.5,
  "goal_source": "example",
  "is_favorite": true,
  "status": "example",
  "conditions": [
    {
      "type": "example",
      "url": "example"
    }
  ],
  "flag": "example"
}
```

{% endcut %}

</div>

<div class="openapi-entity">

### CompositeGoal {#entity-CompositeGoal1}

Multi-step goal.
Used for grouping and setting the order of usual goals.
The "Page view" and "JavaScript event" goals can be steps of a multi-step goal.
A step is considered completed if all the previous steps were completed and all the current step's conditions were met.


{% cut "**All of 2 types**" %}{.json-schema-combinators data-marker=and}

- **Type**: [GoalE](#entity-GoalE1)

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "id": 0,
    "name": "example",
    "type": "example",
    "default_price": 0.5,
    "goal_source": "example",
    "is_favorite": true,
    "status": "example"
  }
  ```

  {% endcut %}

- {% cut "**Type**: object" %}

  #|
  ||

  _steps_{.json-schema-reset .json-schema-property}
  {.table-cell}|
  **Type**: [ConditionalGoal](#entity-ConditionalGoal1)[]

  _Min items:_{.json-schema-reset .json-schema-assertion} `0`

  _Max items:_{.json-schema-reset .json-schema-assertion} `5`

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  [
    {
      "id": 0,
      "name": "example",
      "type": "example",
      "default_price": 0.5,
      "goal_source": "example",
      "is_favorite": true,
      "status": "example",
      "conditions": [
        {
          "type": "example",
          "url": "example"
        }
      ],
      "flag": "example"
    }
  ]
  ```

  {% endcut %}
  {.table-cell}
  ||
  |#{.json-schema-properties}

  {% endcut %}

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "steps": [
      {
        "id": 0,
        "name": "example",
        "type": "example",
        "default_price": 0.5,
        "goal_source": "example",
        "is_favorite": true,
        "status": "example",
        "conditions": [
          {
            "type": "example",
            "url": "example"
          }
        ],
        "flag": "example"
      }
    ]
  }
  ```

  {% endcut %}

{% endcut %}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "id": 0,
  "name": "example",
  "type": "example",
  "default_price": 0.5,
  "goal_source": "example",
  "is_favorite": true,
  "status": "example",
  "steps": [
    {
      "id": 0,
      "name": "example",
      "type": "example",
      "default_price": 0.5,
      "goal_source": "example",
      "is_favorite": true,
      "status": "example",
      "conditions": [
        {}
      ],
      "flag": "example"
    }
  ]
}
```

{% endcut %}

</div>

<div class="openapi-entity">

### DepthGoal {#entity-DepthGoal1}

Page depth.
The goal is considered achieved if the user viewed the specified number of site pages.


{% cut "**All of 2 types**" %}{.json-schema-combinators data-marker=and}

- **Type**: [GoalE](#entity-GoalE1)

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "id": 0,
    "name": "example",
    "type": "example",
    "default_price": 0.5,
    "goal_source": "example",
    "is_favorite": true,
    "status": "example"
  }
  ```

  {% endcut %}

- {% cut "**Type**: object" %}

  #|
  ||

  _depth_{.json-schema-reset .json-schema-property}
  {.table-cell}|
  **Type**: integer

  Number of pages viewed by the user.

  _Min value:_{.json-schema-reset .json-schema-assertion} `2`
  {.table-cell}
  ||
  |#{.json-schema-properties}

  {% endcut %}

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "depth": 2
  }
  ```

  {% endcut %}

{% endcut %}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "id": 0,
  "name": "example",
  "type": "example",
  "default_price": 0.5,
  "goal_source": "example",
  "is_favorite": true,
  "status": "example",
  "depth": 2
}
```

{% endcut %}

</div>

<div class="openapi-entity">

### EmailGoal {#entity-EmailGoal1}

Clicks or taps on an email address.

{% cut "**All of 2 types**" %}{.json-schema-combinators data-marker=and}

- **Type**: [GoalE](#entity-GoalE1)

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "id": 0,
    "name": "example",
    "type": "example",
    "default_price": 0.5,
    "goal_source": "example",
    "is_favorite": true,
    "status": "example"
  }
  ```

  {% endcut %}

- {% cut "**Type**: object" %}

  #|
  ||

  _conditions_{.json-schema-reset .json-schema-property}
  {.table-cell}|
  **Type**: [GoalCondition](#entity-GoalCondition)[]

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  [
    {
      "type": "example",
      "url": "example"
    }
  ]
  ```

  {% endcut %}
  {.table-cell}
  ||
  ||

  _flag_{.json-schema-reset .json-schema-property}
  {.table-cell}|
  **Type**: string

  Goal type for Yandex Market clients:
  - `basket`: **Shopping cart**, shopping cart page.
  - `order`: **Order**, order confirmation page.


  _Example:_{.json-schema-reset .json-schema-example} `example`
  {.table-cell}
  ||
  |#{.json-schema-properties}

  {% endcut %}

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "conditions": [
      {
        "type": "example",
        "url": "example"
      }
    ],
    "flag": "example"
  }
  ```

  {% endcut %}

{% endcut %}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "id": 0,
  "name": "example",
  "type": "example",
  "default_price": 0.5,
  "goal_source": "example",
  "is_favorite": true,
  "status": "example",
  "conditions": [
    {
      "type": "example",
      "url": "example"
    }
  ],
  "flag": "example"
}
```

{% endcut %}

</div>

<div class="openapi-entity">

### FileGoal {#entity-FileGoal1}

File download.
The goal is considered achieved if the user downloaded any file or a specific file.


{% cut "**All of 2 types**" %}{.json-schema-combinators data-marker=and}

- **Type**: [GoalE](#entity-GoalE1)

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "id": 0,
    "name": "example",
    "type": "example",
    "default_price": 0.5,
    "goal_source": "example",
    "is_favorite": true,
    "status": "example"
  }
  ```

  {% endcut %}

- {% cut "**Type**: object" %}

  #|
  ||

  _conditions_{.json-schema-reset .json-schema-property}
  {.table-cell}|
  **Type**: [GoalCondition](#entity-GoalCondition)[]

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  [
    {
      "type": "example",
      "url": "example"
    }
  ]
  ```

  {% endcut %}
  {.table-cell}
  ||
  ||

  _flag_{.json-schema-reset .json-schema-property}
  {.table-cell}|
  **Type**: string

  Goal type for Yandex Market clients:
  - `basket`: **Shopping cart**, shopping cart page.
  - `order`: **Order**, order confirmation page.


  _Example:_{.json-schema-reset .json-schema-example} `example`
  {.table-cell}
  ||
  |#{.json-schema-properties}

  {% endcut %}

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "conditions": [
      {
        "type": "example",
        "url": "example"
      }
    ],
    "flag": "example"
  }
  ```

  {% endcut %}

{% endcut %}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "id": 0,
  "name": "example",
  "type": "example",
  "default_price": 0.5,
  "goal_source": "example",
  "is_favorite": true,
  "status": "example",
  "conditions": [
    {
      "type": "example",
      "url": "example"
    }
  ],
  "flag": "example"
}
```

{% endcut %}

</div>

<div class="openapi-entity">

### MessengerGoal {#entity-MessengerGoal1}

Click-through to a messaging app.
The goal will be achieved once the user clicks the link to the messaging app.


{% cut "**All of 2 types**" %}{.json-schema-combinators data-marker=and}

- **Type**: [GoalE](#entity-GoalE1)

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "id": 0,
    "name": "example",
    "type": "example",
    "default_price": 0.5,
    "goal_source": "example",
    "is_favorite": true,
    "status": "example"
  }
  ```

  {% endcut %}

- {% cut "**Type**: object" %}

  #|
  ||

  _conditions_{.json-schema-reset .json-schema-property}
  {.table-cell}|
  **Type**: [GoalCondition](#entity-GoalCondition)[]

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  [
    {
      "type": "example",
      "url": "example"
    }
  ]
  ```

  {% endcut %}
  {.table-cell}
  ||
  ||

  _flag_{.json-schema-reset .json-schema-property}
  {.table-cell}|
  **Type**: string

  Goal type for Yandex Market clients:
  - `basket`: **Shopping cart**, shopping cart page.
  - `order`: **Order**, order confirmation page.


  _Example:_{.json-schema-reset .json-schema-example} `example`
  {.table-cell}
  ||
  |#{.json-schema-properties}

  {% endcut %}

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "conditions": [
      {
        "type": "example",
        "url": "example"
      }
    ],
    "flag": "example"
  }
  ```

  {% endcut %}

{% endcut %}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "id": 0,
  "name": "example",
  "type": "example",
  "default_price": 0.5,
  "goal_source": "example",
  "is_favorite": true,
  "status": "example",
  "conditions": [
    {
      "type": "example",
      "url": "example"
    }
  ],
  "flag": "example"
}
```

{% endcut %}

</div>

<div class="openapi-entity">

### PaymentSystemGoal {#entity-PaymentSystemGoal1}

Payment systems.
The goal is considered achieved if the user makes a payment via a payment system.


{% cut "**All of 1 type**" %}{.json-schema-combinators data-marker=and}

- **Type**: [GoalE](#entity-GoalE1)

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "id": 0,
    "name": "example",
    "type": "example",
    "default_price": 0.5,
    "goal_source": "example",
    "is_favorite": true,
    "status": "example"
  }
  ```

  {% endcut %}

{% endcut %}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "id": 0,
  "name": "example",
  "type": "example",
  "default_price": 0.5,
  "goal_source": "example",
  "is_favorite": true,
  "status": "example"
}
```

{% endcut %}

</div>

<div class="openapi-entity">

### PhoneGoal {#entity-PhoneGoal1}

Clicks or taps on the phone number.

{% cut "**All of 2 types**" %}{.json-schema-combinators data-marker=and}

- **Type**: [GoalE](#entity-GoalE1)

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "id": 0,
    "name": "example",
    "type": "example",
    "default_price": 0.5,
    "goal_source": "example",
    "is_favorite": true,
    "status": "example"
  }
  ```

  {% endcut %}

- {% cut "**Type**: object" %}

  #|
  ||

  _conditions_{.json-schema-reset .json-schema-property}
  {.table-cell}|
  **Type**: [GoalCondition](#entity-GoalCondition)[]

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  [
    {
      "type": "example",
      "url": "example"
    }
  ]
  ```

  {% endcut %}
  {.table-cell}
  ||
  ||

  _flag_{.json-schema-reset .json-schema-property}
  {.table-cell}|
  **Type**: string

  Goal type for Yandex Market clients:
  - `basket`: **Shopping cart**, shopping cart page.
  - `order`: **Order**, order confirmation page.


  _Example:_{.json-schema-reset .json-schema-example} `example`
  {.table-cell}
  ||
  ||

  _hide_phone_number_{.json-schema-reset .json-schema-property}
  {.table-cell}|
  **Type**: boolean

  Hide the phone number on desktop devices.
  {.table-cell}
  ||
  |#{.json-schema-properties}

  {% endcut %}

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "conditions": [
      {
        "type": "example",
        "url": "example"
      }
    ],
    "flag": "example",
    "hide_phone_number": true
  }
  ```

  {% endcut %}

{% endcut %}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "id": 0,
  "name": "example",
  "type": "example",
  "default_price": 0.5,
  "goal_source": "example",
  "is_favorite": true,
  "status": "example",
  "conditions": [
    {
      "type": "example",
      "url": "example"
    }
  ],
  "flag": "example",
  "hide_phone_number": true
}
```

{% endcut %}

</div>

<div class="openapi-entity">

### SiteSearchGoal {#entity-SiteSearchGoal1}

Site search.
The goal will be achieved when performing a site search if there is at least one match in the URL specified in the GET parameters.


{% cut "**All of 2 types**" %}{.json-schema-combinators data-marker=and}

- **Type**: [GoalE](#entity-GoalE1)

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "id": 0,
    "name": "example",
    "type": "example",
    "default_price": 0.5,
    "goal_source": "example",
    "is_favorite": true,
    "status": "example"
  }
  ```

  {% endcut %}

- {% cut "**Type**: object" %}

  #|
  ||

  _conditions_{.json-schema-reset .json-schema-property}
  {.table-cell}|
  **Type**: [GoalCondition](#entity-GoalCondition)[]

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  [
    {
      "type": "example",
      "url": "example"
    }
  ]
  ```

  {% endcut %}
  {.table-cell}
  ||
  ||

  _flag_{.json-schema-reset .json-schema-property}
  {.table-cell}|
  **Type**: string

  Goal type for Yandex Market clients:
  - `basket`: **Shopping cart**, shopping cart page.
  - `order`: **Order**, order confirmation page.


  _Example:_{.json-schema-reset .json-schema-example} `example`
  {.table-cell}
  ||
  |#{.json-schema-properties}

  {% endcut %}

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "conditions": [
      {
        "type": "example",
        "url": "example"
      }
    ],
    "flag": "example"
  }
  ```

  {% endcut %}

{% endcut %}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "id": 0,
  "name": "example",
  "type": "example",
  "default_price": 0.5,
  "goal_source": "example",
  "is_favorite": true,
  "status": "example",
  "conditions": [
    {
      "type": "example",
      "url": "example"
    }
  ],
  "flag": "example"
}
```

{% endcut %}

</div>

<div class="openapi-entity">

### SocialNetworkGoal {#entity-SocialNetworkGoal1}

Click-through to a social network.
The goal will be achieved once the user clicks the link to the social network.


{% cut "**All of 2 types**" %}{.json-schema-combinators data-marker=and}

- **Type**: [GoalE](#entity-GoalE1)

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "id": 0,
    "name": "example",
    "type": "example",
    "default_price": 0.5,
    "goal_source": "example",
    "is_favorite": true,
    "status": "example"
  }
  ```

  {% endcut %}

- {% cut "**Type**: object" %}

  #|
  ||

  _conditions_{.json-schema-reset .json-schema-property}
  {.table-cell}|
  **Type**: [GoalCondition](#entity-GoalCondition)[]

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  [
    {
      "type": "example",
      "url": "example"
    }
  ]
  ```

  {% endcut %}
  {.table-cell}
  ||
  ||

  _flag_{.json-schema-reset .json-schema-property}
  {.table-cell}|
  **Type**: string

  Goal type for Yandex Market clients:
  - `basket`: **Shopping cart**, shopping cart page.
  - `order`: **Order**, order confirmation page.


  _Example:_{.json-schema-reset .json-schema-example} `example`
  {.table-cell}
  ||
  |#{.json-schema-properties}

  {% endcut %}

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "conditions": [
      {
        "type": "example",
        "url": "example"
      }
    ],
    "flag": "example"
  }
  ```

  {% endcut %}

{% endcut %}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "id": 0,
  "name": "example",
  "type": "example",
  "default_price": 0.5,
  "goal_source": "example",
  "is_favorite": true,
  "status": "example",
  "conditions": [
    {
      "type": "example",
      "url": "example"
    }
  ],
  "flag": "example"
}
```

{% endcut %}

</div>

<div class="openapi-entity">

### UrlGoal {#entity-UrlGoal1}

Pageviews.
Achieved when at least one condition is met.


{% cut "**All of 2 types**" %}{.json-schema-combinators data-marker=and}

- **Type**: [GoalE](#entity-GoalE1)

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "id": 0,
    "name": "example",
    "type": "example",
    "default_price": 0.5,
    "goal_source": "example",
    "is_favorite": true,
    "status": "example"
  }
  ```

  {% endcut %}

- {% cut "**Type**: object" %}

  #|
  ||

  _conditions_{.json-schema-reset .json-schema-property}
  {.table-cell}|
  **Type**: [GoalCondition](#entity-GoalCondition)[]

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  [
    {
      "type": "example",
      "url": "example"
    }
  ]
  ```

  {% endcut %}
  {.table-cell}
  ||
  ||

  _flag_{.json-schema-reset .json-schema-property}
  {.table-cell}|
  **Type**: string

  Goal type for Yandex Market clients:
  - `basket`: **Shopping cart**, shopping cart page.
  - `order`: **Order**, order confirmation page.


  _Example:_{.json-schema-reset .json-schema-example} `example`
  {.table-cell}
  ||
  |#{.json-schema-properties}

  {% endcut %}

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "conditions": [
      {
        "type": "example",
        "url": "example"
      }
    ],
    "flag": "example"
  }
  ```

  {% endcut %}

{% endcut %}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "id": 0,
  "name": "example",
  "type": "example",
  "default_price": 0.5,
  "goal_source": "example",
  "is_favorite": true,
  "status": "example",
  "conditions": [
    {
      "type": "example",
      "url": "example"
    }
  ],
  "flag": "example"
}
```

{% endcut %}

</div>

<div class="openapi-entity">

### VisitDurationGoal {#entity-VisitDurationGoal1}

Session duration.
The goal will be achieved if the session duration exceeds the specified one.


{% cut "**All of 2 types**" %}{.json-schema-combinators data-marker=and}

- **Type**: [GoalE](#entity-GoalE1)

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "id": 0,
    "name": "example",
    "type": "example",
    "default_price": 0.5,
    "goal_source": "example",
    "is_favorite": true,
    "status": "example"
  }
  ```

  {% endcut %}

- {% cut "**Type**: object" %}

  #|
  ||

  _duration_{.json-schema-reset .json-schema-property}
  {.table-cell}|
  **Type**: integer

  Session duration in seconds.

  _Min value:_{.json-schema-reset .json-schema-assertion} `1`
  {.table-cell}
  ||
  |#{.json-schema-properties}

  {% endcut %}

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "duration": 1
  }
  ```

  {% endcut %}

{% endcut %}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "id": 0,
  "name": "example",
  "type": "example",
  "default_price": 0.5,
  "goal_source": "example",
  "is_favorite": true,
  "status": "example",
  "duration": 1
}
```

{% endcut %}

</div>

</div>

</div>
<!-- endsource: en/management-src/Managing-goals/editGoal.md -->

[*Deprecated]: No longer supported, please use an alternative and newer version.