---
title: "Create Workspace"
method: POST
path: "/workspaces"
tags: ["workspaces"]
---

# Create Workspace

`POST /workspaces`

## Request

- Base URL: `https://platform.tracecat.com/api`
- URL: `https://platform.tracecat.com/api/workspaces`
- Auth: one of:
  - API key in cookie `fastapiusersauth`
  - HTTP bearer

Create a new workspace.

Authorization
-------------
- Admin: Can create a workspace for any user.

## Request body

- WorkspaceCreate
  - `name` string, required
  - `settings` WorkspaceSettingsUpdate
    - `git_provider` 'github' | 'gitlab' | 'bitbucket' | 'bitbucket_data_center': Version control host backing a workspace sync repository.
    - `git_repo_url` string, nullable
    - `workflow_unlimited_timeout_enabled` boolean, nullable: Allow workflows to run indefinitely without timeout constraints. When enabled, individual workflow timeout settings are ignored.
    - `workflow_default_timeout_seconds` integer, nullable: Default timeout in seconds for workflows in this workspace. Must be greater than or equal to 0.
    - `allowed_attachment_extensions` string[], nullable: Allowed file extensions for attachments (e.g., ['.pdf', '.docx']). Overrides global defaults.
    - `allowed_attachment_mime_types` string[], nullable: Allowed MIME types for attachments (e.g., ['application/pdf', 'image/jpeg']). Overrides global defaults.
    - `validate_attachment_magic_number` boolean, nullable: Whether to validate file content matches declared MIME type using magic number detection. Defaults to true for security.
  - `organization_id` string, uuid, nullable

## Response `201`

Successful Response

- WorkspaceReadMinimal
  - `id` string, uuid, required
  - `name` string, required

## Other responses

- `422`: Validation Error

---

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