Agent Number

GET /voice/presence/<phone_number>

(WebSocket) Receive incoming-call signals

Description

**WebSocket endpoint** — OpenAPI 3.0 doesn't have a first-class WS shape; this is documented as a `GET` for tooling, but the real protocol is HTTP/1.1 `Upgrade: websocket`. Open with `Authorization: Bearer <token>` to signal 'I want incoming calls on this number.' Server auto-answers and pushes `{event: "ringing", call_id, caller, stream_url}` as a JSON text frame. Open the `stream_url` to take the audio.

Authentication

Bearer required. Send Authorization: Bearer <token>.

Code samples

Pick your runtime. Every sample is in the page source — switching tabs is for your eyes.

curl https://agentnumber.really.com/voice/presence/+15555550123 \
  --header 'Authorization: Bearer <your-token>'

Path parameters

NameTypeDescription
phone_number required string E.164 number you want to receive incoming calls on. Must be owned by the bearer.
Example: +15555550123

Responses

101 WebSocket upgrade. Server pushes JSON text frames per the description above.

401 Missing, invalid, revoked, or expired bearer token.

{
  "error": "unauthorized"
}

403 Bearer doesn't own the requested `phone_number`.

{
  "error": "forbidden"
}