---
title: "Suggest Swarm Goals"
method: POST
path: "/core/agents/{agent_id}/ivr-swarm/suggest-goals"
tags: ["ivr-swarm"]
---

# Suggest Swarm Goals

`POST /core/agents/{agent_id}/ivr-swarm/suggest-goals`

## Request

- Base URL: `https://api.anyreach.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.anyreach.ai/core/agents/{agent_id}/ivr-swarm/suggest-goals`
- Auth: HTTP bearer

Caller goals from the line's company name and website. Nothing is saved
until the config is.

## Path parameters

- `agent_id` string, uuid, required

## Headers

- `x-anyreach-org` string, nullable: Organization ID for user PATs (pat_ prefix tokens)

## Request body

- SuggestGoalsIn
  - `target_id` string, uuid, required
  - `n` integer

## Response `200`

Successful Response

- GoalsOut
  - `goals` Goal[], required
    - `key` string, required
    - `label` string, required
    - `spoken_ask` string, required
    - `expected_answer` string
    - `source` 'generated' | 'manual' | 'builtin'

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/anyreach/apis/anyreach-api.md) - [All operations](https://skmtc.dev/anyreach/apis/anyreach-api/llms.txt) - [OpenAPI document](https://skmtc.dev/anyreach/apis/anyreach-api/revisions/2eddf40c8c93?raw)
