function createSubscription($app_id, $subscription) { $endpoint = "https://api.hubapi.com/webhooks/v1/{$app_id}/subscriptions"; $options['json'] = $subscription; return $this->client->request('post', $endpoint, $options); }