Get Phone Status
curl --request GET \
--url https://api.example.com/v1/phones/{phone_id}/statusimport requests
url = "https://api.example.com/v1/phones/{phone_id}/status"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/v1/phones/{phone_id}/status', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/v1/phones/{phone_id}/status",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/phones/{phone_id}/status"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/v1/phones/{phone_id}/status")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/phones/{phone_id}/status")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_bodyDevices
Get Phone Status
Get real-time status for a phone
GET
/
v1
/
phones
/
{phone_id}
/
status
Get Phone Status
curl --request GET \
--url https://api.example.com/v1/phones/{phone_id}/statusimport requests
url = "https://api.example.com/v1/phones/{phone_id}/status"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/v1/phones/{phone_id}/status', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/v1/phones/{phone_id}/status",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/phones/{phone_id}/status"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/v1/phones/{phone_id}/status")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/phones/{phone_id}/status")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_bodyGet the real-time connection and control status for a specific phone. Unlike Get Info which returns device metadata, this endpoint returns live operational state.
Request
curl https://api.tapkit.ai/v1/phones/{phone_id}/status \
-H "X-API-Key: joot_your_api_key"
Path Parameters
| Parameter | Type | Description |
|---|---|---|
phone_id | string | The phone identifier |
Response
Status: 200 OK{
"phone_id": "abc123-def456",
"phone_name": "iPhone 15 Pro",
"connection_status": "online",
"switch_control_enabled": true,
"screen_locked": false,
"streaming": false,
"width": 1179,
"height": 2556
}
Response Fields
| Field | Type | Description |
|---|---|---|
phone_id | string | Phone identifier |
phone_name | string | null | Phone display name |
connection_status | string | online, available, or offline |
switch_control_enabled | boolean | Whether Switch Control is active |
screen_locked | boolean | Whether the screen is locked |
streaming | boolean | Whether the phone is currently streaming its screen |
width | integer | null | Screen width in pixels |
height | integer | null | Screen height in pixels |
Examples
Python
import requests
response = requests.get(
f"https://api.tapkit.ai/v1/phones/{phone_id}/status",
headers={"X-API-Key": "joot_..."}
)
status = response.json()
print(f"Connection: {status['connection_status']}")
print(f"Switch Control: {status['switch_control_enabled']}")
print(f"Screen locked: {status['screen_locked']}")
Check Before Running a Session
status = requests.get(
f"https://api.tapkit.ai/v1/phones/{phone_id}/status",
headers={"X-API-Key": "joot_..."}
).json()
if status["connection_status"] != "online":
print("Phone is not online")
elif not status["switch_control_enabled"]:
print("Switch Control is not enabled")
elif status["screen_locked"]:
print("Screen is locked — unlock first")
else:
print("Ready to go!")
Related Endpoints
- Get Info - Get device metadata and settings
- List Phones - List all phones
- Select Phone - Switch the active phone on the Mac
⌘I