Public API
Subscription API
Subscriber Create
8min
creating subscribers a subscriber represents the integration itself the subscriber will manage where event notifications are sent to as well as what events you want to subscribe to we currently only support creating one subscriber per api user if you are seeing errors that your subscriber could not be created, it may be that one has already been set up try running the subscriber list docid 9dzcbpmxx vinlglprqhr query to see if any already exist mutation to create the subscriber , simply make a createsubscriber mutation request as seen in the example below make sure you include the webhooksecret fields in the mutation, it will only be returned when initially creating a subscription, so be sure to save the value! you will also need the subscriber id in subsequent steps, so we recommend keeping track of it now mutation mutation createsubscriber($subscriberparams createsubscriberfields!) { createsubscriber(subscriberparams $subscriberparams) { subscriber { id name subscriptions { evententity eventkey parententity parentid subscriberid } webhooksecret webhookurl } } } variables variables { "subscriberparams" { "name" "example provider example brand", "webhookurl" "https //example net/subscriptions" } } arguments argument name description subscriberparams subscription schema reference docid 6fu5dgr5rpbwat27pcxz the input object for making a new subscriber return type returns a subscription schema reference docid 6fu5dgr5rpbwat27pcxz successful responses when the createsubscriber mutation succeeds you can expect the response payload to look like response { "data" { "createsubscriber" { "subscriber" { "id" "your subscriber id", "name" "example provider example brand", "subscriptions" \[], "webhooksecret" "be6efd0f8e88fec0d51364559ca9a258e70031f7f38448ea2e9705928a929a8d", "webhookurl" "https //example net/subscriptions" } } } } failure responses when the createsubscriber mutation fails you can expect the response payload to look like response { "errors" \[ { "message" "subscriber could not be created ", "path" \[ "createsubscriber" ], "extensions" { "type" "summary", "servicename" "external events", "code" "downstream service error", "exception" { "message" "subscriber could not be created ", "locations" \[ { "line" 1, "column" 90 } ], "path" \[ "createsubscriber" ] } } } ], "data" { "createsubscriber" null } }