# Check a login still works and is the pinned account

`POST` `/api/v1/workspaces/{workspace}/connections/{id}/verify`

`verifyConnection`

Reads the platform's identity endpoint; may refresh saved credentials or mark a login expired, and records X read usage. Some platforms answer an agent's token with the last stored check (made by the owner or the daily renewal) and call nobody. Who can call it: An API token with the "read" scope, or a member of this workspace, signed in.

**Scopes:** `read`

**Parameters**

| Name | In | Required | Type and constraints | Description / example |
| --- | --- | --- | --- | --- |
| `workspace` | path | Yes | `string`; pattern: `"^ws_[a-z0-9]{16}$"` |  Example: `"ws_aaaaaaaaaaaaaaaa"` |
| `id` | path | Yes | `string` |  Example: `"con_gggggggggggggggg"` |

**Request example**

```http
POST https://app.flaghand.com/api/v1/workspaces/ws_aaaaaaaaaaaaaaaa/connections/con_gggggggggggggggg/verify
Authorization: Bearer tok_<your workspace token>
```

**Response example**

```json
{
  "at": "2026-10-25T16:00:00Z",
  "ok": true,
  "account_matches": true
}
```

Success: HTTP 200. Content-Type: application/json.

**Errors:** `invalid_request` (400), `internal` (500), `unauthorized` (401), `invalid_token` (401), `session_expired` (401), `bad_origin` (403), `scope_missing` (403), `not_found` (404). See the [error codes](https://app.flaghand.com/docs/errors.md) for meanings and the shared default error response. Other domain errors from that catalog may apply; the response's code and message are authoritative.

**CLI:** `flaghand connections verify`

```sh
flaghand connections verify --workspace ws_aaaaaaaaaaaaaaaa --id con_gggggggggggggggg --json
```

**MCP tool:** `verifyConnection` (also reachable through `callWriteOperation`; use `getOperation` to load its full schema).

```json
{
  "name": "callWriteOperation",
  "arguments": {
    "operation_id": "verifyConnection",
    "arguments": {
      "workspace": "ws_aaaaaaaaaaaaaaaa",
      "id": "con_gggggggggggggggg"
    }
  }
}
```

Base URL: `https://app.flaghand.com/api/v1`. Part of the [API reference](https://app.flaghand.com/docs/api.md); every error code is in [errors](https://app.flaghand.com/docs/errors.md).
