---
title: "Create a Webhook"
method: POST
path: "/v1/environment/webhooks"
tags: ["webhooks"]
---

# Create a Webhook

`POST /v1/environment/webhooks`

Create a webook for specific events in the environment.

## Request body

- CreateWebhookRequestBody — A create webhook request body
  - `event` 'batch' | 'carrier_connected' | 'order_source_refresh_complete' | 'rate' | 'report_complete' | 'sales_orders_imported' | 'track', required — The possible webook event values
  - `url` string, url, required — A URL
  - `headers` WebhookHeader[] — Array of custom webhook headers
    - `key` string, required — Key/name of a header
    - `value` string, required — Value of a header

## Response `200`

The request was a success.

- CreateWebhookResponseBody — A webhook
  - `webhook_id` string — A string that uniquely identifies a ShipEngine resource, such as a carrier, label, shipment, etc.
  - `url` string, url — A URL
  - `event` 'batch' | 'carrier_connected' | 'order_source_refresh_complete' | 'rate' | 'report_complete' | 'sales_orders_imported' | 'track' — The possible webook event values
  - `headers` WebhookHeader[] — Array of custom webhook headers
    - `key` string, required — Key/name of a header
    - `value` string, required — Value of a header

## Other responses

- `400` — The request contained errors.
- `409` — The request conflicts with an existing resource.
- `500` — An error occurred on ShipEngine's side. > This error will automatically be reported to our engineers.

## Changes

- **2024-10-08** `e4ae9b442f54` — 9 info
  - added the optional property `errors/items/allOf[subschema #1: error]/carrier_code` to the response with the `400` status
  - added the optional property `errors/items/allOf[subschema #1: error]/carrier_code` to the response with the `409` status
  - added the optional property `errors/items/allOf[subschema #1: error]/carrier_code` to the response with the `500` status
  - added the optional property `errors/items/allOf[subschema #1: error]/carrier_id` to the response with the `400` status
  - …5 more
- **2024-09-13** `5a15ef11fd60` — 21 warning
  - added the new `file_not_found` enum value to the `errors/items/allOf[subschema #1: error]/error_code/allOf[subschema #1: error_code]/` response property for the response status `400`
  - added the new `file_not_found` enum value to the `errors/items/allOf[subschema #1: error]/error_code/allOf[subschema #1: error_code]/` response property for the response status `409`
  - added the new `file_not_found` enum value to the `errors/items/allOf[subschema #1: error]/error_code/allOf[subschema #1: error_code]/` response property for the response status `500`
  - added the new `funding_source_error` enum value to the `errors/items/allOf[subschema #1: error]/error_code/allOf[subschema #1: error_code]/` response property for the response status `400`
  - …17 more
- …earlier changes not shown

[Full history](https://skmtc.dev/shipengine/apis/shipengine-api/changes/v1/environment/webhooks/post.md)

---

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