---
search:
  tags:
    - agent-sessions
    - POST
seo:
  description: >-
    Create agent session respond. Reference for the POST
    /workspaces/{organizationId}/agent/sessions/{sessionId}/respond endpoint in
    the Pile API.
sidebar:
  label: Create agent session respond
  badge: POST
title: Create agent session respond
type: openapi-operation
---
`POST /workspaces/{organizationId}/agent/sessions/{sessionId}/respond`

**Request body** (`application/json`)

- `answer` (string, required)

Request body example:

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

**Responses**

- `200` — Answer recorded and session resumed
- `404` — Session not found
- `409` — No open elicitation, or the sandbox is gone/busy — use the retry route for a cold dispatch

Response example, 200:

```json
{
  "id": "string",
  "organizationId": "string",
  "issueId": "string",
  "agentId": "string",
  "provider": "string",
  "actorId": "string",
  "actorType": "user",
  "status": "created",
  "result": "string",
  "url": "string",
  "providerSessionId": "string",
  "prUrl": "string",
  "prState": "string",
  "branch": "string",
  "purpose": "string",
  "secondaryRepos": "string",
  "maxDurationMinutes": 0,
  "effort": "low",
  "label": "string",
  "resultSchema": {
    "property1": null,
    "property2": null
  },
  "structuredResult": null,
  "resultSchemaErrors": [
    "string"
  ],
  "createdAt": "string",
  "updatedAt": "string",
  "lastProgressAt": "string",
  "lastStateHash": "string",
  "awaitingActivityId": "string",
  "awaitingEscalatedAt": "string",
  "paused": 0,
  "stepKey": "string",
  "plan": [
    {
      "content": "string",
      "status": "pending"
    }
  ],
  "guidance": [
    {
      "id": "string",
      "name": "string",
      "scope": "workspace",
      "scopeKey": "string",
      "version": 0
    }
  ],
  "derivedStatus": "stalled",
  "receipt": {
    "id": "string",
    "organizationId": "string",
    "sessionId": "string",
    "issueId": "string",
    "agentId": "string",
    "stepKey": "string",
    "dealId": "string",
    "status": "string",
    "model": "string",
    "effort": "string",
    "inputTokens": 0,
    "outputTokens": 0,
    "totalTokens": 0,
    "toolCalls": 0,
    "costMicros": 0,
    "externalSpendMicros": 0,
    "totalCostMicros": 0,
    "costSource": "reported",
    "capExceeded": 0,
    "stopReason": "string",
    "startedAt": "string",
    "endedAt": "string",
    "durationMs": 0,
    "createdAt": "string",
    "updatedAt": "string"
  },
  "activities": [
    {
      "id": "string",
      "sessionId": "string",
      "actorId": "string",
      "type": "thought",
      "message": "string",
      "payload": null,
      "parentId": "string",
      "startedAt": "string",
      "endedAt": "string",
      "durationMs": 0,
      "createdAt": "string"
    }
  ]
}
```
