# user\_id & klaim\_id

## Overview

When managing user identities in our system, we use two key identifiers:

#### **klaim\_id (Internal Identifier)**

* This is a unique identifier **automatically generated by Klaim.**
* It is used internally to reference the user across our systems.
* You can think of it as a system-assigned ID that **always exists**, even if you don’t provide your own user ID.

#### user\_id (Your Custom Identifier)

* This is an **optional, user-defined identifier.**
* If you want to associate your own user ID with a record (e.g. email address, UUID from your own database), you can pass it as user\_id when creating or updating a user.

***

### How They Work Together

* If you provide a user\_id, we will store it and you can use it later to query or filter data.
* If you don’t provide a user\_id, the system will fall back to using the klaim\_id as the identifier in most APIs.<br>

> In short:\
> If user\_id is present → used as your custom identifier\
> If not → klaim\_id is used as the fallback identifier

***

### Example

```
{
  "klaim_id": "wk7LSKebUl9U7LvWhtkh-mafdaurp",
  "user_id": "my-user-123" // optional, but recommended
}
```

```
{
  "klaim_id": "wk7LSKebUl9U7LvWhtkh-mafdaurp",
  "user_id": "wk7LSKebUl9U7LvWhtkh-mafdaurp" // use klaim_id as user identifier
}
```

***

### Recommendation

We strongly recommend providing your own user\_id:

* It makes your data easier to manage and debug.
* It helps when correlating records across different systems.

But if you don’t, don’t worry — we’ll still handle everything using the system-generated klaim\_id.

***
