Copy Text
curl --request POST \
--url https://api.example.com/v1/phones/{phone_id}/copy-textimport requests
url = "https://api.example.com/v1/phones/{phone_id}/copy-text"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.example.com/v1/phones/{phone_id}/copy-text', 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}/copy-text",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$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}/copy-text"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/v1/phones/{phone_id}/copy-text")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/phones/{phone_id}/copy-text")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_bodyApps & Automation
Copy Text
Copy text to the phone’s clipboard
POST
/
v1
/
phones
/
{phone_id}
/
copy-text
Copy Text
curl --request POST \
--url https://api.example.com/v1/phones/{phone_id}/copy-textimport requests
url = "https://api.example.com/v1/phones/{phone_id}/copy-text"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.example.com/v1/phones/{phone_id}/copy-text', 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}/copy-text",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$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}/copy-text"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/v1/phones/{phone_id}/copy-text")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/phones/{phone_id}/copy-text")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_bodyLoad text into the phone’s clipboard via the iOS Shortcut. The text is staged on the server, then the copy shortcut is triggered via Switch Control so the phone picks it up and copies it to its clipboard.
This is the recommended way to input text in MCP sessions — copy the text, then tap a text field and paste.
Request
curl -X POST https://api.tapkit.ai/v1/phones/{phone_id}/copy-text \
-H "X-API-Key: joot_your_api_key" \
-H "Content-Type: application/json" \
-d '{"text": "Hello from TapKit"}'
Path Parameters
| Parameter | Type | Description |
|---|---|---|
phone_id | string | The phone identifier |
Query Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
async | boolean | false | Return immediately with job ID |
Request Body
{
"text": "Hello from TapKit"
}
| Field | Type | Required | Description |
|---|---|---|---|
text | string | Yes | The text to copy to the phone’s clipboard |
Response
Status: 200 OK{
"id": "job_abc123",
"status": "completed",
"result": {},
"created_at": "2024-01-15T10:30:00Z",
"completed_at": "2024-01-15T10:30:02Z"
}
Examples
Python
import requests
response = requests.post(
f"https://api.tapkit.ai/v1/phones/{phone_id}/copy-text",
headers={
"X-API-Key": "joot_...",
"Content-Type": "application/json"
},
json={"text": "Hello from TapKit"}
)
Copy and Paste Workflow
# 1. Copy text to clipboard
requests.post(
f"https://api.tapkit.ai/v1/phones/{phone_id}/copy-text",
headers={"X-API-Key": "joot_...", "Content-Type": "application/json"},
json={"text": "Search query here"}
)
# 2. Tap the search field
requests.post(
f"https://api.tapkit.ai/v1/phones/{phone_id}/tap",
headers={"X-API-Key": "joot_...", "Content-Type": "application/json"},
json={"x": 590, "y": 120}
)
# 3. Long press to get paste option, then tap paste
requests.post(
f"https://api.tapkit.ai/v1/phones/{phone_id}/tap-and-hold",
headers={"X-API-Key": "joot_...", "Content-Type": "application/json"},
json={"x": 590, "y": 120}
)
Related Endpoints
- Read Clipboard - Read text from the phone clipboard
- Tap - Tap to focus a text field
⌘I