---
title: "POST /workspaces/switch/{reference}"
method: POST
path: "/workspaces/switch/{reference}"
tags: ["workspace"]
---

# POST /workspaces/switch/{reference}

`POST /workspaces/switch/{reference}`

Switch current workspace

## Path parameters

- `reference` string, required

## Response `200`

OK

- ServerFetchWorkspaceResponse
  - `message` string, required
  - `workspace` MalakWorkspace, required
    - `created_at` string
    - `id` string
    - `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

## Changes

- **2025-03-13** `b999c82d1a0c` — 1 info
  - added the optional property `workspace/plan/metadata/deck/analytics` to the response with the `200` status
- **2025-02-21** `b3fe6de151f8` — 1 info
  - added the optional property `workspace/plan/metadata/dashboard/max_charts_per_dashboard` to the response with the `200` status
- **2025-01-31** `d13e7d2c5467` — 1 info
  - endpoint added
- **2024-11-14** `9eeda9b06388` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/ayinke-llc/apis/malak-s-api-documentation/changes/workspaces/switch/:reference/post.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/d4c143ed44cd/schema)
