Hosted SIM API

Calls

Place, read, redirect, end and delete calls on your line's dongle. It's one SIM in one dongle, so it's one call at a time, across the API and the line's SIP login.

GET /Accounts/{AccountSid}/Calls.json

List calls.

Lists the account's calls, newest first, one page at a time. A filter value that isn't valid, or a query parameter not listed here, answers 400 with code 790005.

Parameters

NameInRequiredDescription
To query

Only calls to this number (E.164).

From query

Only calls from this number (E.164).

Status query

Only calls with this status.

StartTime query

Only calls that started on this date (YYYY-MM-DD).

StartTime< query

Only calls that started on or before this date (YYYY-MM-DD; in a URL it reads StartTime<=2026-11-02).

StartTime> query

Only calls that started on or after this date (YYYY-MM-DD; in a URL it reads StartTime>=2026-11-01).

PageSize query

Items per page, ≤ 1000, default 50. List pages with PageSize over 50 are rate-limited at 2/s per account.

Page query

The page number, from 0. Use the *_page_uri values rather than building it yourself.

PageToken query

An opaque paging token. It comes inside next_page_uri / previous_page_uri.

Responses

StatusMeaning
200

One page of calls.

400

A list filter value that isn't valid, or a query parameter the list doesn't take (790005, naming it in parameter).

401

Authentication failed (20003), or the account isn't active (20005). This comes before any lookup.

429

Over a rate (20429, with Retry-After in seconds): per account, GET 10/s (burst 30), list pages with PageSize over 50 at 2/s, POST/DELETE 5/s (burst 10); per source IP before auth, 20/s; a gateway-wide ceiling with a fair share per account. Failed auth from one source IP (10/min) also answers 429 with code 20429, for 15 min.

500

An internal error (799999).

Response fields

FieldTypeAlways thereDescription
page integer

The page number, from 0.

page_size integer
uri string
first_page_uri string
next_page_uri string or null

The next page, or null.

previous_page_uri string or null

The previous page, or null.

calls array of object

The calls on this page.

calls[].sid stringrequired

CA + 32 hex.

calls[].account_sid stringrequired
calls[].to stringrequired

E.164.

calls[].to_formatted stringrequired

The national format, e.g. "0491 570 156".

calls[].from stringrequired

E.164. On an outbound call it's always the line's own number.

calls[].from_formatted stringrequired

The national format.

calls[].phone_number_sid stringrequired

The line's Sid.

calls[].status string: queued, ringing, in-progress, completed, busy, failed, no-answer, canceledrequired

There's no answering-machine detection, so a call answered by voicemail reads in-progress.

calls[].direction string: outbound-api, inboundrequired
calls[].start_time string or nullrequired

RFC 2822.

calls[].end_time string or nullrequired

RFC 2822.

calls[].duration string or nullrequired

Seconds, as a string.

calls[].answered_by nullrequired

Always null: there's no answering-machine detection in v1.

calls[].price nullrequired

Always null: billing is in the console.

calls[].price_unit nullrequired

Always null: billing is in the console.

calls[].date_created stringrequired

RFC 2822.

calls[].date_updated stringrequired

RFC 2822.

calls[].api_version stringrequired
calls[].uri stringrequired
calls[].subresource_uris objectrequired

Always {} in v1 (no recordings or other subresources).

Example request

curl -X GET "https://api.dongleswithwings.com/2010-04-01/Accounts/{AccountSid}/Calls.json" \
  -u "$ACCOUNT_SID:$AUTH_TOKEN"

Example response

{
  "page": 0,
  "page_size": 2,
  "uri": "/2010-04-01/Accounts/ACa61cd972830fc5bc41386edc0a9f8463/Calls.json?Status=completed&StartTime%3E=2026-11-01&PageSize=2&Page=0",
  "first_page_uri": "/2010-04-01/Accounts/ACa61cd972830fc5bc41386edc0a9f8463/Calls.json?Status=completed&StartTime%3E=2026-11-01&PageSize=2&Page=0",
  "next_page_uri": "/2010-04-01/Accounts/ACa61cd972830fc5bc41386edc0a9f8463/Calls.json?Status=completed&StartTime%3E=2026-11-01&PageSize=2&Page=1&PageToken=0gkLSzoORuxO9vqu",
  "previous_page_uri": null,
  "calls": [
    {
      "sid": "CA126a665f07bdfabf149e1a4230e7494e",
      "account_sid": "ACa61cd972830fc5bc41386edc0a9f8463",
      "to": "+61491570156",
      "to_formatted": "0491 570 156",
      "from": "+61491570158",
      "from_formatted": "0491 570 158",
      "phone_number_sid": "PN3e18acd0169a00c48635e530c42a01ca",
      "status": "completed",
      "direction": "inbound",
      "start_time": "Mon, 02 Nov 2026 04:10:05 +0000",
      "end_time": "Mon, 02 Nov 2026 04:12:47 +0000",
      "duration": "162",
      "answered_by": null,
      "price": null,
      "price_unit": null,
      "date_created": "Mon, 02 Nov 2026 04:10:02 +0000",
      "date_updated": "Mon, 02 Nov 2026 04:12:47 +0000",
      "api_version": "2010-04-01",
      "uri": "/2010-04-01/Accounts/ACa61cd972830fc5bc41386edc0a9f8463/Calls/CA126a665f07bdfabf149e1a4230e7494e.json",
      "subresource_uris": {}
    },
    {
      "sid": "CAfac674904129191c9bee9f6d819b1c21",
      "account_sid": "ACa61cd972830fc5bc41386edc0a9f8463",
      "to": "+61255501234",
      "to_formatted": "02 5550 1234",
      "from": "+61491570156",
      "from_formatted": "0491 570 156",
      "phone_number_sid": "PN3e18acd0169a00c48635e530c42a01ca",
      "status": "completed",
      "direction": "outbound-api",
      "start_time": "Mon, 02 Nov 2026 03:04:09 +0000",
      "end_time": "Mon, 02 Nov 2026 03:06:14 +0000",
      "duration": "125",
      "answered_by": null,
      "price": null,
      "price_unit": null,
      "date_created": "Mon, 02 Nov 2026 03:04:05 +0000",
      "date_updated": "Mon, 02 Nov 2026 03:06:14 +0000",
      "api_version": "2010-04-01",
      "uri": "/2010-04-01/Accounts/ACa61cd972830fc5bc41386edc0a9f8463/Calls/CAfac674904129191c9bee9f6d819b1c21.json",
      "subresource_uris": {}
    }
  ]
}

POST /Accounts/{AccountSid}/Calls.json

Place a call from your line.

One call at a time per dongle, never queued. From must be the line's own number. No answering-machine detection or recording. The first ~1.4 s after the answer has no audio.

Places a call from your line's dongle. The answer is 201 with the Call, status queued.

  • Exactly one of Url (+ Method, default POST) or Twiml (≤ 4000 characters); otherwise 700011. When the call is answered, the gateway fetches Url (the outboundCall webhook: 10 s, no retry, then FallbackUrl once).
  • One call per dongle, across the API and SIP: if the line already has a call up (API or SIP), the answer is 409 with code 700001. A call is never queued.
  • Synchronous refusals: line busy, not callable, the number type, emergency, the line's limits and a moment's unavailability all come back on this POST, never as a 201 that fails later. Only outcomes after dialling (busy, no-answer, failed) arrive as status callbacks.
  • A line with no calling dongle answers 700005 (400): it's a permanent property of the line. 700002 (409) is only for the passing reasons, dongle_offline, line_suspended and temporarily_unavailable.
  • Per-line limits: one call at a time per dongle; calls per hour, minutes per day and the longest call (the default limits unless the console sets them), enforced by your dongle. Past one of these limits the answer is 700006.
  • Refused parameters (each gives 400, code 700008, naming it in parameter): ApplicationSid, the AMD family, the recording family, Trim, CallerId, SipAuthUsername, SipAuthPassword, Byoc, CallReason, Transcribe, and any parameter not listed here, e.g. TimeLimit or CallToken.

Request body

Form-encoded (application/x-www-form-urlencoded).

FieldTypeRequiredDescription
To stringrequired

The number to call, in E.164 (our number policy). Allowed: AU mobiles and landlines, plus +6113xxxx, +611300… and +611800… (we dial them in the national form). Refused with 700003: premium 19xx, short codes and international, unless the line is opted in. Refused with 700004: emergency numbers. Not a valid number: 21211.

Errors: 21211, 700003, 700004

From stringrequired

The line's own number. A number that isn't one of your lines gives 21606; an invalid number gives 21212.

Errors: 21212, 21606

Url string

Where to fetch the call's TwiML when it's answered (the outboundCall webhook). Use exactly one of Url or Twiml.

Errors: 21205, 700011, 790001

Method string: GET, POST

The method for Url. The default is POST.

Errors: 700012

Twiml string

Inline TwiML, ≤ 4000 characters (longer gives 700012). Unsupported or invalid TwiML is refused here (720001 / 720002).

Errors: 700011, 700012, 720001, 720002

FallbackUrl string

Fetched once if Url errors or times out.

Errors: 21205, 790001

FallbackMethod string: GET, POST

Errors: 700012

StatusCallback string

Where the callStatus webhook and runtime errors go.

Errors: 21205, 790001

StatusCallbackMethod string: GET, POST

Errors: 700012

StatusCallbackEvent one of array of string: initiated, ringing, answered, completed, string

Which events to send: initiated ringing answered completed, space-separated or repeated. The default is completed only. Anything else gives 700012.

Errors: 700012

Timeout integer

Seconds to ring before giving up, 5-60 (default 60). Out of range gives 700012.

Errors: 700012

SendDigits string

DTMF to send after the answer: [0-9*#wW], ≤ 32 characters. Anything else gives 700012.

Errors: 700012

ApplicationSid not in v1 (700008)

Refused in v1 (700008).

MachineDetection not in v1 (700008)

The AMD family, refused in v1 (700008). There's no answering-machine detection.

MachineDetectionTimeout not in v1 (700008)

The AMD family, refused in v1 (700008).

MachineDetectionSpeechThreshold not in v1 (700008)

The AMD family, refused in v1 (700008).

MachineDetectionSpeechEndThreshold not in v1 (700008)

The AMD family, refused in v1 (700008).

MachineDetectionSilenceTimeout not in v1 (700008)

The AMD family, refused in v1 (700008).

AsyncAmd not in v1 (700008)

The AMD family, refused in v1 (700008).

AsyncAmdStatusCallback not in v1 (700008)

The AMD family, refused in v1 (700008).

AsyncAmdStatusCallbackMethod not in v1 (700008)

The AMD family, refused in v1 (700008).

Record not in v1 (700008)

The recording family, refused in v1 (700008). There's no recording in v1.

RecordingChannels not in v1 (700008)

The recording family, refused in v1 (700008).

RecordingStatusCallback not in v1 (700008)

The recording family, refused in v1 (700008).

RecordingStatusCallbackMethod not in v1 (700008)

The recording family, refused in v1 (700008).

RecordingStatusCallbackEvent not in v1 (700008)

The recording family, refused in v1 (700008).

RecordingTrack not in v1 (700008)

The recording family, refused in v1 (700008).

Trim not in v1 (700008)

Refused in v1 (700008).

CallerId not in v1 (700008)

Refused in v1 (700008). From is always the line's own number.

SipAuthUsername not in v1 (700008)

Refused in v1 (700008).

SipAuthPassword not in v1 (700008)

Refused in v1 (700008).

Byoc not in v1 (700008)

Refused in v1 (700008).

CallReason not in v1 (700008)

Refused in v1 (700008).

Transcribe not in v1 (700008)

Refused in v1 (700008).

Refused (700008), the whole AMD family: MachineDetection, MachineDetectionTimeout, MachineDetectionSpeechThreshold, MachineDetectionSpeechEndThreshold, MachineDetectionSilenceTimeout, AsyncAmd, AsyncAmdStatusCallback, AsyncAmdStatusCallbackMethod.

Refused (700008), the whole recording family: Record, RecordingChannels, RecordingStatusCallback, RecordingStatusCallbackMethod, RecordingStatusCallbackEvent, RecordingTrack.

Any parameter not listed here is refused with 700008, naming it in parameter: v1 never ignores one.

Errors for the body as a whole: 700011

Responses

StatusMeaning
201

The call is placed, and status is queued.

400

A parameter or the number was refused: 21205, 21211, 21212, 21606, 700003, 700004, 700005, 700008, 700011, 700012, 720001, 720002 or 790001.

401

Authentication failed (20003), or the account isn't active (20005). This comes before any lookup.

409

The line can't take a call now: 700001 (a call is up) or 700002 (a passing reason, in why_not).

413

The request body is over 64 KiB (790006). It's refused before parsing.

429

Too many requests (20429), or the line's call limit is reached (700006).

500

An internal error (799999).

503

The dongle is busy for a moment (700007). Retry after Retry-After seconds.

Response fields

FieldTypeAlways thereDescription
sid string

CA + 32 hex.

account_sid string
to string

E.164.

to_formatted string

The national format, e.g. "0491 570 156".

from string

E.164. On an outbound call it's always the line's own number.

from_formatted string

The national format.

phone_number_sid string

The line's Sid.

status string: queued, ringing, in-progress, completed, busy, failed, no-answer, canceled

There's no answering-machine detection, so a call answered by voicemail reads in-progress.

direction string: outbound-api, inbound
start_time string or null

RFC 2822.

end_time string or null

RFC 2822.

duration string or null

Seconds, as a string.

answered_by null

Always null: there's no answering-machine detection in v1.

price null

Always null: billing is in the console.

price_unit null

Always null: billing is in the console.

date_created string

RFC 2822.

date_updated string

RFC 2822.

api_version string
uri string
subresource_uris object

Always {} in v1 (no recordings or other subresources).

Example request

curl -X POST "https://api.dongleswithwings.com/2010-04-01/Accounts/{AccountSid}/Calls.json" \
  --data-urlencode "To=+61255501234" \
  --data-urlencode "From=+61491570156" \
  --data-urlencode "Url=https://hooks.example.com/voice/outbound" \
  --data-urlencode "Method=POST" \
  --data-urlencode "StatusCallback=https://hooks.example.com/status" \
  --data-urlencode "StatusCallbackMethod=POST" \
  --data-urlencode "StatusCallbackEvent=initiated" \
  --data-urlencode "StatusCallbackEvent=ringing" \
  --data-urlencode "StatusCallbackEvent=answered" \
  --data-urlencode "StatusCallbackEvent=completed" \
  --data-urlencode "Timeout=30" \
  -u "$ACCOUNT_SID:$AUTH_TOKEN"

Example response

{
  "sid": "CAfac674904129191c9bee9f6d819b1c21",
  "account_sid": "ACa61cd972830fc5bc41386edc0a9f8463",
  "to": "+61255501234",
  "to_formatted": "02 5550 1234",
  "from": "+61491570156",
  "from_formatted": "0491 570 156",
  "phone_number_sid": "PN3e18acd0169a00c48635e530c42a01ca",
  "status": "queued",
  "direction": "outbound-api",
  "start_time": null,
  "end_time": null,
  "duration": null,
  "answered_by": null,
  "price": null,
  "price_unit": null,
  "date_created": "Mon, 02 Nov 2026 03:04:05 +0000",
  "date_updated": "Mon, 02 Nov 2026 03:04:05 +0000",
  "api_version": "2010-04-01",
  "uri": "/2010-04-01/Accounts/ACa61cd972830fc5bc41386edc0a9f8463/Calls/CAfac674904129191c9bee9f6d819b1c21.json",
  "subresource_uris": {}
}

GET /Accounts/{AccountSid}/Calls/{CallSid}.json

Read one call.

Returns one call. A Sid that isn't on this account gives 404 (code 20404).

Responses

StatusMeaning
200

The call.

401

Authentication failed (20003), or the account isn't active (20005). This comes before any lookup.

404

Not found (20404). That includes a Sid that isn't on the path's account; the answer never hints at another tenant.

429

Over a rate (20429, with Retry-After in seconds): per account, GET 10/s (burst 30), list pages with PageSize over 50 at 2/s, POST/DELETE 5/s (burst 10); per source IP before auth, 20/s; a gateway-wide ceiling with a fair share per account. Failed auth from one source IP (10/min) also answers 429 with code 20429, for 15 min.

500

An internal error (799999).

Response fields

FieldTypeAlways thereDescription
sid string

CA + 32 hex.

account_sid string
to string

E.164.

to_formatted string

The national format, e.g. "0491 570 156".

from string

E.164. On an outbound call it's always the line's own number.

from_formatted string

The national format.

phone_number_sid string

The line's Sid.

status string: queued, ringing, in-progress, completed, busy, failed, no-answer, canceled

There's no answering-machine detection, so a call answered by voicemail reads in-progress.

direction string: outbound-api, inbound
start_time string or null

RFC 2822.

end_time string or null

RFC 2822.

duration string or null

Seconds, as a string.

answered_by null

Always null: there's no answering-machine detection in v1.

price null

Always null: billing is in the console.

price_unit null

Always null: billing is in the console.

date_created string

RFC 2822.

date_updated string

RFC 2822.

api_version string
uri string
subresource_uris object

Always {} in v1 (no recordings or other subresources).

Example request

curl -X GET "https://api.dongleswithwings.com/2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}.json" \
  -u "$ACCOUNT_SID:$AUTH_TOKEN"

Example response

{
  "sid": "CAfac674904129191c9bee9f6d819b1c21",
  "account_sid": "ACa61cd972830fc5bc41386edc0a9f8463",
  "to": "+61255501234",
  "to_formatted": "02 5550 1234",
  "from": "+61491570156",
  "from_formatted": "0491 570 156",
  "phone_number_sid": "PN3e18acd0169a00c48635e530c42a01ca",
  "status": "completed",
  "direction": "outbound-api",
  "start_time": "Mon, 02 Nov 2026 03:04:09 +0000",
  "end_time": "Mon, 02 Nov 2026 03:06:14 +0000",
  "duration": "125",
  "answered_by": null,
  "price": null,
  "price_unit": null,
  "date_created": "Mon, 02 Nov 2026 03:04:05 +0000",
  "date_updated": "Mon, 02 Nov 2026 03:06:14 +0000",
  "api_version": "2010-04-01",
  "uri": "/2010-04-01/Accounts/ACa61cd972830fc5bc41386edc0a9f8463/Calls/CAfac674904129191c9bee9f6d819b1c21.json",
  "subresource_uris": {}
}

POST /Accounts/{AccountSid}/Calls/{CallSid}.json

Redirect, cancel or hang up a call.

Changes a live call. Send exactly one of these: - Url + Method, or Twiml: redirect the call to new TwiML now; - Status=canceled: cancel a call that hasn't been answered yet; - Status=completed: hang up.

If the call has already ended, or Status=canceled is sent for a call that's already answered, the answer is 400 with code 21220. Both Url and Twiml, or none of Url, Twiml and Status, gives 700011. Any parameter not listed here is refused with code 700008, which names it.

Request body

Form-encoded (application/x-www-form-urlencoded).

FieldTypeRequiredDescription
Url string

Redirect the call to the TwiML at this URL now.

Errors: 21205, 700011, 790001

Method string: GET, POST

Errors: 700012

Twiml string

Replace the running TwiML now, ≤ 4000 characters (longer gives 700012).

Errors: 700011, 700012, 720001, 720002

Status string: canceled, completed

canceled cancels a call that hasn't been answered yet (on an answered call it gives 21220); completed hangs up.

Errors: 21220, 700011, 700012

Any parameter not listed here is refused with 700008, naming it in parameter: v1 never ignores one.

Errors for the body as a whole: 700011

Responses

StatusMeaning
200

The call after the change.

400

The change was refused: 21205, 21220, 700008, 700011, 700012, 720001, 720002 or 790001.

401

Authentication failed (20003), or the account isn't active (20005). This comes before any lookup.

404

Not found (20404). That includes a Sid that isn't on the path's account; the answer never hints at another tenant.

413

The request body is over 64 KiB (790006). It's refused before parsing.

429

Over a rate (20429, with Retry-After in seconds): per account, GET 10/s (burst 30), list pages with PageSize over 50 at 2/s, POST/DELETE 5/s (burst 10); per source IP before auth, 20/s; a gateway-wide ceiling with a fair share per account. Failed auth from one source IP (10/min) also answers 429 with code 20429, for 15 min.

500

An internal error (799999).

Response fields

FieldTypeAlways thereDescription
sid string

CA + 32 hex.

account_sid string
to string

E.164.

to_formatted string

The national format, e.g. "0491 570 156".

from string

E.164. On an outbound call it's always the line's own number.

from_formatted string

The national format.

phone_number_sid string

The line's Sid.

status string: queued, ringing, in-progress, completed, busy, failed, no-answer, canceled

There's no answering-machine detection, so a call answered by voicemail reads in-progress.

direction string: outbound-api, inbound
start_time string or null

RFC 2822.

end_time string or null

RFC 2822.

duration string or null

Seconds, as a string.

answered_by null

Always null: there's no answering-machine detection in v1.

price null

Always null: billing is in the console.

price_unit null

Always null: billing is in the console.

date_created string

RFC 2822.

date_updated string

RFC 2822.

api_version string
uri string
subresource_uris object

Always {} in v1 (no recordings or other subresources).

Example request

curl -X POST "https://api.dongleswithwings.com/2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}.json" \
  --data-urlencode "Status=completed" \
  -u "$ACCOUNT_SID:$AUTH_TOKEN"

Example response

{
  "sid": "CA5c12c4724128e0975b3fcc18dd14465e",
  "account_sid": "ACa61cd972830fc5bc41386edc0a9f8463",
  "to": "+61370101234",
  "to_formatted": "03 7010 1234",
  "from": "+61491570156",
  "from_formatted": "0491 570 156",
  "phone_number_sid": "PN3e18acd0169a00c48635e530c42a01ca",
  "status": "completed",
  "direction": "outbound-api",
  "start_time": "Mon, 02 Nov 2026 06:00:04 +0000",
  "end_time": "Mon, 02 Nov 2026 06:01:31 +0000",
  "duration": "87",
  "answered_by": null,
  "price": null,
  "price_unit": null,
  "date_created": "Mon, 02 Nov 2026 06:00:00 +0000",
  "date_updated": "Mon, 02 Nov 2026 06:01:31 +0000",
  "api_version": "2010-04-01",
  "uri": "/2010-04-01/Accounts/ACa61cd972830fc5bc41386edc0a9f8463/Calls/CA5c12c4724128e0975b3fcc18dd14465e.json",
  "subresource_uris": {}
}

DELETE /Accounts/{AccountSid}/Calls/{CallSid}.json

Delete a call's record.

Deletes the call's record. While the call is live, the answer is 409 with code 21220. Records are kept for 3 months (90 days), then deleted.

Responses

StatusMeaning
204

Deleted. The body is empty.

401

Authentication failed (20003), or the account isn't active (20005). This comes before any lookup.

404

Not found (20404). That includes a Sid that isn't on the path's account; the answer never hints at another tenant.

409

The call is live, so its record can't be deleted yet (21220).

429

Over a rate (20429, with Retry-After in seconds): per account, GET 10/s (burst 30), list pages with PageSize over 50 at 2/s, POST/DELETE 5/s (burst 10); per source IP before auth, 20/s; a gateway-wide ceiling with a fair share per account. Failed auth from one source IP (10/min) also answers 429 with code 20429, for 15 min.

500

An internal error (799999).

Example request

curl -X DELETE "https://api.dongleswithwings.com/2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}.json" \
  -u "$ACCOUNT_SID:$AUTH_TOKEN"

Example response

HTTP/1.1 204 No Content (empty body)