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

# Session Action

> Tenant-scoped endpoint for inspecting and controlling active realtime voice sessions.

Tenant-scoped endpoint for inspecting and controlling active realtime voice sessions.

### Path parameters

<ParamField path="stream_sid" type="string" required>
  Twilio stream SID
</ParamField>

<ParamField path="action" type="string" required>
  Action to perform (monitor, whisper, barge, escalate, end)
</ParamField>

### Request body

`SessionActionBody`

<ParamField body="note" type="string,null">
  Note to send (used with whisper action)
</ParamField>

<ParamField body="reason" type="string,null">
  Reason for the action (used with end action)
</ParamField>

<ParamField body="supervisor" type="string">
  Identifier for who is performing the action
</ParamField>

<ParamField body="target" type="string,null">
  Escalation target phone number or SIP address (used with escalate action)
</ParamField>

### Response

`SessionActionResponse`

<ResponseField name="message" type="string" required>
  Human-readable result message
</ResponseField>

<ResponseField name="ok" type="boolean" required>
  Whether the action was accepted
</ResponseField>

### Status codes

| Code  | Meaning                                        |
| ----- | ---------------------------------------------- |
| `200` | Action acknowledged                            |
| `400` | Invalid action                                 |
| `401` | Unauthorized - invalid or missing bearer token |
| `404` | Session not found                              |

<RequestExample>
  ```bash cURL theme={null}
  curl --request POST \
    --url 'https://api.voice.stateset.com/api/v1/sessions/{stream_sid}/actions/{action}' \
    --header 'Authorization: Bearer YOUR_API_KEY' \
    --header 'Content-Type: application/json' \
    --data '{
    "note": "Offer the customer a 15% discount",
    "reason": "Customer issue resolved",
    "supervisor": "dashboard",
    "target": "+15555559999"
  }'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "message": "Escalated",
    "ok": true
  }
  ```
</ResponseExample>
