Public API
Subscription API
Subscriber Update
7min
updating subscribers the updatesubscriber mutation provides the ability to need to change the name and webhookurl of your subscriber at present webhook secrets are not able to be changed mutation mutation mutation updatesubscriber( $subscriberid id! $subscriberparams updatesubscriberfields! ) { updatesubscriber( subscriberid $subscriberid subscriberparams $subscriberparams ) { subscriber { id name subscriptions { subscriberid parentid parententity evententity eventkey } webhookurl } } } variables variables { "subscriberid" "your subscriber id", "subscriberparams" { "name" "example provider updated example brand", "webhookurl" "https //example net/subscriptions updated" } } arguments argument name description subscriberid subscription schema reference docid 6fu5dgr5rpbwat27pcxz the id for the subscriber to be updated subscriberparams subscription schema reference docid 6fu5dgr5rpbwat27pcxz the input object for updating a subscriber return type returns a subscription schema reference docid 6fu5dgr5rpbwat27pcxz successful responses when the updatesubscriber mutation succeeds you can expect the response payload to look in one of two different ways if you have created a subscriber but have not yet created any subscriptions the subscriptions field value will empty if you have created subscriptions all of them for the subscriber will be returned response without subscriptions { "data" { "subscribers" \[ { "id" "your subscriber id", "name" "example provider updated example brand", "subscriptions" \[], "webhookurl" "https //example net/subscriptions updated" } ] } } response with subscriptions { "data" { "subscribers" \[ { "id" "your subscriber id", "name" "example provider updated example brand", "subscriptions" \[ { "evententity" "order", "eventkey" "accepted", "parententity" "caterer", "parentid" "ezcater caterer id", "subscriberid" "your subscriber id" } ], "webhookurl" "https //example net/subscriptions updated" } ] } } failure responses when updatesubscriber mutation fails you can expect the response payload to look like response { "errors" \[ { "message" "subscriber could not be updated ", "path" \[ "updatesubscriber" ], "extensions" { "type" "summary", "servicename" "external events", "code" "downstream service error", "exception" { "message" "subscriber could not be updated ", "locations" \[ { "line" 1, "column" 107 } ], "path" \[ "updatesubscriber" ] } } } ], "data" { "updatesubscriber" null } }