---
title: "Answer an agent's question"
url: https://hexelstudio.com/docs/api/harness/tasks/answer
---

# Answer an agent's question

**POST** `/harness/questions/{id}/answer`

## Path parameters

- `id: string`

  The question's id.

## Headers

- `Authorization: string`

  `Bearer <token>`. A Hexel Studio access token for your organization.

- `X-Workspace-Id: string`

  The workspace the request acts in (`ws_...`). It never grants access by itself.

- `X-Environment-Id: string`

  The environment the request acts in (`env_...`). It never grants access by itself.

## Body parameters

- `answer: any`

  A string, a list of options, or null to decline (at most 64 KiB).

## Returns

`202` Answered. (`object`)

- `answered: boolean`

## Errors

- `default` 

## Example

```bash
curl --request POST \
  --url 'https://api.hexelstudio.com/v1/harness/questions/{id}/answer' \
  --header "Authorization: Bearer $ACCESS_TOKEN" \
  --header 'X-Workspace-Id: X_WORKSPACE_ID' \
  --header 'X-Environment-Id: X_ENVIRONMENT_ID' \
  --header 'Content-Type: application/json' \
  --data '{
  "answer": "string"
}'
```

### Response (202)

```json
{
  "answered": true
}
```
