Skip to content

Webhook Subscriptions

Endpoints used to create, configure, test, and manage webhook subscriptions.

Create a Webhook Subscription

Request

Create a webhook subscription for a given company.

Security
api_key
Headers
x-managed-company-idstring

Optional: the ID of the managed company on behalf of which the request is made

Bodyapplication/jsonrequired
namestringrequired

Name of the webhook. Used for internal identification

Example:"Production Webhook"
urlstring, (uri)required

HTTPS URL of the webhook endpoint

Example:"https://example.com/webhook"
eventsArray of strings, non-emptyrequired

Event types that trigger the webhook

Items Enum:"job.status.changed""sending.event.file.ready""sending.event.status.changed""peppol.document.received"
Example:
[ "job.status.changed", "sending.event.status.changed" ]
curl -i -X POST \
  https://doc.acc.connect.easypost.eu/_mock/public-api/openapi/webhooks \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: YOUR_API_KEY_HERE' \
  -H 'x-managed-company-id: string' \
  -d '{
    "name": "Production Webhook",
    "url": "https://example.com/webhook",
    "events": [
      "job.status.changed",
      "sending.event.status.changed"
    ]
  }'

Responses

Bodyapplication/json
namestringrequired

Name of the webhook. Used for internal identification

Example:"Production Webhook"
secretstringrequired

Secret key for the webhook. You should store this securely and not expose it publicly.

Response
{ "name": "Production Webhook", "secret": "string" }