Skip to main content
POST
/
v1
/
phones
/
{phone_id}
/
copy-text
Copy Text
curl --request POST \
  --url https://api.example.com/v1/phones/{phone_id}/copy-text
Load 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

ParameterTypeDescription
phone_idstringThe phone identifier

Query Parameters

ParameterTypeDefaultDescription
asyncbooleanfalseReturn immediately with job ID

Request Body

{
  "text": "Hello from TapKit"
}
FieldTypeRequiredDescription
textstringYesThe 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}
)
  • Type Text - Type text character by character
  • Tap - Tap to focus a text field