---
title: "Create a webhook"
method: POST
path: "/webhooks"
tags: ["Webhooks"]
---

# Create a webhook

`POST /webhooks`

Creates a new webhook with the specified information and activates it.



      
Webhooks create an event when an action that is subscribed to is performed in Shipmondo. The event is then sent to the specified endpoint containing the current data of the affected object.


      Endpoint must be set up to receive messages before creating the webhook.


      Accepted values for action depends on the resource_name used.


      Available actions for [**Shipments**](shipment_get) resource:

      - create

      - cancel


      Available actions for [**Orders**](sales_order_get) resource:

      - create

      - status_update

      - create_fulfillment

      - create_shipment

      - payment_captured

      - payment_voided

      - delete


      Available actions for [**Drafts**](draft_shipment_get) (Draft shipments) resource:

      - create

      - create_shipment

      - delete


      Available actions for **Shipment Monitor** resource:

      - latest

      - delivered

## Request body

- WebhookCreate
  - `name` string, required — User-specified name of the webhook.
  - `endpoint` string, required — Endpoint the webhook sends request to.
  - `key` string, required — Encryption key that should encrypt and decrypt the webhook message with JWT.
  - `action` 'create' | 'cancel' | 'status_update' | 'create_fulfillment' | 'create_shipment' | 'payment_captured' | 'payment_voided' | 'delete' | 'latest' | 'delivered', required — The action that webhook is hooked to.
  - `resource_name` 'Shipments' | 'Orders' | 'Shipment Monitor', required — The name of the resource that webhook is hooked to.

## Response `200`

Successful.

- Webhook[]
  - `id` integer — Unique identifier of the object.
  - `endpoint` string — Endpoint the webhook sends request to.
  - `active` boolean — Indicates if the webhook is active.
  - `created_at` string, date-time — ISO 8601 datetime the object was created.
  - `updated_at` string, date-time — ISO 8601 datetime when the object was updated.
  - `name` string — User-specified name of the webhook.
  - `action` 'create' | 'cancel' | 'status_update' | 'create_fulfillment' | 'create_shipment' | 'payment_captured' | 'payment_refunded' | 'payment_voided' | 'delete' | 'latest' | 'delivered' — The action that webhook is hooked to.
  - `resource_name` 'Shipments' | 'Orders' | 'Shipment Monitor' — The name of the resource that webhook is hooked to.

## Other responses

- `401` — Unauthorized.
- `404` — Resource not found.

---

[API](https://skmtc.net/shipmondo/apis/shipmondo-api.md) · [All operations](https://skmtc.net/shipmondo/apis/shipmondo-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/shipmondo/shipmondo-api/revisions/3b9f91693dec/schema)
