---
title: "Subscribe to Activity Events (SSE)"
method: GET
path: "/v2beta1/events/activities"
tags: ["Events"]
---

# Subscribe to Activity Events (SSE)

`GET /v2beta1/events/activities`

The Events API sends the real-time events and provides historical queries with SSE (Server Sent Events).

This endpoint streams events on account activities.

Historical events are streamed immediately if queried, and updates are pushed as events occur.

Query parameter rules:
- If `until` is specified, `since` is required.
- If `until_id` is specified, `since_id` is required.
- You cannot use `since` and `since_id` together.
Behavior:
- If `since` or `since_id` is not specified, this will not return any historic data.
- If `until` or `until_id` is specified, stream will end at the specified point with status 200.

---

Warning: Currently, OAS-3 does not fully support responses from an SSE API.

In case the client code is generated from this OAS spec, please do not specify `since` and `until`, as the generated client may hang forever waiting for the response to end.

If you require the streaming capabilities, we recommend not using the generated clients for this specific endpoint until the OAS-3 standards define how to represent this behavior.

---

###  Comment messages
According to the SSE specification, any line that starts with a colon is a comment which does not contain data.  It is typically a free text that does not follow any data schema. A few examples mentioned below for comment messages.

#####  Slow client

The server sends a comment when the client is not consuming messages fast enough. Example: `: you are reading too slowly, dropped 10000 messages`

##### Internal server error

An error message is sent as a comment when the server closes the connection on an internal server error (only sent by the v2 and v2beta1 endpoints). Example: `: internal server error`

---

## Query parameters

- `since` string, date-time
- `until` string, date-time
- `since_id` string, ulid
- `until_id` string, ulid

## Response `200`

Connected. Events will now start streaming as long as you keep the connection open.

---

[API](https://skmtc.net/alpacahq/apis/gift-city-extensions-api.md) · [All operations](https://skmtc.net/alpacahq/apis/gift-city-extensions-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/alpacahq/gift-city-extensions-api/revisions/62e3378bb273/schema)
