# Record IDs

> The difference between the numeric ID (id) and the 15-character permanent record ID (rid), and when to use each.

Every record has two IDs:

| | `id` | `rid` |
|---|---|---|
| Format | Integer (`42`) | 15 characters (`001aB3xY7…`) |
| Scope | Unique within the record type | Unique within the installation; also identifies the type |
| Use | API paths and parameters | Storing in external systems, search, Excel matching |
| Can it change? | No | No |

API endpoints always take the `id` (`/api/v1/customers/42`). The `rid` is for storing a reference to a CRM record in another system, showing it to users, or matching records during an Excel import: on its own, it also carries the record's type.

## Prefixes

The first three characters of a `rid` identify the record type:

| Prefix | Type | Prefix | Type |
|---|---|---|---|
| `001` | Company | `00T` | Task |
| `003` | Person | `00Q` | Fair lead |
| `006` | Opportunity | `0Q0` | Quote |
| `00U` | Visit / call | `801` | Order |
| `a0D` | Trial | `800` | Contract |
| `01t` | Product | `500` | Support ticket |

The remaining 12 characters are case-sensitive random letters and digits.

## Finding a record by rid

If you pass a 15-character `rid` to the [search endpoint](/rest-api/workspace/search), the response's `record` field resolves it to that record:

```json
{
  "ok": true,
  "record": { "kind": "Customer", "url": "/customers/42", "customer_id": 42 },
  "customers": [], "contacts": [], "opps": [], "leads": []
}
```

In the web interface, the search in the top bar and the command palette (Ctrl/⌘ + K) also accept a `rid`.

## External IDs

To store an ID from another system in the CRM, use the [data sync hook](/guides/inbound#sync): it links the `external_id` field to the record and updates the same record on later sends. External records created by apps (a Notion page, an Asana task…) are also written to the record with their external ID and link; you open them from the **Apps** (*Uygulamalar*) menu on the record page.