Get a leg
Returns a single leg at any point in its lifecycle. A leg that is still ringing or connected answers with its in-flight status and no economics: duration_ms, billable_ms, and ended_at fill in once it ends, at this same URL, and cost does too unless the leg was never rated, as with a verification call Bird places and answers on your behalf. Returns a 404 not_found_error if the leg does not exist in the workspace.
Request
- Base URL: https://us1.platform.bird.com
- URL: https://us1.platform.bird.com/v1/voice/legs/{leg_id}
- Auth: one of:
- HTTP bearer
- API key in cookie bird_session
Headers
Workspace context for the request. Required for dashboard authentication and master keys. Workspace keys and access tokens already identify their workspace; send that workspace or omit the header. A different one is rejected.
Organization context for the request. Required for dashboard authentication. An API key or access token carries its own organization, so send either that organization or no header at all; a different one is rejected.
Response
The leg's current status, timing, and routing details.
Example response
{
"id": "vcl_01krdgeqcxet5s7t44vh8rt9mg",
"call_id": "vcs_01krdgeqcxet5s7t44vh8rt9mg",
"workspace_id": "ws_01krdgeqcxet5s7t44vh8rt9mg",
"direction": "outbound",
"from": "+14155551234",
"to": "+16505559876",
"actor": {
"id": "usr_01krdgeqcxet5s7t44vh8rt9mg",
"type": "user"
},
"sip_trunk_id": "spt_01krdgeqcxet5s7t44vh8rt9mg",
"sip_call_id": "3f9a1c8e7b2d4a5f@sip.example.net",
"status": "answered",
"sip_response_code": 200,
"rejection_reason": "destination_not_enabled",
"route": {
"type": "trunk"
},
"tags": [
{
"name": "category",
"value": "welcome"
}
],
"duration_ms": 65000,
"pdd_ms": 850,
"billable_ms": 60000,
"media_quality": {
"mos": 4.32,
"jitter_ms": 12,
"packet_loss_pct": 1.5,
"round_trip_time_ms": 42
},
"cost": {
"amount": "0.013000",
"currency_code": "EUR",
"outbound_amount": "0.013000"
}
}Changes
No recorded changes to this operation across all 2 revisions of this API.