# Subscribe to an Event

<mark style="color:green;">`POST`</mark> `https://ext-v2.smarttask.io/v{api_version}/webhook/subscribe/{your_app_name}`

#### Path Parameters

| Name            | Type   | Description     |
| --------------- | ------ | --------------- |
| your\_app\_name | string | Your App's name |
| api\_version    | string | 1.0             |

#### Headers

| Name           | Type   | Description         |
| -------------- | ------ | ------------------- |
| Authentication | string | Bearer Access Token |

#### Request Body

* Please refer to [Webhook](/models/webhook.md)
* Please confirm the required fields for different type of events

{% tabs %}
{% tab title="201 Webhook Accepted. Returns WebhookId which you can utilize for un-subscription from the webhook" %}

```
{id: 12551}
```

{% endtab %}

{% tab title="404 We don't accept such an event name" %}

```
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://dev.smarttask.io/endpoints/webhooks/subscribe-to-new-task-in-project.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
