# Adding target audience to a task via API

## Method for adding TA to the task

## add target audience

> 🇬🇧 Add target audience\
> \
> 🇷🇺 Добавить целевую аудиторию\
> \
> 🇺🇿 Maqsadli auditoriyani qo'shish

```json
{"openapi":"3.0.3","info":{"title":"Selarti public api","version":"1.0.0"},"tags":[{"name":"Other","description":"**Base URL:** https://selarti.com"}],"servers":[{"url":"https://selarti.com","description":"Main API server (for /api/1.1/wf/* endpoints)"},{"url":"https://api.selarti.com","description":"Advanced API server (for /v1/* endpoints)"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}}},"paths":{"/api/1.1/wf/add_target":{"post":{"tags":["Other"],"summary":"add target audience","description":"🇬🇧 Add target audience\n\n🇷🇺 Добавить целевую аудиторию\n\n🇺🇿 Maqsadli auditoriyani qo'shish","operationId":"addTarget","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"task":{"type":"string","description":"task_id"},"target":{"type":"string","description":"phone, username, id (depending on the communication channel). For more than one, use \"1111\\n2222\\n3333...\""}},"required":["task","target"]}}}},"responses":{"200":{"description":""}}}}}}
```

To get the task, in the «[Tasks](https://selarti.com/panel?menu=tasks)» section, copy the task ID by clicking the button to the left of the desired task's name.

<figure><img src="/files/CwKVrVoWlSK1FxPmEKZW" alt=""><figcaption></figcaption></figure>


---

# 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://manual.selarti.com/manual-en/external-integrations/adding-target-audience-to-a-task-via-api.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.
