Skip to navigation

Create a webhook subscription

Available by request

Webhooks are only available for certain clients. Contact your Rush Order representative to have them enabled. Creating or changing subscriptions with an API key must also be enabled for your account; otherwise this returns 403.

Creates an active subscription and returns its signing secret. The secret is shown only this once, so store it right away. To check the destination, send a test delivery with POST /webhooks/subscriptions/{id}/test.

Authentication

AuthorizationBasic

Basic authentication of the form Basic <base64(username:password)>.

Headers

RushOrderMomCodestringRequired
All requests require the header to contain RushOrderMomCode, a 3 character string that represents the client internally in Rush Order. This should be given to you by Rush Order.

Request

This endpoint expects an object.
NamestringRequired
Must be unique among your subscriptions.
TargetUrlstringRequired

Where deliveries are sent. Must use https on port 443, have a public host name that resolves only to public IP addresses, contain no user name or password, and be at most 2048 characters.

EventTypeslist of stringsRequired

Event codes to deliver, such as order.shipped. At least one is required. See GET /webhooks/event-types for the list.

DescriptionstringOptional

Response

Created.
SubscriptionIdintegerOptional
SecretstringOptional

The signing secret, beginning with whsec_. This is the only time it is returned, so store it right away.

PreviousSecretExpiresAtdatetime or nullOptional
When the previous secret stops signing deliveries. Null on create, and null when the previous secret was revoked immediately.

Errors

400
Bad Request Error
403
Forbidden Error