> For the complete documentation index, see [llms.txt](https://manual.selarti.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://manual.selarti.com/manual-en/external-integrations/adding-target-audience-to-a-task-via-api.md).

# 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>
