Skip to content

Latest commit

 

History

History
83 lines (72 loc) · 1.42 KB

webhook.md

File metadata and controls

83 lines (72 loc) · 1.42 KB

Webhook

The webhooks will attempt delivery each hour until delivered, or until 24 tries.

The webhook object

Attributes

Name Type Description
object string Is "webhook"
created integer
url string
event object
pending boolean Whether the webhook is yet to be delivered or not.

Example

{
	"object": "webhook",
	"created": 1412106939,
	"url": "http://example.com/webhook_location_example",
	"event": {
		"object": "event",
		"created": 1412106939,
		"type": "customer.created",
		"data": {
			"object": {
				"object": "customer",
				"id": "CUSTOMER_TOKEN",
				"name": "John Doe",
				"email": "[email protected]",
				"created": 1412106939
			}
		}
	},
	"pending": true
}

List all webhooks

Returns a list of all webhooks.

Example request

$ curl https://spaces.com/api/v1/webhooks \
	-u ACCESS_TOKEN:

Example response

{
	"object": "list",
	"count": 2,
	"data": [
		{
			"object": "webhook",
			"created": 1412106939,
			"url": "http://example.com/webhook_location_example",
			"event": {
				"object": "event",
				"created": 1412106939,
				"type": "customer.created",
				"data": {
					"object": {
						"object": "customer",
						"id": "CUSTOMER_TOKEN",
						"name": "John Doe",
						"email": "[email protected]",
						"created": 1412106939
					}
				}
			},
			"pending": true
		},
		{...}
	]
}