> ## Documentation Index
> Fetch the complete documentation index at: https://developers.reintersect.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Send a stream event

> Post an event, such as a CI run, a deploy or an alert, to your app's stream in a circle.

> Reintersect apps are in developer preview. Names and limits can still change before general
> release.

Posts one event to your app's stream in a circle. The first event in a circle creates the stream,
named after your app with its icon. Each event becomes an app conversation in the circle's App streams
log, or a reply in one, and reaches the circle's chat when a member engages with it. Use this for
event feeds; for conversational messages, use [Create a reply](/api-reference/replies/create). See
[Writing to circles](/writing-to-circles).

Authenticate with an install token that has the `replies:write` scope. The circle must be within the install's
[reach](/api-reference/overview#reach), and each stream takes at most 60 events a minute.

## Body

Send exactly one of `content` and `markdown`.

| Field | Type | Required | Description |
| - | - | - | - |
| `circleId` | `string` | Yes | The circle to post to. |
| `content` | `Document` | One of | A structured document, such as the output of [`renderPayload`](/reference/client#renderpayload). Mentions, files and images aren't allowed. |
| `markdown` | `string` | One of | Markdown, 1 to 40,000 characters. |
| `threadKey` | `string` | No | At most 200 characters. The first event with a key starts a conversation; later events with the same key become replies in it. |
| `title` | `string` | No | At most 300 characters. Used only when the event starts a conversation. |
| `persona` | `{ name?, avatarUrl? }` | No | Overrides your app's name (at most 80 characters) and icon (an `https://` URL) for this event. |
| `idempotencyKey` | `string` | No | At most 200 characters. A resend with the same key within 24 hours returns the first answer and posts nothing. |

Unknown fields fail the request.

## Response

| Field | Type | Description |
| - | - | - |
| `conversationId` | `string` | The app conversation the event started or joined. |
| `url` | `string` | A link to that conversation. |
| `created` | `boolean` | `false` when the event became a reply in an existing conversation. |

## Errors

| `_tag` | Status | Cause |
| - | - | - |
| `ReintersectAppScopeMissingError` | 403 | The install lacks `replies:write`. |
| `ReintersectAppCircleNotFoundError` | 404 | The circle isn't in the install's workspace, your app can't reach it, or it's a connected circle that became read-only when its connection ended. Also returned if your app's stream disappears while the event is saved. `circleIds` holds the circle you sent. |
| `ReintersectAppStreamRevokedError` | 410 | Your app's stream in this circle was revoked, checked before and while the event is saved. A circle that fails the 404 checks returns 404 even when its stream is revoked. |
| `ReintersectAppStreamInvalidPayloadError` | 400 | The content was rejected; `reason` is `invalid_document`, `unsupported_node` or `empty`. |
| `ReintersectApiRateLimitExceededError` | 429 | Over 60 events a minute. |

## Example

```bash theme={null}
curl -X POST https://api.reintersect.com/v0/streams/events \
  -H "authorization: Bearer $INSTALL_TOKEN" \
  -H "content-type: application/json" \
  -d '{ "circleId": "circle_123", "threadKey": "deploy:api", "title": "Deploy api", "markdown": "Deploy **finished** in 4m 12s." }'
```

With the SDK, call `reintersect.streams.sendEvent({ circleId, threadKey, markdown })`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.