---
title: "GET /eventSubscriptions/{eventSubscriptionId}"
method: GET
path: "/eventSubscriptions/{eventSubscriptionId}"
tags: ["Event Subscriptions"]
---

# GET /eventSubscriptions/{eventSubscriptionId}

`GET /eventSubscriptions/{eventSubscriptionId}`

This endpoint allows you to retrieve a specific event subscription.

## Response `200`

OK

- EventSubscription
  - `id` string, required — Unique identifier of the subscriptionId.
  - `subscriptionConfig` EventSubscriptionConfig
    - `lifeCycle` 'temporary' | 'persistent' — Supported subscription lifecycles: * `temporary`: The event subscription is created by `POST /eventSubscriptions` and removed when `DELETE /eventSubscriptions/{subscriptionId}` for that subscription is called, or no client uses the subscription for the time defined in `timeToLiveSeconds`. This lifeCycle is only supported for the delivery type serverSentEvents.v1. * `persistent`: The event subscription is created by `POST /eventSubscriptions` and remains active indefinitely. It is not automatically removed based on usage or time. It must be explicitly deleted by calling `DELETE /eventSubscriptions/{subscriptionId}`. This lifeCycle is only supported for the delivery type webhook.v1.
    - `timeToLiveSeconds` integer — Defines the amount of time after which a `temporary` lifecycle subscription is automatically deleted if it is not being used. The determination of "usage" depends on the delivery type. For the `serverSentEvents.v1` type a subscription is marked as "in use" if a client is connected to the SSE url. For a subscription of lifeCycle type `persistent`, there is no time to live.
  - `deliveryConfig` union, required — Describes how the event subscription should deliver events to the client.
    - ServerSentEventsDeliveryConfig
      - `type` 'serverSentEvents.v1', required — The type of delivery used by this subscription. New values will be added to this enum when new protocols are supported. * `serverSentEvents.v1`: The client should set-up an HTTP(S) connection to a given URL to receive events using the [Server-sent events](https://en.wikipedia.org/wiki/Server-sent_events) protocol. Currently only one client can be connected at a time to a event subscription. * `webhook.v1`: The client provides a URL to which events are pushed via HTTP POST requests when they occur. This delivery type uses the [Webhook](https://en.wikipedia.org/wiki/Webhook) method, where the server pushes the event data formatted as JSON directly to the client’s endpoint. Webhooks are suited for scenarios where the client system is capable of receiving incoming HTTP requests, allowing for real-time data delivery without the need for the client to maintain a persistent connection.
      - `sseUrl` string, url, required — URL to be used to connect to the subscription using the server sent events protocol. Although it might look like the logic used to generate the URLs is easily implementable client-side, it could change at any point in time, so clients should always use this value instead of trying to generate it themselves.
    - WebhookDeliveryConfig
      - `type` 'webhook.v1', required — The type of delivery used by this subscription. New values will be added to this enum when new protocols are supported. * `serverSentEvents.v1`: The client should set-up an HTTP(S) connection to a given URL to receive events using the [Server-sent events](https://en.wikipedia.org/wiki/Server-sent_events) protocol. Currently only one client can be connected at a time to a event subscription. * `webhook.v1`: The client provides a URL to which events are pushed via HTTP POST requests when they occur. This delivery type uses the [Webhook](https://en.wikipedia.org/wiki/Webhook) method, where the server pushes the event data formatted as JSON directly to the client’s endpoint. Webhooks are suited for scenarios where the client system is capable of receiving incoming HTTP requests, allowing for real-time data delivery without the need for the client to maintain a persistent connection.
      - `webhookUrl` string, url, required — The HTTPS URL provided by the client where the webhook events will be sent. The client must ensure that this endpoint is configured to accept HTTPS requests and respond to an initial HTTP GET validation request. During creation, a GET request will be sent to this URL with a one-time validation token as a query parameter (`?token={validation_token}`). The endpoint must respond with a `200 OK` status and return the validation token in plain text format. The subscription will be created only if this validation succeeds. As events occur, the server will send HTTP POST requests to this URL containing the event data in JSON format. The endpoint must respond to each POST request with a `200 OK` status to acknowledge successful receipt of the event. If the endpoint fails to respond correctly after a configured number of consecutive delivery attempts for a given event, delivery of that event will be stopped to prevent further retries. If we are unable to deliver events to the webhook continuously for 90 days, the subscription will be disabled.
      - `secret` string, required — Base64 encoded secret used to sign each event sent via webhook by hashing the event with SHA-256 algorithm.

## Other responses

- `400` — The supplied object is invalid. Error detail will contain the validation error.
- `401` — You are not authenticated. Please authenticate and try again.
- `404` — Referenced resource could not be found.
- `500` — Something went wrong in the server. Please try again.

---

[API](https://skmtc.net/eagleeyenetworks/apis/devices.md) · [All operations](https://skmtc.net/eagleeyenetworks/apis/devices/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/eagleeyenetworks/devices/revisions/df57313de545/schema)
