Documentation

Webhooks
in package

Manage the webhooks in your account.

Table of Contents

Properties

$master  : mixed

Methods

__construct()  : mixed
add()  : struct
Add a new webhook.
delete()  : struct
Delete an existing webhook.
getList()  : array<string|int, mixed>
Get the list of all webhooks defined on the account.
info()  : struct
Given the ID of an existing webhook, return the data about it.
update()  : struct
Update an existing webhook.

Properties

Methods

add()

Add a new webhook.

public add(string $url[, string $description = null ][, array<string|int, mixed> $events = [] ]) : struct
Parameters
$url : string

the URL to POST batches of events

$description : string = null

an optional description of the webhook

$events : array<string|int, mixed> = []

an optional list of events that will be posted to the webhook

  • events[] string the individual event to listen for
Return values
struct

the information saved about the new webhook

  • id integer a unique integer indentifier for the webhook
  • url string The URL that the event data will be posted to
  • description string a description of the webhook
  • auth_key string the key used to requests for this webhook
  • events array The message events that will be posted to the hook
  • events[] string the individual message event (send, hard_bounce, soft_bounce, open, click, spam, unsub, or reject)
  • created_at string the date and time that the webhook was created as a UTC string in YYYY-MM-DD HH:MM:SS format
  • last_sent_at string the date and time that the webhook last successfully received events as a UTC string in YYYY-MM-DD HH:MM:SS format
  • batches_sent integer the number of event batches that have ever been sent to this webhook
  • events_sent integer the total number of events that have ever been sent to this webhook
  • last_error string if we've ever gotten an error trying to post to this webhook, the last error that we've seen

delete()

Delete an existing webhook.

public delete(int $id) : struct
Parameters
$id : int

the unique identifier of a webhook belonging to this account

Return values
struct

the information for the deleted webhook

  • id integer a unique integer indentifier for the webhook
  • url string The URL that the event data will be posted to
  • description string a description of the webhook
  • auth_key string the key used to requests for this webhook
  • events array The message events that will be posted to the hook
  • events[] string the individual message event (send, hard_bounce, soft_bounce, open, click, spam, unsub, or reject)
  • created_at string the date and time that the webhook was created as a UTC string in YYYY-MM-DD HH:MM:SS format
  • last_sent_at string the date and time that the webhook last successfully received events as a UTC string in YYYY-MM-DD HH:MM:SS format
  • batches_sent integer the number of event batches that have ever been sent to this webhook
  • events_sent integer the total number of events that have ever been sent to this webhook
  • last_error string if we've ever gotten an error trying to post to this webhook, the last error that we've seen

getList()

Get the list of all webhooks defined on the account.

public getList() : array<string|int, mixed>
Return values
array<string|int, mixed>

the webhooks associated with the account

  • return[] struct the individual webhook info
  • id integer a unique integer indentifier for the webhook
  • url string The URL that the event data will be posted to
  • description string a description of the webhook
  • auth_key string the key used to requests for this webhook
  • events array The message events that will be posted to the hook
  • events[] string the individual message event (send, hard_bounce, soft_bounce, open, click, spam, unsub, or reject)
  • created_at string the date and time that the webhook was created as a UTC string in YYYY-MM-DD HH:MM:SS format
  • last_sent_at string the date and time that the webhook last successfully received events as a UTC string in YYYY-MM-DD HH:MM:SS format
  • batches_sent integer the number of event batches that have ever been sent to this webhook
  • events_sent integer the total number of events that have ever been sent to this webhook
  • last_error string if we've ever gotten an error trying to post to this webhook, the last error that we've seen

info()

Given the ID of an existing webhook, return the data about it.

public info(int $id) : struct
Parameters
$id : int

the unique identifier of a webhook belonging to this account

Return values
struct

the information about the webhook

  • id integer a unique integer indentifier for the webhook
  • url string The URL that the event data will be posted to
  • description string a description of the webhook
  • auth_key string the key used to requests for this webhook
  • events array The message events that will be posted to the hook
  • events[] string the individual message event (send, hard_bounce, soft_bounce, open, click, spam, unsub, or reject)
  • created_at string the date and time that the webhook was created as a UTC string in YYYY-MM-DD HH:MM:SS format
  • last_sent_at string the date and time that the webhook last successfully received events as a UTC string in YYYY-MM-DD HH:MM:SS format
  • batches_sent integer the number of event batches that have ever been sent to this webhook
  • events_sent integer the total number of events that have ever been sent to this webhook
  • last_error string if we've ever gotten an error trying to post to this webhook, the last error that we've seen

update()

Update an existing webhook.

public update(int $id, string $url[, string $description = null ][, array<string|int, mixed> $events = [] ]) : struct
Parameters
$id : int

the unique identifier of a webhook belonging to this account

$url : string

the URL to POST batches of events

$description : string = null

an optional description of the webhook

$events : array<string|int, mixed> = []

an optional list of events that will be posted to the webhook

  • events[] string the individual event to listen for
Return values
struct

the information for the updated webhook

  • id integer a unique integer indentifier for the webhook
  • url string The URL that the event data will be posted to
  • description string a description of the webhook
  • auth_key string the key used to requests for this webhook
  • events array The message events that will be posted to the hook
  • events[] string the individual message event (send, hard_bounce, soft_bounce, open, click, spam, unsub, or reject)
  • created_at string the date and time that the webhook was created as a UTC string in YYYY-MM-DD HH:MM:SS format
  • last_sent_at string the date and time that the webhook last successfully received events as a UTC string in YYYY-MM-DD HH:MM:SS format
  • batches_sent integer the number of event batches that have ever been sent to this webhook
  • events_sent integer the total number of events that have ever been sent to this webhook
  • last_error string if we've ever gotten an error trying to post to this webhook, the last error that we've seen

        
On this page

Search results