> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stateset.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Users

> People in your workspace — agents, operators, and the customers they talk to.

# Users

A user record represents a person in your workspace: an operator handling tickets, or a customer
on the other side of a conversation.

## Shape

| Field                  | Type    | Notes                                           |
| ---------------------- | ------- | ----------------------------------------------- |
| `id`                   | number  | Unique identifier                               |
| `email`                | string  | Primary address                                 |
| `phone`                | string  | Contact number                                  |
| `active`               | boolean | Whether the user is active                      |
| `organization`         | string  | Organisation they belong to                     |
| `avatar`               | string  | Avatar URL                                      |
| `bio`                  | string  | Free-text biography                             |
| `location` / `country` | string  | Where they are                                  |
| `birthday`             | string  | Date of birth                                   |
| `last_seen`            | string  | Last activity                                   |
| `last_typed`           | string  | Last typing activity — useful for live presence |

<Note>
  `last_seen` and `last_typed` drive presence indicators. `last_typed` updates far more often than
  `last_seen`, so poll it only when you're rendering a live view.
</Note>

## Endpoints

| Method   | Path            |                                                |
| -------- | --------------- | ---------------------------------------------- |
| `GET`    | `/v1/users`     | [List](/response-api-reference/users/list)     |
| `GET`    | `/v1/users/:id` | [Get](/response-api-reference/users/get)       |
| `POST`   | `/v1/users`     | [Create](/response-api-reference/users/create) |
| `PUT`    | `/v1/users/:id` | [Update](/response-api-reference/users/update) |
| `DELETE` | `/v1/users/:id` | [Delete](/response-api-reference/users/delete) |

## Example

```bash theme={null}
curl https://api.stateset.com/v1/users/42 \
  -H "Authorization: Bearer $STATESET_API_KEY"
```

```bash theme={null}
curl -X POST https://api.stateset.com/v1/users \
  -H "Authorization: Bearer $STATESET_API_KEY" \
  -H 'content-type: application/json' \
  -d '{
    "email": "jordan@example.com",
    "organization": "Acme",
    "active": true
  }'
```

<Warning>
  User records hold personal data — email, phone, location, birthday. Deleting a user is a `DELETE`
  on the record; if you have retention or erasure obligations, that is the endpoint that satisfies
  them, and it is not reversible.
</Warning>

## Related

* [Messages](/response-api-reference/messages) — messages reference `user_id`
* [Settings](/response-api-reference/settings) — `assignee_user_id` and escalation targets
