Phones

List the org's phones

Changed on

Returns the caller org's full dedicated (private/rented) phone inventory - every state, not just the free ones: busy phones in an active session, offline/inactive phones, and phones in maintenance are all included, so this is the endpoint to discover a phone_id you can pin via POST /phones:allocate. Each phone's current_session_id and status reflect its live state. include_expired=true also keeps rentals past their rental_expires_at so users can see what they used to own. Filter by status/phone_type and paginate; the response total is the full match count. Pass ownership=dedicated.

get/phones

Request

Query parameters

ownership'dedicated' required

Which phones to return. 'dedicated' = the org's dedicated/rented inventory in every state (busy, offline, and maintenance phones included).

include_expiredboolean

include rented devices whose rental window has expired

limitinteger
offsetinteger
searchstring

free-text search across phone_id, nickname, name, model, location

statusstring[] nullable

only phones at one of these statuses; repeatable

phone_typestring[] nullable

only phones of one of these platforms; repeatable

rental_expires_afterstring date-time

only phones whose rental expires at/after this time (RFC 3339)

rental_expires_beforestring date-time

only phones whose rental expires at/before this time (RFC 3339)

last_heartbeat_afterstring date-time

only phones whose last heartbeat is at/after this time (RFC 3339)

last_heartbeat_beforestring date-time

only phones whose last heartbeat is at/before this time (RFC 3339)

order_bystring

Sort expression '<field> [asc|desc]', direction defaulting to desc; field is created_at, rental_expires_at, last_heartbeat_at, status, phone_type or location.

Response

OK

limitinteger required

Page size used for this response.

offsetinteger required

Pagination offset used for this response.

totalinteger required

Total number of private devices matching the query.

Changes

    • breaking

      for the query request parameter rental_expires_after, the format changed from no format to date-time

    • breaking

      for the query request parameter rental_expires_before, the format changed from no format to date-time

    • breaking

      removed the required property // from the response with the status

    • breaking

      removed the required property // from the response with the status

    • warning

      deleted the query request parameter last_active_after

    • warning

      deleted the query request parameter last_active_before

    • warning

      deleted the query request parameter order

    • warning

      deleted the query request parameter sort

    • warning

      deleted the query request parameter type

    • info

      added the new optional query request parameter last_heartbeat_after

    • info

      added the new optional query request parameter last_heartbeat_before

    • info

      added the new optional query request parameter order_by

    • info

      added the new optional query request parameter phone_type

    • info

      added the enum value active to the property items/ of the query request parameter status

    • info

      added the enum value inactive to the property items/ of the query request parameter status

    • info

      added the enum value maintenance to the property items/ of the query request parameter status

    • info

      added the enum value out_of_service to the property items/ of the query request parameter status

    • info

      added the enum value recovering to the property items/ of the query request parameter status

    • info

      added the enum value suspended to the property items/ of the query request parameter status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the required property // to the response with the status

    • info

      added the required property // to the response with the status

    • info

      added the required property // to the response with the status

    • warning

      added the new out_of_service enum value to the // response property for the response status

    • warning

      added the new recovering enum value to the // response property for the response status