POST
Subscribe to events

Authorizations

X-InStockRx-Api-Key
string
header
required

Scoped partner API key. Send the whole key, e.g. ik_live_a1b2c3…, on every request.

Headers

Idempotency-Key
string

Makes this request safe to retry. A retry carrying the same key replays the original response rather than acting twice, and is marked X-Idempotent-Replay: true. The same key with a different body is 409. Records are kept for 24 hours.

Required string length: 1 - 255
X-Pharmacy-Id
string<uuid>

Which pharmacy in your group you are acting as. Required whenever your group holds more than one pharmacy — omitting it is then 400 missing-pharmacy-context. With exactly one pharmacy it may be omitted, but send it anyway: the call starts failing the day a second pharmacy is added.

Body

application/json
url
string<uri>
required
events
string[]
required
Minimum array length: 1
description
string
Maximum string length: 200
status
enum<string>
Available options:
active,
disabled

Response

201 - application/json

Created — signingSecret is shown ONCE.

id
string<uuid>
required
url
string<uri>
required
events
string[]
required
status
enum<string>
required
Available options:
active,
disabled,
deactivated_after_failures
createdAt
string<date-time>
required
signingSecret
string
required

HMAC-SHA256 secret. Store securely; not retrievable later.

Example:

"whsec_abc123…"

description
string
updatedAt
string<date-time>
lastDeliveredAt
string<date-time>
failureCount
integer
Required range: x >= 0