---
title: "Create an event stream"
method: POST
path: "/v6/event-streams"
tags: ["Event Streams"]
---

# Create an event stream

`POST /v6/event-streams`

Creates a new event-stream subscription for the client. Event streams push a filtered view of client-event activity to a downstream consumer such as a webhook or Kafka topic. Returns the created event stream with its server-assigned id.

## Request body

- EventStreamCreateRequest — Body of a `POST /v6/event-streams` request.
  - `component_ids` string[]
  - `component_references` ComponentReferenceRequest[]
    - `component_id` string
    - `socket_names` string[]
  - `description` union — Choose between static or dynamic description
    - string, nullable — Static description
    - string — Handlebars expression with [EventStreamBuildtimeContext](https://github.com/extole/extole-specification/blob/main/openapi/expression-context/com/extole/api/event/stream/EventStreamBuildtimeContext.d.ts).
    - string — Javascript expression with [EventStreamBuildtimeContext](https://github.com/extole/extole-specification/blob/main/openapi/expression-context/com/extole/api/event/stream/EventStreamBuildtimeContext.d.ts).
  - `name` union, required — Choose between static or dynamic name
    - string — Handlebars expression with [EventStreamBuildtimeContext](https://github.com/extole/extole-specification/blob/main/openapi/expression-context/com/extole/api/event/stream/EventStreamBuildtimeContext.d.ts).
    - string — Javascript expression with [EventStreamBuildtimeContext](https://github.com/extole/extole-specification/blob/main/openapi/expression-context/com/extole/api/event/stream/EventStreamBuildtimeContext.d.ts).
  - `stop_at` string — [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) UTC date-time with a `Z` suffix. Precision up to milliseconds.
  - `tags` string[]

## Response `200`

Successful response

- EventStreamResponse — Stored event stream definition. Fields `name` and `description` are unevaluated and appear in buildtime-evaluatable form.
  - `component_ids` string[], required
  - `created_date` string, required — [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) UTC date-time with a `Z` suffix. Precision up to milliseconds.
  - `description` union, required — The description as configured: a literal value, or an expression (type:string) when defined dynamically.
    - string — Literal description
    - string — Handlebars expression with [EventStreamBuildtimeContext](https://github.com/extole/extole-specification/blob/main/openapi/expression-context/com/extole/api/event/stream/EventStreamBuildtimeContext.d.ts).
    - string — Javascript expression with [EventStreamBuildtimeContext](https://github.com/extole/extole-specification/blob/main/openapi/expression-context/com/extole/api/event/stream/EventStreamBuildtimeContext.d.ts).
  - `filters` EventStreamFilterResponse[], required
    - union
      - object
        - `id` string, required
        - `type` 'APPLICATION_TYPE', required
        - `app_types` string[], required
      - object
        - `id` string, required
        - `type` 'EVENT_NAME', required
        - `event_names` string[], required
      - object
        - `id` string, required
        - `type` 'EVENT_TYPE', required
        - `event_types` string[], required
      - object
        - `id` string, required
        - `type` 'PERSON_ID', required
        - `person_ids` string[], required
      - object
        - `id` string, required
        - `type` 'SANDBOX', required
        - `containers` string[], required
        - `sandboxes` string[], required
  - `id` string, required
  - `name` union, required — The name as configured: a literal value, or an expression (type:string) when defined dynamically.
    - string — Handlebars expression with [EventStreamBuildtimeContext](https://github.com/extole/extole-specification/blob/main/openapi/expression-context/com/extole/api/event/stream/EventStreamBuildtimeContext.d.ts).
    - string — Javascript expression with [EventStreamBuildtimeContext](https://github.com/extole/extole-specification/blob/main/openapi/expression-context/com/extole/api/event/stream/EventStreamBuildtimeContext.d.ts).
  - `stop_at` string, required — [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) UTC date-time with a `Z` suffix. Precision up to milliseconds.
  - `tags` string[], required
  - `updated_date` string, required — [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) UTC date-time with a `Z` suffix. Precision up to milliseconds.

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `402` — Payment Required
- `403` — Forbidden
- `415` — Unsupported Media Type
- `429` — Too Many Requests

---

[API](https://skmtc.net/extole/apis/integration-api-server-to-extole.md) · [All operations](https://skmtc.net/extole/apis/integration-api-server-to-extole/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/extole/integration-api-server-to-extole/versions/c16e62e66755/schema)
