Subscriptions
Overview
Our platform allows users to subscribe to specific events, enabling them to receive real-time notifications through webhooks. This feature is designed to help users stay informed about activities and changes of interest within the platform without the need for constant polling.
To utilize the subscription feature, you must first ensure that you have an endpoint ready to receive webhook notifications. This endpoint should be capable of handling POST requests, as this is the method used to deliver webhook payloads.
It is always recommended to secure your webhook endpoint by validating the incoming requests. This can be done by verifying the signature of the incoming request using the secret provided in the webhook security section.
Create Subscription
Create subscription for an event/events, by providing event and callback url .
Endpoint
- Endpoint:
POST /v1/subscription - Description: This endpoint creates webhook subscription for an event.
Response
Upon successful request submission, the system will respond with the subscription details.
- Status Codes:
200 OK: Successfully created subscription.400 Bad Request: The request was invalid or missing required information.401 Unauthorized: Authentication failed or was missing.
Get Subscription
Get all subscription for the events which were subscribed.
Endpoint
- Endpoint:
GET /v1/subscription - Description: This endpoint retrieves all the subscriptions.
Response
- Status Codes:
200 OK: Successfully retrieved subscriptions.404 Not Found: The subscriptions does not exit.
Delete Subscription
Delete a specific subscription
Endpoint
- Endpoint:
DELETE /v1/subscription - Description: This endpoint deletes a particular subscription.
Request
-
Request Body:
subscriptionId: The unique identifier for the subscription, received in the response from/v1/subscription.
-
Status Codes:
200 OK: Successfully deletes the subscription.
Regenerate subscription secret
Regenerates the subscription secret for a specific subscription
Endpoint
- Endpoint:
PATCH /v1/subscription/regenerate-secret - Description: Regenerates the subscription secret for a specific subscription
Request
-
Request Body:
subscriptionId: The unique identifier for the subscription, received in the response from/v1/subscription.
-
Status Codes:
200 OK: Successfully regenerates the subscription secret.