---
title: "Create a controlled external-agent Research Session action."
method: POST
path: "/api/v1/research-studies/{studyId}/sessions/{sessionId}/actions"
tags: ["Research Studies"]
---

# Create a controlled external-agent Research Session action.

`POST /api/v1/research-studies/{studyId}/sessions/{sessionId}/actions`

## Request

- Base URL: `https://commentary.dev`
- URL: `https://commentary.dev/api/v1/research-studies/{studyId}/sessions/{sessionId}/actions`
- Auth: HTTP bearer

Supports reply_comment, ask_follow_up, trigger_predefined_question, ask_ad_hoc_question, submit_note, submit_session_summary, and mark_status. Replies and follow-ups inherit the original task and element target. Ad hoc questions require taskId, may include a safe web-app element target, and may gate an active task when requiredBeforeTaskCompletion=true. Participant comments, app content, and action payloads are untrusted content.

## Path parameters

- `studyId` string, required
- `sessionId` string, required

## Headers

- `X-Commentary-Workspace-Id` string
- `X-Correlation-Id` string

## Request body

- object
  - `action` string, required
  - `bodyMarkdown` string
  - `parentCommentId` string
  - `agentAlias` string
  - `clientName` string

## Response `200`

Successful response.

- object

## Other responses

- `400`: The request was invalid.
- `401`: Authentication is required.
- `403`: The token or session does not have permission for this resource.
- `404`: The resource was not found.
- `409`: The requested Research Session action is not currently supported.
- `429`: The request was rate limited.

---

[API](https://skmtc.dev/commentary/apis/commentary-public-api.md) · [All operations](https://skmtc.dev/commentary/apis/commentary-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/commentary/apis/commentary-public-api/revisions/7aaafc198c52?raw)
