> ## Documentation Index
> Fetch the complete documentation index at: https://docs.affonso.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Decide on a direction

> Accept or reject a competitor or topic the Discovery Agent suggested

Accepts or rejects one competitor or topic the agent suggested. These suggestions have `origin` `weekly_approval` and `status` `pending` in [List directions](https://docs.affonso.io/api/endpoint/discovery/list-directions.md). The agent does not search a suggestion until you accept it. Requires the `write:discovery` permission.

* `accept` lets the agent search the direction.
* `reject` closes it. A rejected direction is never suggested again.

## Path Parameters

**id** `string` *required*

Agent ID.

**direction\_id** `string` *required*

Direction ID from [List directions](https://docs.affonso.io/api/endpoint/discovery/list-directions.md).

## Body Parameters

The body is strict. Unknown fields are rejected.

**decision** `string` *required*

`accept` or `reject`.

## Response

**success** `boolean`

`true` when the request succeeds.

**data** `object`

The updated direction.

**Direction fields**

**id** `string`

Direction ID.

**agent\_id** `string`

Agent that owns the direction.

**kind** `string`

`topic`, `competitor`, or `similar_product`.

**value** `string`

The topic, competitor, or product the direction points to.

**website** `string | null`

Website for the direction, when known.

**origin** `string`

Where the direction came from: `agent_source`, `confirmed_fit`, `shared_similar_product`, `review_accepted_cluster`, or `weekly_approval`. `weekly_approval` marks a suggestion that needs your decision.

**status** `string`

Search progress: `pending`, `searched`, or `exhausted`.

**last\_searched\_at** `string | null`

ISO 8601 timestamp of the last search, or `null`.

**created\_at** `string`

ISO 8601 timestamp.

**updated\_at** `string`

ISO 8601 timestamp.

## Errors

* **400** `VALIDATION_ERROR`: the body is not valid JSON or fails validation. The message is `Invalid request` and `details` lists the invalid fields.
* **400** `VALIDATION_ERROR`: the direction is not waiting for a decision. The default message is `This direction is not waiting for a decision`.
* **404** `NOT_FOUND`: no agent with this ID exists for your team, or the agent was deleted. An agent that belongs to another team also returns `404`. The message is `Discovery agent not found`.
* **404** `NOT_FOUND`: the direction does not exist on this agent. The message is `Discovery direction not found`.
* **403** `INSUFFICIENT_PERMISSIONS`: the API key does not have the `write:discovery` permission.
* **502** `ANALYZE_UNAVAILABLE`: the decision could not be saved right now. The message is `Discovery decisions are temporarily unavailable`. Try again later.

```bash cURL theme={null}
curl -X POST "https://api.affonso.io/v1/discovery/agents/cmn4agt0001xk92hf6d0abcd/directions/cmn4dir0001xk92hf6d0abcd/decision" \
  -H "Authorization: Bearer sk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "decision": "accept"
  }'
```

```json Response theme={null}
{
  "success": true,
  "data": {
    "id": "cmn4dir0001xk92hf6d0abcd",
    "agent_id": "cmn4agt0001xk92hf6d0abcd",
    "kind": "topic",
    "value": "newsletter tools",
    "website": null,
    "origin": "weekly_approval",
    "status": "pending",
    "last_searched_at": null,
    "created_at": "2026-11-09T08:00:00.000Z",
    "updated_at": "2026-11-10T11:00:00.000Z"
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.