---
title: "Answer a question from a turn"
---

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

# Answer a question from a turn

Path: CloudRaker Workspace API › Workspace Sessions

`POST /workspace/sessions/{sessionId}/questions/{questionId}`

## Authentication

- `bearerAuth`, http, header `Authorization`

## Path parameters

- `sessionId` (`answerWorkspaceQuestion.path.sessionId`; string, required)
- `questionId` (`answerWorkspaceQuestion.path.questionId`; string, required)

## Query parameters

- `turnId` (`answerWorkspaceQuestion.query.turnId`; string, optional)
  - minLength 1; maxLength 128

## Request body

_Required._

- `answer` (`answerWorkspaceQuestion.answer`; string, required)
  - minLength 1; maxLength 8000

## Example request

```json
{
  "answer": "string"
}
```

## Code samples

### cURL

```bash
curl --request POST \
  --url 'https://api.cloudraker.com/workspace/sessions/<sessionId>/questions/<questionId>' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "answer": "string"
}
'
```

### TypeScript

```typescript
const url = 'https://api.cloudraker.com/workspace/sessions/<sessionId>/questions/<questionId>';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json', Authorization: 'Bearer <token>'},
  body: JSON.stringify({answer: 'string'})
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.cloudraker.com/workspace/sessions/<sessionId>/questions/<questionId>"

payload = { "answer": "string" }
headers = {
    "Content-Type": "application/json",
    "Authorization": "Bearer <token>"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
```

## Responses

### 200

The answered question.

### 400

`validation_failed` — a malformed body.

### 404

No such session, turn, or question for the caller.

### 409

`run_not_running` — the question can no longer be answered.


Source: https://docs.cloudraker.com/workspace/api/workspace-sessions/answer-workspace-question/index.md
