# `POST /v1/apps/{app_id}/fcp` — text-in, text-out.

Source: <https://everruns.com/docs/api/operations/message_legacy/>

POST

/v1/apps/{app\_id}/fcp

Select code samplecURL (shell:curl)

```js
const url = 'https://app.everruns.com/api/v1/apps/example/fcp';
const options = {method: 'POST', headers: {'Content-Type': 'text/plain'}, body: 'example'};


try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```sh
curl --request POST \
  --url https://app.everruns.com/api/v1/apps/example/fcp \
  --header 'Content-Type: text/plain' \
  --data example
```

* Production APIapp.everruns.com/api/v1/apps/{app\_id}/fcp

## Parameters

### Path Parameters

**app\_id**

required

string

App ID

## Request Bodyrequired

Plain UTF-8 text, or `application/json` of shape `{"message": "..."}`. Maximum 256 KiB.

Media typetext/plain

string

## Responses

### 200

Agent reply as Markdown. The `Set-Cookie: fcp_session=...` header is emitted so subsequent POSTs can resume the same conversation.

Media typetext/markdown

### 400

Malformed body. Distinct messages for empty body, non-UTF-8 bytes, and JSON that did not parse into the expected shape — each Markdown body points back at the handshake.

Media typetext/markdown

### 401

Token required but missing or wrong. Markdown body explains both accepted headers (`Authorization: Bearer` and `X-Everruns-FCP-Token`) and points at the handshake.

Media typetext/markdown

### 404

Same generic 404 as the handshake — operator state is never disclosed.

Media typetext/markdown

### 410

FCP session expired. Body tells the client to drop the `fcp_session` cookie and POST again.

Media typetext/markdown

### 413

Body exceeds 256 KiB.

Media typetext/markdown

### 429

Per-channel FCP rate limit exceeded. `Retry-After: 60` header is set.

Media typetext/markdown

### 504

Agent did not reply within the configured timeout. The same `fcp_session` cookie is set so the client can retry the same conversation.

Media typetext/markdown