---
title: "Create a workspace"
method: POST
path: "/merchant/workspaces"
tags: ["Workspaces"]
---

# Create a workspace

`POST /merchant/workspaces`

Create a new workspace.

## Headers

- `x-idempotency-key` string, uuid, required

## Request body

- object
  - `name` string, required — Unique name of the Workspace.
  - `copyProviderConfig` object
    - `existingWorkspaceID` string, uuid, required — Workspace ID from which we want to copy.
  - `copyWorkflowConfig` object
    - `existingWorkspaceID` string, uuid, required — Workspace ID from which we want to copy.
  - `copyNotificationConfig` object
    - `existingWorkspaceID` string, uuid, required — Workspace ID from which we want to copy.
  - `copyUsers` object
    - `existingWorkspaceID` string, uuid, required — Workspace ID from which we want to copy.

## Response `201`

Success.

- object
  - `workspace` object, required
    - `id` string, uuid, required — Unique identifier of the Workspace.
    - `name` string, required — Unique name of the Workspace configuration.
    - `createdBy` string — Email address of the user that created the workspace.
    - `updatedBy` string — Email address of the user that updated the workspace.
    - `createdAt` string, date-time, required — Date of creation of the workspace configuration.
    - `updatedAt` string, date-time, required — Date of last update of the workspace configuration.
  - `copyRequestFailures` object[] — List of failures happened while copying items from existing workspace.
    - `existingWorkspaceID` string, uuid, required — Workspace ID from which we wanted to copy.
    - `failureMessage` string, required — Reason why that copy request failed.

## Other responses

- `400` — Bad Request.
- `401` — Unauthorized.
- `403` — Insufficient Scope.
- `404` — Not Found.

---

[API](https://skmtc.net/payrails/apis/payrails-api-reference.md) · [All operations](https://skmtc.net/payrails/apis/payrails-api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/payrails/payrails-api-reference/revisions/9dd2f0158582/schema)
