Vision 6

getWebhookById

Returns the details of a specific Webhook.

getWebhookById

Returns the details of a specific Webhook.

Top ↑

Syntax

array getWebhookById( int api_key, int webhooks_id );

Parameters

api_key (int)

The key required to access the API. See Getting Started for more information.

webhooks_id (int)

The ID of the Webhook.

Return Value

Returns an array containing a single associative array of Webhook details.

Examples

PHP

$api = new Api($url, 'YOURAPIKEY');
$webhook = $api->invokeMethod('getWebhookById', 616);

JSON Request

{
    "id": 1,
    "method": "getWebhookById",
    "params": [
        "YOURAPIKEY",
        616
    ]
}

JSON Response

{
    "id": 1,
    "result": {
        "id": 616,
        "object": "contact",
        "event": "unsubscribed",
        "list_id": 123,
        "url": "http:\/\/example.com\/example.php",
        "creation_time": 1496639113
    },
    "error": null
}

Error Codes

This method may return the following error code in addition to the standard error codes:

Code Error Description
310 Invalid Method Parameters One or more parameters are invalid.
350 Unable to load webhook Invalid Webhook ID

See Also