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

# Create Workspace

`POST /workspaces`

## Request

- Base URL: `https://api.rebrandly.com/v1`
- URL: `https://api.rebrandly.com/v1/workspaces`
- Auth: API key in header `apikey`

Create a new workspace.

**Feature Flags:**
- `links.expiration`: Required if expiration.ttl provided
- `links.extended`: Required if type is "extended"

## Headers

- `apikey` string, required

## Request body

- object
  - `name` string, required: Workspace name
  - `type` 'classic' | 'extended' | 'gallery'
  - `notes` string: Workspace description
  - `avatarUrl` string, uri: Workspace avatar URL
  - `expiration` object
    - `ttl` integer: Link TTL in seconds

## Response `200`

Workspace created

- Workspace
  - `id` string, required: Workspace public ID
  - `name` string, required: Workspace name
  - `avatarUrl` string: Workspace avatar URL
  - `links` integer: Number of links in workspace
  - `teammates` integer: Number of teammates in workspace
  - `domains` integer: Number of domains in workspace
  - `owner` object
    - `id` string
    - `email` string
  - `createdAt` string, date-time, required
  - `updatedAt` string, date-time
  - `type` 'classic' | 'extended' | 'gallery', required
  - `default` boolean
  - `revoked` boolean
  - `role` 'owner' | 'admin' | 'user' | 'guest' | 'viewer'
  - `clicks` integer
  - `sessions` integer
  - `expiration` object
    - `ttl` integer
  - `conversionTracking` ConversionTrackingSettings
    - `enabled` boolean, required: Whether conversion tracking is enabled for this workspace
    - `attributionWindow` integer, nullable: Attribution window in days. `null` when conversion tracking is not configured or disabled. Defaults to 30 when enabled without specifying a value.
    - `apiKeyCreatedByOwner` boolean, nullable: Whether the workspace Owner has created a conversion tracking API key. API keys are account-level resources always created by the account they belong to, so existence implies the Owner created it. The key value itself is never exposed. On the dedicated `/workspaces/{workspace_id}/conversion-tracking` endpoint this is always a boolean (the endpoint is restricted to owner/admin). On the workspaces list (`include=conversionTracking`) it is a boolean for workspaces where the caller has the `owner` or `admin` role, and `null` for lower roles (the field is always present).

## Other responses

- `403`: Forbidden - Insufficient permissions

---

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