Webhook objects define the URL endpoints for webhooks.
Name | Type | Description |
---|---|---|
object | string | Will be "webhook" |
created | integer | |
url | string |
{
"object": "webhook",
"created": 1375217068,
"url": "http://example.com/webhook_endpoint/"
}
Returns a list of all webhooks.
Name | Required | Description |
---|---|---|
count | optional | |
offset | optional |
$ curl https://secure.peakium.com/api/v1/webhooks/?count=2 \
-u pk_gEVUPX6FwObZSgg3v0BjkVxmdzatPyV9:
{
"object": "list",
"count": 2,
"data": [
{
"object": "webhook",
"created": 1375217068,
"url": "http://example.com/webhook_endpoint/"
},
{...}
]
}
A webhook can be created over the API.
Name | Required | Description |
---|---|---|
url | required | The webhook URL endpoint |
$ curl https://secure.peakium.com/api/v1/webhooks/ \
-u pk_gEVUPX6FwObZSgg3v0BjkVxmdzatPyV9: \
-d url="http://example.com/webhook_endpoint/"
Will respond with 200 OK
status, and the full webhook object if valid, or fail with failure HTTP status code.