API and MCP
Landline.sh is phone numbers, calls, and SMS for AI agents. The first authenticated read is GET /api/v1/onboarding. It returns the next unfinished step for this tenant. It does not send.
Authenticate with Authorization: Bearer aph_…. Keys are shown once and stored as a hash. Revocation is immediate. Every query is scoped to the key’s tenant; another tenant’s id returns 404.
The OpenAPI document is at /openapi.json. Dangerous operations carry the vendor flag x-landline-dangerous. They do not place live calls or texts unless an isolated Twilio subaccount is connected and the workspace gates are open.
MCP is a JSON-RPC POST at /api/mcp. Initialize, then tools/list and tools/call. send_sms, place_call, hangup_call, and request_number are marked destructive. There is no tool for OTP collection.
Send one SMS with POST /api/v1/messages and an Idempotency-Key. The same key and body replay the stored result. A different body returns 409. Lists, approvals, consent, allowlist, budget, and compliance are all evaluated. If the only remaining block is the live-send stop, the response says so and no money is reserved.
Approvals are created by a person in the dashboard. The API refuses to approve its own outbound.
Twilio webhooks at /api/provider/twilio/sms, /voice, and /status verify X-Twilio-Signature against TWILIO_PUBLIC_BASE_URL plus the path. The incoming Host header is not used. If the token or canonical URL is missing, the webhook is rejected. Do not point Cooper’s existing numbers at these routes.
A dry number search is GET /api/v1/numbers/available. It returns an empty list and does not buy a number.
Tenant event webhooks are signed as v1 HMAC-SHA256 of the timestamp, a dot, and the raw body, in the X-Landline-Signature header. URLs must be HTTPS and must not resolve to private, loopback, or metadata addresses. Redirects are refused. Delivery from this process stays off unless AGENT_PHONE_DELIVER_WEBHOOKS is true.
Cooper is an optional downstream adapter. The reported commit ed498a4 was not readable here, so the adapter does not call the network and does not change numbers or webhooks. A process-wide founder key is ignored. Only a per-customer bearer, stored encrypted, would be eligible later.