Skip to content

Subscribe to an event

POST
/webhooks
curl --request POST \
--url https://api.1up.gift/webhooks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "targetUrl": "example", "event": "example" }'

Registers a URL to be called whenever the event happens on your account. The response carries a signing secret — store it, as it is shown only once, and use it to verify the signature on every delivery.

The target URL must be a publicly reachable HTTPS address.

A request to start receiving an event.

object
targetUrl

The publicly reachable HTTPS URL to POST each event to. Private, loopback and non-HTTPS addresses are rejected.

null | string
event

The event to subscribe to, for example order.created.

null | string
Examplegenerated
{
"targetUrl": "example",
"event": "example"
}

The subscription was created.

A created webhook subscription.

object
id

The subscription id. Pass it to DELETE /webhooks/{id} to stop deliveries.

string format: uuid
event

The event this subscription receives.

null | string
targetUrl

The URL each event is POSTed to.

null | string
secret

The signing secret for this subscription. Every delivery is signed with it, so store it now — it is returned only when the subscription is created and cannot be retrieved again.

null | string

The event is unknown, or the target URL was rejected.

object
type
null | string
title
null | string
status
null | integer format: int32
detail
null | string
instance
null | string