Skip to main content
PATCH
Update or pause a workspace webhook

Authorizations

x-api-key
string
header
required

Your ps_ API key

Headers

x-workspace-id
string

Only with an account key (ps_account_): the workspace to act on, from GET /v1/workspaces. Without it an account key gets 400 WORKSPACE_ID_REQUIRED.

Path Parameters

id
string
required

The webhook's id (from GET /v1/phone-lines/webhooks or the create response).

Body

application/json
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"

url
string

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>[]

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:
active
boolean

false pauses, true resumes.

Example:

false

Response

The webhook after the change

webhook
object