Cancel a phone line
DELETE /v1/phone-lines/{id} cancels a line and answers the line as it is afterwards. What happens depends on the line’s status.
Requires a tenant-scoped key. With an OAuth / MCP token, only the workspace Owner may cancel (
phone_lines:cancel) — 403 PERMISSION_DENIED otherwise.Endpoint
DELETE https://pilotstatus.com.br/v1/phone-lines/{id}
No body. {id} is the line’s id, not the phone number.
What happens, by status
If a return of the same unpaid line is already under way — started by the hourly billing run or by the dashboard’s Choose which lines to keep — the call answers
200 with the line as it stands, possibly still PAYMENT_PENDING or SUSPENDED, and that process completes the return. Read the line again to confirm RETURNED.
Changed your mind about an ACTIVE line? Undoing a scheduled cancellation is available in the dashboard only, to the workspace Owner (Phone lines → the line → Undo cancellation), while the line is still ACTIVE.
Example
Events
- A line cancelled at period end sends
phone_line.canceledwhen it becomesCANCELED— usually within about an hour aftercurrentPeriodEnd; if the carrier does not confirm, it is retried at each hourly run. - An unpaid line returned by this call sends
phone_line.returnedright away.