v1

latestOpenAPI 3.1.0Proprietary2026-07-24710198.3 KB
Webhooks

Create webhook

Creates a new webhook subscription that will send HTTP POST notifications to your specified URL whenever the selected event type occurs (e.g., shipment created, tracking status updated).

When to use: Call this endpoint when setting up event-driven integrations, such as notifying your system when a shipment status changes, triggering order fulfillment workflows, or keeping external dashboards in sync with Envia events.

Prerequisites:

  • Valid JWT token in the Authorization header
  • A type_id identifying the webhook event type (retrieve available types from GET /webhook-types)
  • A publicly accessible url that can receive HTTP POST requests from Envia servers
  • An active flag (1 to enable immediately, 0 to create in disabled state)

Key behaviors:

  • The url must be a valid, publicly reachable HTTPS endpoint; Envia will send JSON payloads via POST to this URL
  • Set active to 0 to create the webhook in a disabled state for testing before enabling it
  • Returns the created webhook object with its assigned id, which can be used to update or deactivate it later via PUT /webhooks/{webhook_id}
  • Multiple webhooks can be registered for the same event type with different URLs
post/webhooks

Request body

type_idinteger required

Webhook type ID

urlstring uri required

Webhook URL

active0 | 1 required

Active status (0 = inactive, 1 = active)

Example request

{
  "type_id": 3,
  "url": "https://your-store.com/webhooks/envia",
  "active": 1
}

Response

Webhook created successfully

metastring