---
title: "Create a space to scan through the API"
method: POST
path: "/spaces"
---

# Create a space to scan through the API

`POST /spaces`

## Request

- Base URL: `https://api.spacecontext.app/v1`
- URL: `https://api.spacecontext.app/v1/spaces`
- Auth: HTTP bearer

Creates a space in the key's mode (test or live). With an `external_id` already used in that mode, returns the existing space with 200 instead of creating another. An account creates at most 200 spaces a day in each mode (by default, test keys included; a replay does not count): past that, 429 `RATE_LIMIT_EXCEEDED` with `Retry-After` (seconds to midnight UTC). Needs `spaces:read` and `scans:write`.

## Request body

- SpaceCreateRequest
  - `name` string, required
  - `description` string, nullable
  - `space_type` 'apartment' | 'house' | 'office' | 'warehouse' | 'vehicle' | 'boat' | 'camper' | 'shop' | 'garage' | 'appliance' | 'other' | 'null', nullable
  - `external_id` string, nullable

## Response `200`

The space with this external_id

- ApiSpace
  - `object` 'space', required
  - `id` string, required
  - `source` 'api', required
  - `livemode` boolean, required
  - `name` string, required
  - `description` string, nullable, required
  - `space_type` string, nullable, required
  - `external_id` string, nullable, required
  - `created_at` string, date-time, nullable, required
  - `updated_at` string, date-time, nullable, required

## Other responses

- `201`: Space created
- `400`: Error response
- `401`: Error response
- `403`: Error response
- `429`: Too many requests. Retry after the number of seconds in `Retry-After`.

---

[API](https://skmtc.dev/spacecontext/apis/space-context-api.md) · [All operations](https://skmtc.dev/spacecontext/apis/space-context-api/llms.txt) · [OpenAPI document](https://skmtc.dev/spacecontext/apis/space-context-api/revisions/1dca940259b4?raw)
