---
title: "Fetch current user. This api should also double as a token validation api"
method: GET
path: "/user"
tags: ["user"]
---

# Fetch current user. This api should also double as a token validation api

`GET /user`

## Response `200`

OK

- ServerCreatedUserResponse
  - `current_workspace` MalakWorkspace
    - `created_at` string
    - `id` string
    - `metadata` MalakPlanMetadata
      - `deck` object
        - `count` integer
      - `team` object
        - `enabled` boolean
        - `size` integer
    - `plan_id` string
    - `reference` string
    - `stripe_customer_id` string — Not required Dummy values work really
    - `subscription_id` string
    - `updated_at` string
    - `workspace_name` string
  - `message` string, required
  - `token` string, required
  - `user` MalakUser, required
    - `created_at` string
    - `email` string
    - `full_name` string
    - `id` string
    - `metadata` MalakUserMetadata
      - `current_workspace` string — Used to keep track of the last used workspace In the instance of multiple workspaces So when next the user logs in, we remember and take them to the right place rather than always a list of all their workspaces and they have to select one
    - `roles` MalakUserRole[]
      - `created_at` string
      - `id` string
      - `role` 'admin' | 'member' | 'billing' | 'investor' | 'guest'
      - `updated_at` string
      - `user_id` string
      - `workspace_id` string
    - `updated_at` string
  - `workspaces` MalakWorkspace[], required
    - `created_at` string
    - `id` string
    - `metadata` MalakPlanMetadata
      - `deck` object
        - `count` integer
      - `team` object
        - `enabled` boolean
        - `size` integer
    - `plan_id` string
    - `reference` string
    - `stripe_customer_id` string — Not required Dummy values work really
    - `subscription_id` string
    - `updated_at` string
    - `workspace_name` string

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `404` — Not Found
- `500` — Internal Server Error

## Changes

- **2024-12-24** `60bec59f1e00` — 2 info
  - added the optional property `current_workspace/metadata/deck` to the response with the `200` status
  - added the optional property `workspaces/items/metadata/deck` to the response with the `200` status
- **2024-11-14** `9eeda9b06388` — 13 warning, 2 info
  - removed the optional property `current_workspace/is_banned` from the response with the `200` status
  - removed the optional property `current_workspace/is_subscription_active` from the response with the `200` status
  - removed the optional property `current_workspace/logo_url` from the response with the `200` status
  - removed the optional property `current_workspace/plan` from the response with the `200` status
  - …11 more

[Change history](https://skmtc.dev/ayinke-llc/apis/malak-s-api-documentation/changes/user/get.md)

---

[API](https://skmtc.dev/ayinke-llc/apis/malak-s-api-documentation.md) · [All operations](https://skmtc.dev/ayinke-llc/apis/malak-s-api-documentation/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/ayinke-llc/malak-s-api-documentation/revisions/ab3daa8a3323/schema)
