> ## Documentation Index
> Fetch the complete documentation index at: https://docs.apps.filed.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create workspace

> Create a new workspace for a tax firm customer

Each workspace represents one tax firm. Create a separate workspace for each tax firm customer you onboard.

```graphql theme={null}
mutation CreateWorkspace($input: CreateWorkspaceInput!) {
  createWorkspace(input: $input) {
    id
    slug
    displayName
    status
    workspaceType
  }
}
```

## Arguments

<ParamField path="input" type="CreateWorkspaceInput!" required>
  Input object for creating a workspace.

  <Expandable title="CreateWorkspaceInput">
    <ParamField path="input.displayName" type="String!" required>
      Tax firm's display name.
    </ParamField>

    <ParamField path="input.metadata" type="JSON">
      Additional metadata (e.g., customer ID, partner info).
    </ParamField>

    <ParamField path="input.firmSize" type="String">
      Tax firm size classification. Valid values: "xs", "sm", "md", "lg", "xl".
    </ParamField>
  </Expandable>
</ParamField>

## Returns

<ResponseField name="id" type="ID!">
  Workspace identifier. Save this for adding users and other operations.
</ResponseField>

<ResponseField name="slug" type="String!">
  URL-friendly workspace identifier. Essential for creating reliable deep links that route customers to the correct workspace.
</ResponseField>

<ResponseField name="displayName" type="String!">
  Workspace display name.
</ResponseField>

<ResponseField name="status" type="String!">
  Workspace status (e.g., "active").
</ResponseField>

<ResponseField name="workspaceType" type="WorkspaceType!">
  Type of workspace. Will be automatically set to "partner" for partner accounts.
</ResponseField>

## Example

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST https://gateway.filed.com/graphql \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer <accessToken>" \
    -H "source-platform: my-sample-platform" \
    -d '{
      "query": "mutation CreateWorkspace($input: CreateWorkspaceInput!) { createWorkspace(input: $input) { id slug displayName status workspaceType } }",
      "variables": {
        "input": {
          "displayName": "Smith & Associates Tax Firm",
          "metadata": {
            "customerId": "customer-123",
            "partnerId": "acme-partner-001",
            "integrationVersion": "1.0"
          },
          "firmSize": "md"
        }
      }
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json theme={null}
  {
    "data": {
      "createWorkspace": {
        "id": "workspace_123456",
        "slug": "smith-associates-tax-firm",
        "displayName": "Smith & Associates Tax Firm",
        "status": "active",
        "workspaceType": "partner"
      }
    }
  }
  ```
</ResponseExample>

<Note>
  Create one workspace per tax firm customer. If you manage 10 tax firms, create 10 workspaces. Save both the `workspaceId` and `slug` for each workspace - you'll need the workspace ID for adding users and the slug for generating deep links.
</Note>

## Troubleshooting

**Problem**: `createWorkspace` fails

**Solutions**:

* Verify your access token is valid and not expired
* Check that `displayName` is provided and not empty
* Ensure you have permission to create workspaces
