LeKoala\SparkPost\Api\SparkPostApiClient::createWebhook
Create a webhook by providing a webhooks object as the POST request body.
On creation, events will begin to be pushed to the target URL specified in the POST request body. { "name": "Example webhook", "target": "http://client.example.com/example-webhook", "auth_type": "oauth2", "auth_request_details": { "url": "http://client.example.com/tokens", "body": { "client_id": "CLIENT123", "client_secret": "9sdfj791d2bsbf", "grant_type": "client_credentials" } }, "auth_token": "", "events": [ "delivery", "injection", "open", "click" ] }
Signature
public function createWebhook([array
$params = ] )
Parameters
$params
— array
Returns
- array