---
title: "Create workspaces"
method: POST
path: "/merchant/workspaces/bulk-create"
tags: ["Workspaces"]
---

# Create workspaces

`POST /merchant/workspaces/bulk-create`

Create workspaces in bulk.

## Headers

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

## Request body

- object
  - `names` string[], required — Unique name of the Workspaces.
  - `renameDefault` boolean — If the default workspace should be renamed with first entry.

## Response `201`

Success.

- object
  - `createdWorkspaces` object[]
    - `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.
  - `failedWorkspaces` object[]
    - `name` string, required — Name of the workspace.
    - `errorMessage` string, required — Error due to which workspace creation 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)
