TestingAPIs is still being built. If something breaks, email support@testingapis.com.

Stream Server-Sent Events

GEThttps://api.testingapis.com/api/stream/sseSign in to see this endpoint's URL

The stream opens with retry: 3000; each event has an id, event: message and a JSON data line, and the stream ends with event: done. Send a Last-Event-ID: N header to resume after event N.

Swagger UI buffers the whole response and cannot show events as they arrive. Use curl instead:``curl -N "https://api.testingapis.com/api/stream/sse?count=5&interval=500"Swagger UI buffers the whole response and cannot show events as they arrive. Use curl instead:``curl -N "https://api.testingapis.com…"

Parameters 3

NameTypeDescription
countquery · integer (int32)Number of events to send (1-100, default 10). Default: 10.
intervalquery · integer (int32)Delay between events in milliseconds (100-5000, default 1000). Default: 1000.
Last-Event-IDheader · stringResume the stream after this event id.

Responses

200
A text/event-stream of events.

Example

Request
curl -X GET "https://api.testingapis.com/api/stream/sse?count=3&interval=200" \
  -H "X-TestingApis-Key: YOUR_API_KEY"
Response200 OK
Content-Type: text/event-stream
Cache-Control: no-cache

: connected, streaming events 1..3
retry: 3000

id: 1
event: message
data: {"id":1,"message":"Event 1 of 3","timestamp":"2026-09-30T18:26:40.039Z"}

id: 2
event: message
data: {"id":2,"message":"Event 2 of 3","timestamp":"2026-09-30T18:26:40.247Z"}

id: 3
event: message
data: {"id":3,"message":"Event 3 of 3","timestamp":"2026-09-30T18:26:40.459Z"}
… (1 more lines)

Sign in to see the details

The parameters, request and response examples and the live Try it panel for this endpoint are for signed-in members. Accounts are free and take a few seconds to create.