# Check your CRM key

Source: https://help.ruuster.com/api/crm-identity

```http
GET https://api.ruuster.com/v1/crm/identity
```

Whose CRM API key this is (account and user), whether it sees the whole account or one user's people, and which Ruuster and CRM joins your CRM supports. One CRM call or two; use it to confirm a CRM connection.

- Authentication: `x-api-key` and `x-email` headers of an owner or admin
- Rate limit: *lookup* call, 20 per minute per key, within the 120 per minute
- Your CRM: `x-crm-vendor` and `x-crm-key` headers with your CRM's API key, used for this request only. See [Connect your CRM](https://help.ruuster.com/api/crm)

Confirms the CRM key sent in `x-crm-vendor` and `x-crm-key` works, and says what it can see. The MCP connect screen uses it to check the key you paste. The key is used for this request only and never stored. See [Connect your CRM](https://help.ruuster.com/api/crm).

## Response

| Field | Description |
|---|---|
| `vendor`, `label` | `fub` (Follow Up Boss), `sierra` (Sierra Interactive) or `suresend` (Sure Send) |
| `account.id`, `account.name` | The CRM account the key belongs to, when the CRM says (Sierra doesn't) |
| `user` | The CRM user the key belongs to: `id`, `name`, `email`, `role`, `isOwner`; null for Sierra's site-wide keys |
| `scope` | `account`: the key sees the whole account. `user`: it may see only that user's people, so counts and lists can be partial. `site`: a Sierra site key |
| `note` | A caution about the key, when there is one |
| `joins.followUp` | Whether [Find engaged leads your CRM hasn't called](https://help.ruuster.com/api/leads-follow-up) works with this CRM |
| `joins.segmentsBy` | The groupings [Count engaged leads by CRM pond, stage, agent or tag](https://help.ruuster.com/api/leads-crm-segments) supports, and `joins.segmentsSource` where they come from |
| `joins.ponds` | Whether the CRM's ponds are available |

## Example request

cURL:

```bash
curl -s "https://api.ruuster.com/v1/crm/identity" \
  -H "x-api-key: $RUUSTER_API_KEY" \
  -H "x-email: $RUUSTER_EMAIL" \
  -H "x-crm-vendor: fub" \
  -H "x-crm-key: $CRM_API_KEY"
```

Node.js:

```javascript
const res = await fetch("https://api.ruuster.com/v1/crm/identity", {
  headers: {
    "x-api-key": process.env.RUUSTER_API_KEY,
    "x-email": process.env.RUUSTER_EMAIL,
    "x-crm-vendor": "fub",
    "x-crm-key": process.env.CRM_API_KEY,
  },
});
const body = await res.json();
if (!body.ok) throw new Error(`${body.error.code}: ${body.error.message} (${body.requestId})`);
console.log(body.data);
```

Python:

```python
import os
import requests

res = requests.get(
    "https://api.ruuster.com/v1/crm/identity",
    headers={"x-api-key": os.environ["RUUSTER_API_KEY"], "x-email": os.environ["RUUSTER_EMAIL"], "x-crm-vendor": "fub", "x-crm-key": os.environ["CRM_API_KEY"]},
    timeout=30,
)
body = res.json()
if not body["ok"]:
    raise RuntimeError(f'{body["error"]["code"]}: {body["error"]["message"]} ({body.get("requestId")})')
print(body["data"])
```

## Example response

```json
{
  "ok": true,
  "data": {
    "vendor": "fub",
    "label": "Follow Up Boss",
    "account": { "id": "1234567", "name": "examplerealty" },
    "user": { "id": "2", "name": "Alex Rivera", "email": "alex@examplerealty.com", "role": "Broker", "isOwner": true },
    "scope": "account",
    "note": null,
    "joins": { "followUp": true, "segmentsBy": ["pond", "stage", "agent", "tag"], "segmentsSource": "live", "ponds": true }
  },
  "meta": {
    "crm": { "vendor": "fub", "label": "Follow Up Boss", "source": "Follow Up Boss, live, with your API key", "calls": 2 }
  }
}
```
