---
title: "Claude accounts · intentic sandbox API"
description: "Connecting an Anthropic subscription, and the accounts already connected. Every route in the claude accounts group of the intentic sandbox API, with its input, its answer and a playground."
url: "https://intentic.dev/api/claude/"
---

Models and accounts

# Claude accounts

Connecting an Anthropic subscription, and the accounts already connected

**On this page (5 sections)**

- [Begin connecting a Claude account](#claude-start)
- [Finish connecting a Claude account](#claude-exchange)
- [Connected Claude accounts](#claude-accounts)
- [Rename a Claude account](#claude-rename)
- [Disconnect a Claude account](#claude-disconnect)

Begin and finish a sign-in, list what is connected with how full each account's limits were, rename one, disconnect one. A sandbox can hold several side by side.

**POST`/claude/oauth/start` Begin connecting a Claude account**

Hands back the address to send somebody to, and the proof this sandbox will need to finish the exchange. The sandbox holds the credential afterwards, not the browser.

### What you send

Nothing. Call it as it is.

### What comes back

| Field | Type |
| --- | --- |
| `authorizeUrl` Where to send somebody to sign… | string |
| `verifier` Keep this and send it back… | string |
| `state` The handshake's own id, sent back… | string |

Try it answered in this tab

curl

```bash
curl -X POST "$SANDBOX/claude/oauth/start" \
 -H "x-intentic-control: $INTENTIC_TOKEN"
```

TypeScript

```typescript
import { sandbox } from "@intentic/sandbox-client";

const result = await sandbox.claude.start();
```

**POST`/claude/oauth/exchange` Finish connecting a Claude account**

Trades the code from the sign-in for stored tokens and answers with the account it just connected. A sandbox can hold several Claude accounts side by side.

### What you send

| Field | Type | Where |
| --- | --- | --- |
| `code` required The code the sign-in handed back | string | body |
| `verifier` required The proof from the start of… | string | body |
| `state` required The handshake this belongs to | string | body |
| `label` What to call the account | string | body |

### What comes back

| Field | Type |
| --- | --- |
| `id` The account's id, which is what… | string |
| `label` What it is called here, which… | string |
| `email` Who it signs in as, in… | string |
| `organization` Which organisation it belongs to, where… | string |
| `scope` What the credential is permitted to… | string |
| `connectedAt` When it was connected, in milliseconds | number |
| `needsReauth` Its stored credential can no longer… | boolean |
| `detail` Why, in words a person can… | string |
| `usage` How full its plan limits were… | object |
| `windows` | object[] |
| `kind` | string |
| `label` | string |
| `utilization` | number |
| `resetsAt` | number |
| `measuredAt` | number |

Try it answered in this tab

curl

```bash
curl -X POST "$SANDBOX/claude/oauth/exchange" \
 -H "x-intentic-control: $INTENTIC_TOKEN" \
 -H "content-type: application/json" \
 -d '{"code":"…","verifier":"…","state":"idle","label":"Nightly changelog"}'
```

TypeScript

```typescript
import { sandbox } from "@intentic/sandbox-client";

const result = await sandbox.claude.exchange({
 "code": "…",
 "verifier": "…",
 "state": "idle",
 "label": "Nightly changelog"
});
```

**GET`/claude/accounts` Connected Claude accounts**

Each connected account with how full its plan limits were when last measured. Ask for a fresh measurement and it takes one before answering, which is slower.

### What you send

| Field | Type | Where |
| --- | --- | --- |
| `force` Measure the plan limits again before… | string | query |

### What comes back

| Field | Type |
| --- | --- |
| `accounts` The connected accounts | object[] |
| `id` The account's id, which is what… | string |
| `label` What it is called here, which… | string |
| `email` Who it signs in as, in… | string |
| `organization` Which organisation it belongs to, where… | string |
| `scope` What the credential is permitted to… | string |
| `connectedAt` When it was connected, in milliseconds | number |
| `needsReauth` Its stored credential can no longer… | boolean |
| `detail` Why, in words a person can… | string |
| `usage` How full its plan limits were… | object |
| `windows` | object[] |
| `kind` | string |
| `label` | string |
| `utilization` | number |
| `resetsAt` | number |
| `measuredAt` | number |

Try it answered in this tab

curl

```bash
curl "$SANDBOX/claude/accounts" \
 -H "x-intentic-control: $INTENTIC_TOKEN"
```

TypeScript

```typescript
import { sandbox } from "@intentic/sandbox-client";

const result = await sandbox.claude.accounts();
```

**POST`/claude/account/rename` Rename a Claude account**

Changes the label one account shows under, so several are tellable apart.

### What you send

| Field | Type | Where |
| --- | --- | --- |
| `id` required Which account | string | body |
| `label` required The new name | string | body |

### What comes back

| Field | Type |
| --- | --- |
| `id` The account's id, which is what… | string |
| `label` What it is called here, which… | string |
| `email` Who it signs in as, in… | string |
| `organization` Which organisation it belongs to, where… | string |
| `scope` What the credential is permitted to… | string |
| `connectedAt` When it was connected, in milliseconds | number |
| `needsReauth` Its stored credential can no longer… | boolean |
| `detail` Why, in words a person can… | string |
| `usage` How full its plan limits were… | object |
| `windows` | object[] |
| `kind` | string |
| `label` | string |
| `utilization` | number |
| `resetsAt` | number |
| `measuredAt` | number |

Try it answered in this tab

curl

```bash
curl -X POST "$SANDBOX/claude/account/rename" \
 -H "x-intentic-control: $INTENTIC_TOKEN" \
 -H "content-type: application/json" \
 -d '{"id":"a1b2c3d4","label":"Nightly changelog"}'
```

TypeScript

```typescript
import { sandbox } from "@intentic/sandbox-client";

const result = await sandbox.claude.rename({
 "id": "a1b2c3d4",
 "label": "Nightly changelog"
});
```

**POST`/claude/account/disconnect` Disconnect a Claude account**

Clears the stored tokens for one account. The others stay connected.

### What you send

| Field | Type | Where |
| --- | --- | --- |
| `id` required Which account | string | body |

### What comes back

| Field | Type |
| --- | --- |
| `ok` Always true | true |

Try it answered in this tab

curl

```bash
curl -X POST "$SANDBOX/claude/account/disconnect" \
 -H "x-intentic-control: $INTENTIC_TOKEN" \
 -H "content-type: application/json" \
 -d '{"id":"a1b2c3d4"}'
```

TypeScript

```typescript
import { sandbox } from "@intentic/sandbox-client";

const result = await sandbox.claude.disconnect({
 "id": "a1b2c3d4"
});
```

More in Models and accounts

[Next Grok accounts →](https://intentic.dev/api/grok/)
