---
title: "Send a reply to a run"
---

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

# Send a reply to a run

Path: Simplcron API › Runs

`POST /v1/runs/{runId}/reply`

Record the first reply to a Wait for Reply run before its deadline, including while the run is queued. Simplcron resumes the same run. Server calls require a bearer API key with runs:write from the run's workspace, project, and environment. The signed-in console can use its same-origin session. A retry of the same JSON payload is safe even after the run finishes. Object key order is ignored for this check.

## Authentication

Requires one of the following:

- `bearerAuth`, http bearer, header `Authorization`
- `browserSession`, apiKey, in cookie
- `localBrowserSession`, apiKey, in cookie

## Path parameters

- `runId` (`replyToRun.path.runId`; string, required) — ID returned at submission.
  - pattern: `^run_[a-f0-9]{32}$`

## Request body

_Required._

- `payload` (`replyToRun.payload`; object, required) — Reply data to pass to the handler. Up to 2 KiB of normalized JSON data.

## Example request

```json
{
  "payload": {
    "message": "Yes, I can make it"
  }
}
```

## Code samples

### cURL

```bash
curl --request POST \
  --url '<base-url>/v1/runs/<runId>/reply' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "payload": {
    "message": "Yes, I can make it"
  }
}
'
```

### TypeScript

```typescript
const url = '<base-url>/v1/runs/<runId>/reply';
const options = {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    Authorization: 'Bearer <token>'
  },
  body: JSON.stringify({payload: {message: 'Yes, I can make it'}})
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "<base-url>/v1/runs/<runId>/reply"

payload = { "payload": { "message": "Yes, I can make it" } }
headers = {
    "Content-Type": "application/json",
    "Authorization": "Bearer <token>"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
```

## Responses

### 200

The same payload was already accepted. The original reply is retained.

#### Example

```json
{
  "runId": "run_0123456789abcdef0123456789abcdef",
  "accepted": false
}
```

- `runId` (`replyToRun.response.200.runId`; string, required)
  - pattern: `^run_[a-f0-9]{32}$`
- `accepted` (`replyToRun.response.200.accepted`; boolean, required) — True if this request recorded the reply. A retry of previously accepted data returns false.

### 202

First reply accepted. The existing run will resume.

#### Example

```json
{
  "runId": "run_0123456789abcdef0123456789abcdef",
  "accepted": true
}
```

- `runId` (`replyToRun.response.202.runId`; string, required)
  - pattern: `^run_[a-f0-9]{32}$`
- `accepted` (`replyToRun.response.202.accepted`; boolean, required) — True if this request recorded the reply. A retry of previously accepted data returns false.

### 400

Invalid JSON or missing object payload

#### Example

```json
{
  "error": "string"
}
```

- `error` (`replyToRun.response.400.error`; string, required)

### 401

Authentication is required

#### Example

```json
{
  "error": "string"
}
```

- `error` (`replyToRun.response.401.error`; string, required)

### 403

The credential lacks permission

#### Example

```json
{
  "error": "string"
}
```

- `error` (`replyToRun.response.403.error`; string, required)

### 404

Run not found in the credential's scope

#### Example

```json
{
  "error": "string"
}
```

- `error` (`replyToRun.response.404.error`; string, required)

### 409

Reply conflicts with a prior reply or the run cannot accept a reply

#### Example

```json
{
  "error": "string"
}
```

- `error` (`replyToRun.response.409.error`; string, required)

### 413

Reply payload exceeds 2 KiB of normalized JSON data or request exceeds the body limit

#### Example

```json
{
  "error": "string"
}
```

- `error` (`replyToRun.response.413.error`; string, required)


Source: https://simplcron.dev/docs/api/reply-to-run/index.md
