# Answer an interaction

POST /v1/sessions/{session_id}/interactions/{interaction_key}/answer: Accept a durable human answer by the stable `interaction_key`.

POST<code>/v1/sessions/&#123;session_id&#125;/interactions/&#123;interaction_key&#125;/answer</code>

Accept a durable human answer by the stable `interaction_key`. `answer` is JSON: a string for a question, or the decision object requested by a permission interaction. A successful answer returns `202 Accepted` with status `answered`; delivery is asynchronous, so list the session's interactions again until the key's status is `delivered`. If another caller already answered, the API returns `409 Conflict`; list again to read the recorded answer.

Generated from the Platform API specification on 2026-09-04.

## Path parameters

| Parameter | Type | Description |
|---|---|---|
| `session_id` | string | The session, as returned by Create a session. |
| `interaction_key` | string | The stable key from the interactions list. |

## Headers

| Header | Required | Description |
|---|---|---|
| `Authorization` | yes | `Bearer` plus a short-lived OAuth access token issued for the Tanomis API audience. Backends obtain tokens with an [organization automation client](/guides/run/authenticate-your-backend); the CLI's human login is not an application credential. |
| `X-Organization-ID` | yes | The `organization_id` from the workspace projection you selected in `GET /v1/me/workspaces`. |
| `X-Workspace-Tenant-ID` | yes | The nested `tenant_id` from the same projection. A header cannot widen what the token grants. Some single-workspace or self-hosted environments take `X-Tenant-ID` instead, as supplied by their administrator. |

## Request body

| Field | Type | Required | Description |
|---|---|---|---|
| `kind` | string | required | Must match the interaction's kind: `question` or `permission`. |
| `answer` | any | required | A string for a question; the requested decision object for a permission. |

## Responses

| Status | Meaning |
|---|---|
| `202` | The answer was accepted. |
| `404` | No such interaction in this session. |
| `409` | Another caller already answered this interaction. |

## Request

```bash
curl -X POST "https://api.tanomis.com/v1/sessions/ses_7d4f9c/interactions/ihk_91f0/answer" \
  -H "Authorization: Bearer $TANOMIS_TOKEN" \
  -H "X-Organization-ID: $TANOMIS_ORG" \
  -H "X-Workspace-Tenant-ID: $TANOMIS_WORKSPACE" \
  -H "Content-Type: application/json" \
  -d '{
    "kind": "question",
    "answer": "Include the approved credit."
  }'
```

```python
import httpx

response = httpx.post(
    f"https://api.tanomis.com/v1/sessions/{session_id}/interactions/{interaction_key}/answer",
    headers={
        "Authorization": f"Bearer {token}",
        "X-Organization-ID": organization_id,
        "X-Workspace-Tenant-ID": tenant_id,
    },
    json={
        "kind": "question",
        "answer": "Include the approved credit.",
    },
)
response.raise_for_status()
result = response.json()
```

```typescript
const response = await fetch(`https://api.tanomis.com/v1/sessions/${sessionId}/interactions/${interactionKey}/answer`, {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${token}`,
    "X-Organization-ID": organizationId,
    "X-Workspace-Tenant-ID": tenantId,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "kind": "question",
    "answer": "Include the approved credit."
  }),
});
if (!response.ok) throw new Error(`${response.status} ${await response.text()}`);
const result = await response.json();
```

## Response

```json title="202 Accepted"
{
  "interaction_key": "ihk_91f0",
  "run_id": "run_a12bc3",
  "kind": "question",
  "status": "answered"
}
```
