# Speak into a call

`POST` `https://goblins-call-api.onrender.com/v1/calls/:id/say`

Has the agent say a line right now, outside its normal turn. Use it for something your system learns mid-call, such as a payment going through.

Works with a [workspace API key](https://www.cracklehq.com/docs/authentication) or the agent’s own key.

## Path parameters

- `id` (string, required): The `callId` returned when the call was started.

## Body

- `text` (string, required, 1–2,000 chars): What the agent says, in its own voice.
- `allowInterruptions` (boolean, optional): `false` has the agent finish the line even if the caller starts talking.

## Errors

- `400`: The body failed validation. `details` lists each field and what is wrong with it.
- `404`: No call in your workspace has that ID.
- `409`: The call has already ended.

Every request can also answer `401`, `429` and `500`: see [Errors](https://www.cracklehq.com/docs/errors).

Request:

cURL:

```bash
curl -X POST "https://goblins-call-api.onrender.com/v1/calls/8f1c2c1e-7b1a-4e0a-9c55-2f6f0d3b1a90/say" \
  -H "Authorization: Bearer $CRACKLE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "text": "Your payment just came through. Thank you!"
}'
```

Node.js:

```js
const response = await fetch('https://goblins-call-api.onrender.com/v1/calls/8f1c2c1e-7b1a-4e0a-9c55-2f6f0d3b1a90/say', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.CRACKLE_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    text: 'Your payment just came through. Thank you!',
  }),
});
if (!response.ok) throw new Error(await response.text());
const data = await response.json();
```

Python:

```python
import os
import requests

response = requests.post(
    "https://goblins-call-api.onrender.com/v1/calls/8f1c2c1e-7b1a-4e0a-9c55-2f6f0d3b1a90/say",
    headers={"Authorization": f"Bearer {os.environ['CRACKLE_API_KEY']}"},
    json={
        "text": "Your payment just came through. Thank you!",
    },
    timeout=30,
)
response.raise_for_status()
data = response.json()
```

Response · 202 Accepted:

```json
{
  "ok": true
}
```

Source: https://www.cracklehq.com/docs/reference/calls/say
