---
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_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)
