Skip to content

Webhooks (/v4/notifications/webhooks/...)

Source: src/Resource/V4/WebhooksResource.php

Access

$client->webhooks

Methods

public function list(?string $organisationId = null): list<Webhook>
public function create(
    string $name,
    string $url,
    array $events,                                  // list<string>
    WebhookFormat $format = WebhookFormat::Raw,     // Raw / Slack / Gitter / Flowdock
    array $scope = [],                              // list<string> app/addon IDs
    ?string $organisationId = null,
): Webhook
public function delete(string $webhookId, ?string $organisationId = null): void
Method HTTP Path Body
list() GET /v4/notifications/webhooks/{owner}
create() POST /v4/notifications/webhooks/{owner} {"name", "url", "format", "events", "scope"}
delete() DELETE /v4/notifications/webhooks/{owner}/{id}

WebhookFormat enum

CleverCloud\Sdk\Model\Enum\WebhookFormat. Cases:

  • Rawraw
  • Slackslack
  • Gittergitter
  • Flowdockflowdock

Webhook DTO

See src/Model/Webhook.php.