# POST /v1/sessions/{session_id}/question-answers

Source: <https://everruns.com/docs/api/operations/submit_question_answers/>

POST

/v1/sessions/{session\_id}/question-answers

Select code samplecURL (shell:curl)

```js
const url = 'https://app.everruns.com/api/v1/sessions/example/question-answers';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: '{"answers":[{"id":"target","other_text":null,"selected":["Staging"]}],"status":"answered","tool_call_id":"toolu_01933b5a00007000800000000000001"}'
};


try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```sh
curl --request POST \
  --url https://app.everruns.com/api/v1/sessions/example/question-answers \
  --header 'Content-Type: application/json' \
  --data '{ "answers": [ { "id": "target", "other_text": null, "selected": [ "Staging" ] } ], "status": "answered", "tool_call_id": "toolu_01933b5a00007000800000000000001" }'
```

* Production APIapp.everruns.com/api/v1/sessions/{session\_id}/question-answers

Answers the question set an agent raised with `ask_user`, and resumes the paused turn.

## Parameters

### Path Parameters

**session\_id**

required

string

Session ID (prefixed, e.g., session\_…)

## Request Bodyrequired

Media typeapplication/json

Request to answer a pending `ask_user` question set.

object

**answers**

One answer per asked question, keyed by question id.

Array\<object>

One submitted answer.

object

**id**

required

Question id, as carried in the `tool.call_requested` payload.

string

**other\_text**

Free text. Required for a `text` question, and accepted on a `choice` question only when it allows another answer.

string | null

**secret\_ref**

Handle to the stored credential, on a `secret` question only — the value itself is never submitted here. Store it with `PUT /v1/sessions/{session_id}/storage/secrets` first, then answer with `session:{secret_name}`.

string | null

##### Example

```plaintext
session:STRIPE_API_KEY
```

**selected**

Chosen option labels. Must be labels that were actually offered.

Array\<string>

##### Example

```json
[
  {
    "id": "target",
    "other_text": null,
    "selected": [
      "Staging"
    ]
  }
]
```

**status**

What the person did. `answered` carries answers; `declined` is a finished decision the model must not re-ask.

string

Allowed values: answered declined

**tool\_call\_id**

The `ask_user` tool call being answered. Optional: when omitted the one pending question set on the session is used.

string | null

##### Example

```plaintext
toolu_01933b5a00007000800000000000001
```

## Responses

### 200

Answer recorded and workflow resumed

Media typeapplication/json

Result of answering a pending question set.

object

**answered\_by**

required

Who the server attributed the outcome to.

string

**session\_status**

required

Session status after the answer.

string

**status**

required

Outcome recorded against the call.

string

##### Example

```json
{
  "answered_by": "user",
  "session_status": "active",
  "status": "answered"
}
```

### 400

Invalid session ID, or answers that do not match what was asked

### 404

Session or pending question set not found

### 409

Session is not waiting for tool results, or the question set was already answered

### 500

Internal server error