---
search:
  tags:
    - Warehouses
    - POST
seo:
  description: >-
    Creates a new warehouse with the specified name, slug,… Reference for the
    POST /api/v1/{team_slug}/{app_slug}/warehouses endpoint in the Management
    API.
sidebar:
  label: Create a new warehouse
  badge: POST
title: Create a new warehouse
type: openapi-operation
---
Creates a new warehouse with the specified name, slug, address, and optional market associations. The warehouse can be marked as available online and linked to one or more markets.

`POST /api/v1/{team_slug}/{app_slug}/warehouses`

**Request body** (`application/json`, required)

Warehouse data

- `address` (internal_pkg_webserver_v1.InputWarehouseAddress, required)
- `available_online` (boolean)
- `markets` (string[])
- `name` (string, required)
- `slug` (string, required)

Request body example:

```json
{
  "address": {
    "city": "string",
    "country": "string",
    "postal_code": "string",
    "state": "string",
    "street_address": "string"
  },
  "available_online": true,
  "markets": [
    "string"
  ],
  "name": "string",
  "slug": "string"
}
```

**Responses**

- `200` — Warehouse created successfully
- `201` — Successful response
- `400` — Invalid request (e.g. bad UUID, validation error)
- `401` — Unauthorized access
- `500` — Internal server error

Response example, 200:

```json
{
  "data": {
    "address": {
      "city": "string",
      "country": "string",
      "postal_code": "string",
      "state": "string",
      "street_address": "string"
    },
    "app_id": "string",
    "available_online": true,
    "created_at": "string",
    "id": "string",
    "markets": [
      {
        "active": true,
        "country_codes": [
          "string"
        ],
        "created_at": "string",
        "currency_code": "string",
        "id": "string",
        "locale": "string",
        "name": "string",
        "slug": "string",
        "updated_at": "string"
      }
    ],
    "name": "string",
    "slug": "string",
    "updated_at": "string"
  },
  "details": [
    "string"
  ],
  "success": true
}
```
