---
title: "Answer a request the task is waiting on [write]"
method: POST
path: "/tasks/{id}/requests/{request_id}/answer"
tags: ["tasks"]
---

# Answer a request the task is waiting on \[write\]

`POST /tasks/{id}/requests/{request_id}/answer`

## Request

- Base URL: `https://api.agentsky.dev/v1`
- URL: `https://api.agentsky.dev/v1/tasks/{id}/requests/{request_id}/answer`
- Auth: HTTP bearer

Sends the caller's answer to the session that asked, as its next turn, in the same form a click in the app produces. Pass `option_id` for one of the request's options, or `text` where the request accepts free text. A `spend` request is applied before anything is sent: confirming remembers the price and, when the task itself was waiting to start, holds the fee and starts it with what it was given (402 `insufficient_credits` when the caller's credit does not cover the fee; the request stays open). Declining such a start closes the request and the task never runs. A `spend` request that asks to raise a member's monthly limit in a workspace is answered by an owner or admin of that workspace with `option_id` `raise` or `decline` (403 `request_not_yours` for anyone else, the member included): raising sets the limit the request offered and sends on what the member's waiting tasks were given. An optional `note` is sent to the agent after the answer, in the same turn, and is not part of the answer: a surface other than the app uses it to say where the answer came from and how to reply there. 404 when the task has no open request with that id, 403 `request_not_yours` when it is addressed to someone else, 400 when the answer is not one the request accepts, 409 `session_busy` while the turn that asked is still running (retry once the session is idle).

## Path parameters

- `id` string, required
- `request_id` string, required

## Request body

- union
  - object
    - `option_id` string, required
    - `note` string
  - object
    - `text` string, required
    - `note` string

## Response `200`

OK

- object
  - `session_id` string, required: The session that asked
  - `message_id` string, nullable, required: The answer's message; read the session's events from it to follow the turn. Null when a `spend` request was declined, or confirmed for a task that was given nothing to start with.

## Other responses

- `default`: Error — { error: { code, message } }

## Changes

- **2026-11-02** `e5e8f0229a99`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/agentsky/apis/agentsky-developer-api/changes/tasks/:id/requests/:request_id/answer/post.md)

---

[API](https://skmtc.dev/agentsky/apis/agentsky-developer-api.md) - [All operations](https://skmtc.dev/agentsky/apis/agentsky-developer-api/llms.txt) - [OpenAPI document](https://skmtc.dev/agentsky/apis/agentsky-developer-api/revisions/8280a065ef6a?raw)
