webhooks

Receive one event on a webhook URL

Receive one event from another system. The console issues the complete URL when the webhook is created, and the token in it is the credential: the route takes no bearer. A JSON body is read by the webhook's mapping and filters; any other body is used whole as the content. Returns 202 when the event becomes a data point and 200 when a filter or the content mapping drops it. Each event received costs 0.1 credit; an ingested event also costs the ingestion credits of its content.

post/api/v1/webhooks/{webhookId}/{token}

Request

  • Base URL: https://api.past.dev
  • URL: https://api.past.dev/api/v1/webhooks/{webhookId}/{token}
  • Auth: none required

Path parameters

webhookIdstring required

The webhook id, beginning with whk_.

tokenstring required

The 32-character token of the webhook URL. It is the credential.

Response

The event was dropped: a filter did not match, or the content path resolved to nothing. It costs 0.1 credit and creates no data point.

eventIdstring required

The id of the event, beginning with evt_, assigned at receipt.

requestIdstring required

The id of this call, as in the X-Request-Id header.

verdict'ingested' | 'dropped' required
droppedBystring nullable

On a dropped event: the first filter that did not match, or the missing content. Null on an ingested event.

ingestionIdstring uuid nullable

The ingestion id of an ingested event, read with the ingestion status operation. Null on a dropped event.

dataPointIdstring nullable

The source id of the data point: the mapped id, or the event id when the webhook maps none. Null on a dropped event.

unchangedboolean nullable

True when the event repeats a data point whose content and time are unchanged.

Changes

No recorded changes to this operation across all 1 revision of this API.