Create a new webhook

Request
Security:
Request Body schema: application/json

Webhook creation

enabled_events
required
Array of strings non-empty

Which events this webhook will receive by event name.

error_contact_email
required
string <email>

Email address to contact if the webhook permanently fails to publish after 5 attempts.

object or null (UsernamePasswordAuthentication)

Use for endpoints that require HTTP Basic Authentication.

status
string
Default: "ENABLED"
Enum: "ENABLED" "DISABLED"
include_updated_object
boolean
Default: false

If true, for each event name that ends in .updated that this webhook receives, Shipwells fetches the most recent version of the object and include it in the WebhookPayload in a new_object.

url
required
string

External URL that Shipwell makes a POST request to when a subscribed event is received. The webhook URL must return a 200 response indicating successful receipt of the payload to the webhook in 10 seconds or less.

event_version
integer
Default: 1

Which event type this webhook should describe.

Responses
201

Webhook was created successfully

Response Schema: application/json
id
string

The webhook's unique identifier.

resource_type
string

The type of this resource, static value of 'webhook'.

Value: "webhook"
created_at
string <date-time>

When this webhook was created.

enabled_events
required
Array of strings non-empty

Which events this webhook will receive by event name.

error_contact_email
required
string <email>

Email address to contact if the webhook permanently fails to publish after 5 attempts.

object or null (UsernamePasswordAuthentication)

Use for endpoints that require HTTP Basic Authentication.

status
string
Default: "ENABLED"
Enum: "ENABLED" "DISABLED"
include_updated_object
boolean
Default: false

If true, for each event name that ends in .updated that this webhook receives, Shipwells fetches the most recent version of the object and include it in the WebhookPayload in a new_object.

url
required
string

External URL that Shipwell makes a POST request to when a subscribed event is received. The webhook URL must return a 200 response indicating successful receipt of the payload to the webhook in 10 seconds or less.

event_version
integer
Default: 1

Which event type this webhook should describe.

self_link
string

HTTP URL to this Webhook.

secret
string

Generated secret key used to validate hook delivery. Only returned on creation of a Webhook.

400

Invalid input

post/webhooks/
Request samples
application/json
{}
Response samples
application/json
{
  • "id": "string",
  • "resource_type": "webhook",
  • "created_at": "2019-08-24T14:15:22Z",
  • "enabled_events": [
    ],
  • "error_contact_email": "user@example.com",
  • "username_password_authentication": {
    },
  • "status": "ENABLED",
  • "include_updated_object": false,
  • "event_version": 1,
  • "self_link": "string",
  • "secret": "string"
}
Copyright © Shipwell 2022. All right reserved.