Skip to main content
CloudThinker has no general REST API for reading resources or recommendations; if you need one, email support@cloudthinker.io with your use case. It does have five supported ways for outside code to reach your workspace, each for a different job, listed below.

Pick an integration

Webhooks are inbound only. CloudThinker doesn’t POST events to your endpoints. To send results outward, use notifications, Slack or Microsoft Teams.

A2A API for outside callers

The A2A API lets a system outside CloudThinker ask one agent a question over the Agent2Agent (A2A) protocol. The caller authenticates with the OAuth 2.0 client credentials grant, so no person has to log in. A typical case: your platform team wants ServiceNow to ask CloudThinker about an incident. You register ServiceNow as an outside caller, pick the agent that answers, and ServiceNow sends its questions to the agent URL.

Before you start

  • The organization is on Scale or Enterprise. See Pricing.
  • You have the Developer or Admin workspace role, which can edit agents. See Workspace users.
  • You know which agent should answer: CloudThinker itself or one of your Custom Agents. Each outside caller is tied to one agent in one workspace.

Register an outside caller

1

Open the sharing settings

Go to Agents → Sharing → Outside callers.
2

Add the caller

Click Add an outside caller. Enter a Name your team will recognize (for example “ServiceNow”), pick the Agent that answers, and optionally set a Monthly credit limit. Leave the limit empty for no limit. Click Create client.
3

Copy the credentials

CloudThinker shows four values: Client ID, Client secret, Token URL and Agent URL. Copy the secret now. It’s shown once, and CloudThinker keeps only a hash of it.The two URLs look like this:
Every caller uses the same agent URL. The token decides which workspace and agent answer.
4

Store them in the calling system

Put the client ID and secret in the outside system’s secret store, next to the token URL and agent URL.

Get a token and ask a question

The flow has three calls:
1

Request a token

POST to the token URL with HTTP Basic auth (client ID as the user, secret as the password) and the client_credentials grant.
A successful response:
The token is valid for 1 hour. Request a new one when it expires. Errors use the OAuth 2.0 (RFC 6749) format, for example {"error": "invalid_client", "error_description": "..."}.
2

Send the question

POST a JSON-RPC 2.0 SendMessage request to the agent URL with the token as a Bearer token. Give each question a unique messageId. Resending the same messageId returns the first task instead of starting a new run, so retries are safe.
CloudThinker answers at once with the task. Keep its id:
3

Poll for the answer

Call GetTask with the task ID until the state is final. CloudThinker never pushes results to an outside caller, so polling is the only way to get them. An agent run takes minutes, so poll every 10 to 30 seconds.
Stop polling when status.state is TASK_STATE_COMPLETED, TASK_STATE_FAILED, TASK_STATE_REJECTED or TASK_STATE_CANCELED. On TASK_STATE_COMPLETED, the answer is the text in result.artifacts[].parts[]. See Task fields for every state.

What to expect

Rotate, pause or revoke

In Agents → Sharing → Outside callers, each caller’s row has these controls:
Revoking a caller is permanent. To stop traffic without losing the caller, pause it instead.

A2A reference

Everything an outside caller can send and get back. All calls go to https://app.cloudthinker.io.

Endpoints

You can send an optional A2A-Version header on calls to /api/a2a. CloudThinker speaks A2A 1.0 and also accepts 1 and 1.0.0. Any other value fails with JSON-RPC error -32009.

Token request

POST /api/a2a/oauth/token with Content-Type: application/x-www-form-urlencoded. Client IDs start with cta_. A success returns 200 with Cache-Control: no-store:
Errors return an OAuth 2.0 body, {"error": "...", "error_description": "..."}: A paused caller can still get a token. Its SendMessage calls fail with client_inactive until you turn it back on.

JSON-RPC envelope

Every call to POST /api/a2a is a JSON-RPC 2.0 request:
id can be a string, a number or null, and comes back unchanged. A success has a result; a failure has an error (see A2A errors).

SendMessage

Starts one agent run, or returns the existing task when the messageId was sent before. The question is capped at 8,000 characters; longer text is cut. A question with no text, or one that contains a secret such as an access key, is refused with blocked_by_guardrail. The result wraps the task in a task field:

GetTask

The result is the task itself, with no task wrapper. Once the state is TASK_STATE_COMPLETED, the answer is in one artifact:
CloudThinker redacts secrets from the answer text before it returns it. When a run fails, is rejected or is canceled, status.message.parts[].text says why, and metadata.failureKind holds a short code.

CancelTask

Stops a task that hasn’t finished. It takes the same params as GetTask and returns the task in the same shape. Canceling a task that already reached a final state fails with task_not_cancelable.

Task fields

A2A errors

A failed JSON-RPC call returns an error object. The reason is in error.data.reason:
The envelope itself can fail before CloudThinker reads the method:

Limits

Webhooks

A JSON POST to a webhook URL either runs an Automation, or sends an alert to Resolve, which can open an incident and start a root cause analysis. Creating either kind needs the Admin workspace role. Use a webhook to fire work and move on; use the A2A API when the caller needs an answer back. See Webhooks.

Claude connector

The Claude connector is a remote Model Context Protocol (MCP) server at:
Add it in claude.ai, the Claude desktop app or Claude Code. Only Claude clients can connect today. On a Claude Team or Enterprise plan, a Claude organization owner adds the connector first, then each member connects. See Claude connector.

SCIM provisioning

SCIM 2.0 lets Okta or Microsoft Entra ID add, suspend and remove CloudThinker members. You need Scale or Enterprise, an active SSO connection with a verified domain, and the organization Owner role. While SCIM is on, member invitations from CloudThinker are turned off. See SCIM provisioning.

CLI

The cloudthinker CLI runs on macOS and Linux. There is no native Windows build. Install it and log in:
If you’d rather not pipe a script into sh, download the archive from the releases page. Each archive has a SHA-256 checksum next to it. For scripts and CI, cloudthinker chat -p "Check production health" prints one answer to stdout, and works on every plan, including Free. The interactive agent (cloudthinker) needs Team, Scale, or Enterprise. The CLI is in preview, so command names and flags may change. See CLI.

Troubleshooting

Webhooks

Run an Automation or send an alert to Resolve with one POST

Claude Connector

Use CloudThinker from Claude over remote MCP