API DocumentationWebhooks

Create a webhook

POST
/api/manufacturer/v1/webhook

Creates a webhook for one event type on the authenticated account. The URL must use HTTPS and resolve to a public address. Save the returned id for deletion and secret for decrypting deliveries. Deliveries contain a JSON payload field encrypted with AES-256-GCM and an X-Phasio-Signature HMAC-SHA256 header.

Authorization

Phasio API Bearer Token
headerAuthorizationBearer <token>

Request Body

application/json
  1. body
url*string

Public HTTPS URL that will receive webhook deliveries

type*string

Event to subscribe to; ORDER means order created

Value in"ORDER""REVISION""ORDER_UPDATED""QUOTE_CONVERTED""CUSTOMER_ORGANISATION_CREATED""CUSTOMER_ORGANISATION_UPDATED""SPECIFICATION_CREATED""WORKFLOW_PROGRESS_PARTS""CART_CREATED""CART_UPDATED""CUSTOMER_COMMENTED""MANUFACTURER_COMMENTED"

Response Body

Webhook successfully created

application/json
  1. response
id*string
Formatuuid
url*string
type*string
secret*string
curl -X POST 'https://m-api.eu.phas.io/api/manufacturer/v1/webhook' \  -H 'Content-Type: application/json' \  -d '{  "url": "string",  "type": "ORDER"}'
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "url": "string",  "type": "string",  "secret": "string"}