REST API and automations
The same tools your AI agent uses, for your own programs and workflows. Make a key, send JSON, get JSON back. A key can never approve anything for you.
Make a key
- Open your Cloud Butler account page in the browser you connected iCloud from (setup steps), or sign in there with a passkey. The page needs one of these to unlock your saved connection; a connection made only inside an AI agent isn't enough on its own.
- On the account page, under API keys, give the key a name, pick the iCloud connection it acts as, and press Create API key. Creating a key needs a sign-in from the last 10 minutes.
- Copy the key straight away. It looks like
cb_live_…and is shown once: we keep only a one-way verifier, so it can't be shown again.
A key has the full access of the connection it was made for, under your plan. Keep it secret, never put it in public code, and revoke it on the account page when you stop using it; programs using a revoked key stop working within about a minute. An account can hold up to 10 keys. Deleting your account revokes every key.
Endpoints
Base URL: https://mcp.cloudbutler.app. Send the key on every call as Authorization: Bearer cb_live_…. Bodies are JSON.
| Call | What it does |
|---|---|
GET /v1/capabilities | Lists every tool this key can run, each with its title, description, risk (read, write or destructive) and its input as JSON Schema. |
POST /v1/actions | Runs one tool. Body: {"tool": "…", "args": { … }}, plus "approval_id" when you retry an approved action. |
GET /v1/actions/{id} | Status of a device action that is still running or waiting, and its result once it finishes. |
The tools are the ones on every tool, with the same names and arguments. Three device-management tools (pairing, removing a device, choosing the hub) are never available through a key, so a key can't add or remove the devices that approve your actions.
Your first call
List what your key can do:
curl https://mcp.cloudbutler.app/v1/capabilities \
-H "Authorization: Bearer $CLOUD_BUTLER_KEY"
List the events in a week (works on every plan):
curl https://mcp.cloudbutler.app/v1/actions \
-H "Authorization: Bearer $CLOUD_BUTLER_KEY" \
-H "Content-Type: application/json" \
-d '{
"tool": "calendar_list_events",
"args": {
"start": "2026-12-01T00:00:00-06:00",
"end": "2026-12-08T00:00:00-06:00"
}
}'
Add an event (needs Pro or Developer). The Idempotency-Key makes a retry safe:
curl https://mcp.cloudbutler.app/v1/actions \
-H "Authorization: Bearer $CLOUD_BUTLER_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: dentist-2026-12-03" \
-d '{
"tool": "calendar_create_event",
"args": {
"summary": "Dentist",
"start": "2026-12-03T09:00:00-06:00",
"location": "Main St Dental"
}
}'
Not sure of a tool's arguments? GET /v1/capabilities gives each one's JSON Schema.
Answers and statuses
| HTTP | status | Meaning |
|---|---|---|
| 200 | done | Finished. text holds the readable answer, data the structured result when the tool has one, and images any pictures. |
| 202 | "waiting_approval" | Only from Cloud Butler for Mac build 117 and the iPhone and iPad app 1.0, which still ask on the device until they update. Nothing has run yet. See older app builds. |
| 202 | running | A device action was handed to your iPhone, iPad or Mac (with the Cloud Butler app). Poll GET /v1/actions/{action_id} until it says done, failed or expired. |
| 403 | "plan_required" | Nothing ran: this action is not on your plan. code is "PLAN_REQUIRED", feature names the action and plan the plan that includes it. |
| 422 | failed | The tool ran and reported a problem, such as a message it couldn't find. error says what happened. |
Device actions, and older app builds
An API key can never approve anything. An action on a device you paired with the Cloud Butler app answers 202 with running and an "action_id". Cloud Butler adds no prompt of its own, so the device runs it and GET /v1/actions/{action_id} shows done (or failed, with what went wrong). If no device picks it up in time, it shows expired and never runs. On Cloud Butler for Mac build 117 and the iPhone and iPad app 1.0, which still ask on the device until they update, it can show "waiting_approval" until you answer there, then done, or declined and never runs.
Actions in iCloud itself (Mail, Calendar, Contacts and the rest) run what your plan and the key's connection allow, with no chat in between to ask you first. Treat a key like a password, and give a program only a key for the connection it needs.
Errors
| HTTP | error | What to do |
|---|---|---|
| 400 | "bad_request" | The body isn't JSON with a tool string, or the Idempotency-Key header isn't 1 to 200 visible ASCII characters. |
| 400 | "invalid_args" | The arguments don't match the tool's schema. issues lists each field and why. |
| 401 | unauthorized | No key, a mistyped key or a revoked key. |
| 404 | "unknown_tool" | This connection has no tool by that name. Check GET /v1/capabilities. |
| 404 | "not_found" | An unknown or expired action id on GET /v1/actions/{id}, or a path the API doesn't have. |
| 422 | "idempotency_key_reused" | That Idempotency-Key was already used for a different request. |
| 429 | "rate_limited" | Too many calls for this key. Wait for the Retry-After seconds, then try again. |
| 503 | "busy" | The API couldn't check your rate limit just now, so it ran nothing. Wait for the Retry-After seconds, then try again. |
A tool your plan doesn't include answers 403 with "status": "plan_required" and a short note saying which plan it needs, as it does in your AI agent.
Safe retries
Send an Idempotency-Key header on any POST /v1/actions that changes something. If the same key and the same request arrive again within 24 hours, Cloud Butler answers what the first call answered, marked Idempotent-Replayed: true, without running the action twice. So a timeout won't send an email twice. Three notes: a call that was waiting for your approval isn't kept, so the approved retry can run; very large answers, such as photos and files, aren't kept, so a retry of those runs again; and calls that only read are never kept, since running them again changes nothing (that includes mail_read, unless you ask it to mark the message read).
Rate limits and plans
| Plan | What the API can do | Calls a minute, per key | Use |
|---|---|---|---|
| Free | Every tool that reads | 120 | Personal |
| Pro, $14.99 a month or $119.99 a year | Every tool, including ones that act | 120 | Personal |
| Developer, $49 a month | Everything in Pro | 1,200 | Commercial: workflows you run for a business, or inside a product you offer |
The Developer plan doesn't let you reach anyone else's Apple Account: each person connects their own. See the terms and the Developer plan.
n8n, Zapier and Make
Ready-made integrations are planned for the n8n community nodes, the Zapier app directory and the Make app directory. Each one uses an API key from your account page and lets you run any Cloud Butler tool, with ready-made steps for common jobs such as creating a calendar event, sending an email or adding a reminder. Until they are listed, any automation tool that can send an HTTP request can call the API directly:
- n8n: an HTTP Request node, method POST, URL
https://mcp.cloudbutler.app/v1/actions, a Header Auth credential withAuthorizationset toBearer cb_live_…, and a JSON body. - Zapier: a Webhooks by Zapier step, Custom Request, with the same URL, header and body.
- Make: an HTTP › Make a request module, with the same URL, header and body.
Questions
Is the REST API different from the MCP connector?
No. It is a second door onto the same tools, with the same plan checks, permissions and approvals. Use the connector in AI agents such as Claude and ChatGPT, and the REST API in your own code and automation tools.
Can my script approve its own actions?
No. An API key can never approve an action, whatever the program sends. Actions run what your plan and the key's connection allow. On older app builds, a device action can wait for your answer on that device. See older app builds.
Does Cloud Butler keep what the API returns?
Only for safe retries: when you send an Idempotency-Key, the answer is kept for 24 hours, encrypted with your connection's own key, so a retry gets the same answer. Without that header, nothing from the answer is kept.
What happens if I reconnect my iCloud account?
Make a new key. A key is tied to the connection it was made for.