---
title: "Join a workspace with an invite code or email-domain policy"
method: POST
path: "/workspaces/{slug}/join"
---

# Join a workspace with an invite code or email-domain policy

`POST /workspaces/{slug}/join`

## Request

- Base URL: `https://superskill.sh/api`
- URL: `https://superskill.sh/api/workspaces/{slug}/join`
- Auth: HTTP bearer

Requires a signed-in user session. With code, validates the invite hash, expiry and use limit before writing membership. Without code, checks an active email_domain policy against the signed-in user's email.

## Path parameters

- `slug` string, required

## Request body

- object
  - `code` string

## Response `201`

Joined workspace member

- object
  - `workspace` Workspace
    - `slug` string, required
    - `name` string, required
    - `type` 'company' | 'community' | 'team' | 'course' | 'agency' | 'chat', required
    - `visibility` 'private' | 'invite_only' | 'gated' | 'public' | 'unlisted', required
    - `plan` 'free' | 'team' | 'enterprise', required
    - `description` string, nullable
    - `avatarUrl` string, nullable
  - `member` WorkspaceMember
    - `id` string
    - `workspace_id` string
    - `workspace_slug` string
    - `user_id` string, required
    - `role` 'owner' | 'admin' | 'moderator' | 'publisher' | 'member' | 'viewer', required
    - `status` 'invited' | 'active' | 'suspended' | 'removed', required
    - `source` 'direct' | 'invite' | 'email_domain' | 'telegram' | 'discord' | 'entitlement' | 'paid_entitlement' | 'token_bootstrap', required
    - `joined_at` string, required
    - `expires_at` string, nullable
    - `removed_at` string, nullable
  - `next` string

## Other responses

- `400`: Bad request
- `401`: Authorization required
- `403`: Authorization was provided but is not allowed for this action
- `404`: Resource not found

---

[API](https://skmtc.dev/superskill/apis/superskill-api.md) · [All operations](https://skmtc.dev/superskill/apis/superskill-api/llms.txt) · [OpenAPI document](https://skmtc.dev/superskill/apis/superskill-api/revisions/ced2d2d1f217?raw)
