---
title: "GET /user"
method: GET
path: "/user"
tags: ["user"]
---

# GET /user

`GET /user`

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

## Response `200`

OK

- ServerCreatedUserResponse
  - `current_workspace` MalakWorkspace
    - `created_at` string
    - `id` string
    - `is_banned` boolean
    - `is_subscription_active` boolean
    - `logo_url` string
    - `metadata` MalakWorkspaceMetadata
    - `plan` MalakPlan
      - `amount` integer — Defaults to zero
      - `created_at` string
      - `default_price_id` string — Stripe default price id. Again not needed if not using Stripe
      - `id` string
      - `is_default` boolean — IsDefault if this is the default plan for the user to get signed up to on sign up Better to keep this here than to use config
      - `metadata` MalakPlanMetadata
        - `dashboard` object
          - `embed_dashboard` boolean
          - `max_charts_per_dashboard` integer
          - `share_dashboard_via_link` boolean
        - `data_room` object
          - `share_via_link` boolean
          - `size` integer
        - `deck` object
          - `analytics` object
            - `can_view_historical_sessions` boolean
          - `auto_terminate_link` boolean
          - `custom_domain` boolean
        - `integrations` object
          - `available_for_use` integer
        - `team` object
          - `size` integer
        - `updates` object
          - `custom_domain` boolean
          - `max_recipients` integer
      - `plan_name` string
      - `reference` string — Can use a fake id really As this only matters if you turn on Stripe
      - `updated_at` string
    - `plan_id` string
    - `reference` string
    - `stripe_customer_id` string — Not required Dummy values work really if not using stripe
    - `subscription_id` string
    - `timezone` string
    - `updated_at` string
    - `website` string
    - `workspace_name` string
  - `message` string, required
  - `token` string, required
  - `user` MalakUser, required
    - `created_at` string
    - `email` string
    - `email_verified_at` 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
    - `is_banned` boolean
    - `is_subscription_active` boolean
    - `logo_url` string
    - `metadata` MalakWorkspaceMetadata
    - `plan` MalakPlan
      - `amount` integer — Defaults to zero
      - `created_at` string
      - `default_price_id` string — Stripe default price id. Again not needed if not using Stripe
      - `id` string
      - `is_default` boolean — IsDefault if this is the default plan for the user to get signed up to on sign up Better to keep this here than to use config
      - `metadata` MalakPlanMetadata
        - `dashboard` object
          - `embed_dashboard` boolean
          - `max_charts_per_dashboard` integer
          - `share_dashboard_via_link` boolean
        - `data_room` object
          - `share_via_link` boolean
          - `size` integer
        - `deck` object
          - `analytics` object
            - `can_view_historical_sessions` boolean
          - `auto_terminate_link` boolean
          - `custom_domain` boolean
        - `integrations` object
          - `available_for_use` integer
        - `team` object
          - `size` integer
        - `updates` object
          - `custom_domain` boolean
          - `max_recipients` integer
      - `plan_name` string
      - `reference` string — Can use a fake id really As this only matters if you turn on Stripe
      - `updated_at` string
    - `plan_id` string
    - `reference` string
    - `stripe_customer_id` string — Not required Dummy values work really if not using stripe
    - `subscription_id` string
    - `timezone` string
    - `updated_at` string
    - `website` string
    - `workspace_name` string

## Other responses

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

---

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