> 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/vneshnie-integracii/dobavlenie-ca-v-zadanie-cherez-api.md).

# Добавление ЦА в задание через API

## Метод для добавления ЦА в задание

## 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":""}}}}}}
```

Чтобы получить task, в разделе «[Задания](< https://selarti.com/panel?menu=tasks>)» скопируйте ID задания, для этого нажмите на кнопку слева от названия нужного задания.

<figure><img src="/files/3icGoOh5o43zNKGj2TfH" alt=""><figcaption></figcaption></figure>
