# Users

User management

Source: https://keyenv.dev/docs/api/users/

User management

## Get current user

```http
GET /api/v1/users/me
```

Returns the currently authenticated user's profile

**Operation ID:** `getCurrentUser` &middot; **Authentication:** `Authorization: Bearer <token>`

### Responses

| Status | Description | Body |
| --- | --- | --- |
| `200` | User profile | `User` |
| `401` | Authentication required | `Error` |
| `404` | Resource not found | `Error` |

### Response body (`200`)

| Field | Type | Description |
| --- | --- | --- |
| `id` | `string (uuid)` |  |
| `clerk_id` | `string` |  |
| `email` | `string (email)` |  |
| `name` | `string` |  |
| `avatar_url` | `string (uri)` |  |
| `auth_type` | `enum (user, service_token)` | Authentication type. Only present for service token auth. |
| `team_id` | `string (uuid)` | Team ID. Only present for service token auth. |
| `project_ids` | `string (uuid)[]` | Project IDs the token has access to. Only present for service token auth. Tokens can access multiple projects. |
| `scopes` | `string[]` | Token scopes (e.g., read, write). Only present for service token auth. |
| `created_at` | `string (date-time)` |  |

### Example

```bash
curl -X GET "https://api.keyenv.dev/api/v1/users/me" \
  -H "Authorization: Bearer $KEYENV_TOKEN"
```
