Skip to main content
POST
Create a phone-line webhook
This creates a real webhook, and events start going to its URL right away. The response carries the plwh_ signing secret only this once — copy it from the response before leaving the page: nothing shows it again. See Configure.

Authorizations

x-api-key
string
header
required

Your ps_ API key

Body

application/json
url
string
required

Must be https and reach a public address. A URL that points to an internal or private network address — localhost, a loopback or private IP, a host without a dot, or a name that resolves to one — → 400 WEBHOOK_URL_REFUSED.

Example:

"https://hooks.example.com/pilot/phone-lines"

events
enum<string>[]
required

One or more of the phone-line events, or "*" for all of them (inside this registry "*" means every phone-line event, including any added later). Duplicates are removed. An empty list or an unknown event → 400 INVALID_WEBHOOK.

Minimum array length: 1
Available options:
phone_line.purchased,
phone_line.audio_received,
phone_line.code_received,
phone_line.code_failed,
phone_line.renewed,
phone_line.payment_failed,
phone_line.suspended,
phone_line.returned,
phone_line.canceled,
phone_line.verification_updated,
*
Example:
name
string

Optional, up to 100 characters (400 INVALID_WEBHOOK_NAME above that). Blank or absent → the URL's host.

Maximum string length: 100
Example:

"Phone lines — production"

Response

Created — secret is returned only this once

webhook
object