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

# Create Workspace

`POST /api/v2/workspaces`

#### Allowed For

* Admins

## Request body

- object
  - `workspace` WorkspaceInput
    - `conditions` ConditionsObject — An object that describes the conditions under which the automation will execute. See [Conditions reference](/documentation/ticketing/reference-guides/conditions-reference)
      - `all` ConditionObject[] — Logical AND. Tickets must fulfill all of the conditions to be considered matching
        - `field` string — The name of a ticket field
        - `operator` string — A comparison operator
        - `value` string — The value of a ticket field
      - `any` ConditionObject[] — Logical OR. Tickets may satisfy any of the conditions to be considered matching
        - `field` string — The name of a ticket field
        - `operator` string — A comparison operator
        - `value` string — The value of a ticket field
    - `description` string — User-defined description of this workspace's purpose
    - `macros` number[]
    - `ticket_form_id` number
    - `title` string — The title of the workspace

## Response `201`

Created workspace

- object
  - `workspace` WorkspaceObject
    - `activated` boolean — If true, this workspace is available for use
    - `apps` object[] — The apps associated to this workspace
    - `conditions` ConditionsObject — An object that describes the conditions under which the automation will execute. See [Conditions reference](/documentation/ticketing/reference-guides/conditions-reference)
      - `all` ConditionObject[] — Logical AND. Tickets must fulfill all of the conditions to be considered matching
        - `field` string — The name of a ticket field
        - `operator` string — A comparison operator
        - `value` string — The value of a ticket field
      - `any` ConditionObject[] — Logical OR. Tickets may satisfy any of the conditions to be considered matching
        - `field` string — The name of a ticket field
        - `operator` string — A comparison operator
        - `value` string — The value of a ticket field
    - `created_at` string, date-time — The time the workspace was created
    - `description` string — User-defined description of this workspace's purpose
    - `id` integer — Automatically assigned upon creation
    - `macro_ids` integer[] — The ids of the macros associated to this workspace
    - `macros` integer[] — The ids of the macros associated to this workspace
    - `position` integer — Ordering of the workspace relative to other workspaces
    - `prefer_workspace_app_order` boolean — If true, the order of apps within the workspace will be preserved
    - `selected_macros` MacroObject[] — An array of the macro objects that will be used in this workspace. See [Macros](/api-reference/ticketing/business-rules/macros/)
      - `actions` ActionObject[], required — Each action describes what the macro will do. See [Actions reference](/documentation/ticketing/reference-guides/actions-reference)
        - `field` string — The name of a ticket field to modify
        - `value` string — The new value of the field
      - `active` boolean — Useful for determining if the macro should be displayed
      - `created_at` string, date-time — The time the macro was created
      - `default` boolean — If true, the macro is a default macro
      - `description` string, nullable — The description of the macro
      - `id` integer — The id automatically assigned when a macro is created
      - `position` integer — The position of the macro
      - `restriction` object, nullable — Access to this macro. A null value allows unrestricted access for all users in the account
      - `title` string, required — The title of the macro
      - `updated_at` string, date-time — The time of the last update of the macro
      - `url` string — A URL to access the macro's details
      - `app_installation` string, nullable — The app installation that requires each macro, if present
      - `categories` string, nullable — The macro categories
      - `permissions` string, nullable — Permissions for each macro
      - `usage_1h` integer — The number of times each macro has been used in the past hour
      - `usage_7d` integer — The number of times each macro has been used in the past week
      - `usage_24h` integer — The number of times each macro has been used in the past day
      - `usage_30d` integer — The number of times each macro has been used in the past thirty days
    - `ticket_form_id` integer — The id of the ticket web form associated to this workspace
    - `title` string — The title of the workspace
    - `updated_at` string, date-time — The time of the last update of the workspace
    - `url` string — The URL for this resource

---

[API](https://skmtc.dev/botbrains-io/apis/support-api.md) · [All operations](https://skmtc.dev/botbrains-io/apis/support-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/botbrains-io/support-api/revisions/d53eac07ba68/schema)
