Create Subscription
Creates a new subscription.
Request
POST
/event/v1/subscription
Parameters
subscriberId string : required The unique identifier of the subscriber.
type string : required The type of event that will trigger this webhook. More information about the type can be found in the Event Type Dictionary.
httpEndpoint uri : required The URI of the subscription that you provided when the subscription was created.
Example
curl -XPOST 'https://platform.wellviasolutions.com/event/v1/subscription' \
-u 'Bearer:{your_token}'
-d 'SubscriberId=evntsbr_XXX'
-d 'Type=com.wellviasolutions.member.account.created.v1'
-d 'HttpEndpoint=https://myapp.com/notify'POST https://platform.wellviasolutions.com/event/v1/subscription HTTP/1.1
{
"subscriberId": "evntsbr_XXX",
"type": "com.wellviasolutions.member.account.created.v1",
"httpEndpoint": "https://myapp.com/notify"
}using WellViaSDK.Event;
const string apiSubscriptionKey = "your_api_subscription_key";
var _evntClient = new WellViaEventServiceClient(subscriptionKey: apiSubscriptionKey);
string subscriberId = "your_subscriber_id";
string eventType = "event_type";
Uri endpoint = new Uri("your_endpoint");
var myNewSubscription = await _evntClient.CreateSubscriptionAsync(
subscriberId: subscriberId,
type: eventType,
httpEndpoint: endpoint
);Response
A subscription object if a valid request was provided.
Attributes
id string : required The unique identifier of the subscription.
subscriberId string : required The unique identifier of the subscriber.
type string : required The type of event that will trigger this webhook. More information about the type can be found in the Event Type Dictionary.
httpEndpoint uri : required The URI of the subscription that you provided when the subscription was created.
Example
{
"id": "evntsbn_XXX",
"subscriberId": "evntsbr_XXX",
"type": "com.wellviasolutions.member.account.created.v1",
"httpEndpoint": "https://myapp.com/notify"
}Updated 7 months ago
