Loading documentation…
Loading documentation…
Open a Project stream on the SteamCall API and reconnect from the last applied event.
Connect from a backend or local terminal to a Project you can access. Use the curl commands below or run the Node.js SSE example.
prj_… ID from your Project's Dashboard.customer.events.read.v1 explicitly and allow your backend under the applicable network policy.PROJECT_ID and PROJECT_CREDENTIAL in your shell from those values. Keep the Credential in your backend secret store.curl --no-buffer --fail-with-body --max-time 120 \
"https://api.steamcall.com/v2/projects/$PROJECT_ID/events/stream" \
--header 'Accept: text/event-stream' \
--header "X-API-Key: $PROJECT_CREDENTIAL"Expect a checkpoint first. With the stream open, submit an Inventory refresh in the same Project. A terminal outcome arrives as a complete frame. An example follows, with placeholder cursors.
event: checkpoint
id: OPAQUE_CHECKPOINT_CURSOR
data: {"as_of":"2026-09-12T12:42:08Z"}
event: inventory.refresh.completed
id: OPAQUE_EVENT_CURSOR
data: {"id":"evt_11111111111141118111111111111111","version":1,"type":"inventory.refresh.completed","occurred_at":"2026-09-12T12:42:08Z","project_id":"prj_22222222222242228222222222222222","data":{"refresh_id":"33333333-3333-4333-8333-333333333333","state":"completed","outcome":"complete_changed"},"links":{"refresh":"/v2/steam/inventory-refreshes/33333333-3333-4333-8333-333333333333"}}
id: on the frame is the opaque resume cursor. The JSON id identifies the outcome and matches the webhook event ID. Deduplicate business effects by JSON event ID.
Stop the first request. Set LAST_CURSOR to the actual frame id: you received for the last event you applied. Use the first checkpoint cursor if you have applied no events yet.
curl --no-buffer --fail-with-body --max-time 120 \
"https://api.steamcall.com/v2/projects/$PROJECT_ID/events/stream" \
--header 'Accept: text/event-stream' \
--header "X-API-Key: $PROJECT_CREDENTIAL" \
--header "Last-Event-ID: $LAST_CURSOR"Expect another checkpoint followed by any retained events after your cursor. To check replay, reuse the first checkpoint while the example event is within retention. The replay has the same JSON event ID. Each connection checks the Credential's authority for that Project. The terminal commands end after 120 seconds if you leave them running.
| Control frame | Action |
|---|---|
stream.closing | Reconnect after bounded retry_after_ms using the last applied cursor. |
stream.recovery_required | Reconcile retained history and current state before reconnecting. |
stream.authorization_revoked | Close and wait for valid access. |
Use a parser that handles incremental UTF-8, multiline data and blank-line dispatch. Validate a complete frame, deduplicate, apply durably, then save its cursor. Control frames and unfinished frames at disconnect leave progress at the last applied cursor. Use bounded backoff and buffer sizes. Close the old connection and cancel its recovery requests when the Project context changes.
Keep the Credential out of browser JavaScript, logs and query strings. See recovery for expired or incompatible cursors and limits for stream budgets.