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

# Create a webhook

`POST /webhooks`

You can configure a webhook via the API to be notified about events that happen in your Terminal49 account. These events can be realted to tracking_requests, shipments and containers. 

This is the recommended way tracking shipments and containers via the API. You should use this instead of polling our the API periodically.

## Request body

- object
  - `data` object, required
    - `attributes` object, required
      - `url` string, uri, required — The URL of the webhook endpoint.
      - `events` string[] — The list of events to enable for this endpoint.
      - `active` boolean, required
      - `headers` object[] — Optional custom headers to pass with each webhook invocation
        - `name` string — The name of the header. (Please note this will be auto-capitalized)
        - `value` string — The value to pass for the header
    - `type` 'webhook', required

## Response `201`

Create a test webhook endpoint

- object
  - `data` Webhook
    - `id` string, uuid, required
    - `type` 'webhook', required
    - `attributes` object
      - `url` string, uri, required — https end point
      - `active` boolean, required — Whether the webhook will be delivered when events are triggered
      - `events` string[], required — The list of events to enabled for this endpoint
      - `secret` string, required — A random token that will sign all delivered webhooks
      - `headers` object[], nullable
        - `name` string
        - `value` string

## Changes

- **2025-04-09** `bd78172c578e` — 2 warning, 1 info
  - added the new `container.transport.available` enum value to the `attributes/events/items/` response property for the response status `201` (media type: application/xml)
  - added the new `container.transport.available` enum value to the `data/attributes/events/items/` response property for the response status `201` (media type: application/json)
  - added the new `container.transport.available` enum value to the request property `data/attributes/events/items/`
- **2024-07-03** `22e310ff5a89` — 6 warning, 3 info
  - added the new `container.pickup_lfd.changed` enum value to the `attributes/events/items/` response property for the response status `201` (media type: application/xml)
  - added the new `container.pickup_lfd.changed` enum value to the `data/attributes/events/items/` response property for the response status `201` (media type: application/json)
  - added the new `container.transport.arrived_at_inland_destination` enum value to the `attributes/events/items/` response property for the response status `201` (media type: application/xml)
  - added the new `container.transport.arrived_at_inland_destination` enum value to the `data/attributes/events/items/` response property for the response status `201` (media type: application/json)
  - …5 more

[Change history](https://skmtc.dev/terminal49/apis/terminal49-api-reference/changes/webhooks/post.md)

---

[API](https://skmtc.dev/terminal49/apis/terminal49-api-reference.md) · [All operations](https://skmtc.dev/terminal49/apis/terminal49-api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/terminal49/terminal49-api-reference/revisions/256fd1227fa4/schema)
