# Spaces

{% hint style="info" %}
**Early Access Preview.** The spaces API is currently in Alpha. We're actively developing it and seeking early feedback at <support@seam.co>. Expect breaking changes as we refine the design.
{% endhint %}

## The space Object

* [Properties](#properties)
* [Events](#events)
* [Endpoints](#endpoints)

Represents a space that is a logical grouping of devices and entrances. You can assign access to an entire space, thereby making granting access more efficient.

{% tabs %}
{% tab title="Space" %}
A space resource.

```json
{
  "created_at": "2025-06-16T16:54:17.946600Z",
  "display_name": "My Space",
  "name": "My Space",
  "space_id": "5afeb047-3277-4102-b8c4-99edf05b91d2",
  "workspace_id": "96bd12f9-6def-4bf4-b517-760417451ae9"
}
```

{% endtab %}
{% endtabs %}

***

## Properties

**`acs_entrance_count`** *Number*

Number of entrances in the space.

***

**`created_at`** *Datetime*

Date and time at which the space was created.

***

**`device_count`** *Number*

Number of devices in the space.

***

**`display_name`** *String*

Display name for the space.

***

**`name`** *String*

Name of the space.

***

**`space_id`** *UUID*

ID of the space.

***

**`space_key`** *String*

Unique key for the space within the workspace.

***

**`workspace_id`** *UUID*

ID of the [workspace](https://docs.seam.co/latest/~/revisions/WnT0iExlRmVG3JXMNm4C/core-concepts/workspaces) associated with the space.

***

## Events

**`space.device_membership_changed`**

A device was added or removed from a space.

<details>

<summary>Properties</summary>

**`acs_entrance_ids`** *List* *of UUIDs*

IDs of all ACS entrances currently attached to the space.

**`created_at`** *Datetime*

Date and time at which the event was created.

**`device_ids`** *List* *of UUIDs*

IDs of all devices currently attached to the space.

**`event_id`** *UUID*

ID of the event.

**`event_type`** *Enum*

Type of the event.

Value: `space.device_membership_changed`

**`occurred_at`** *Datetime*

Date and time at which the event occurred.

**`space_id`** *UUID*

ID of the affected space.

**`space_key`** *String*

Unique key for the space within the workspace.

**`workspace_id`** *UUID*

ID of the [workspace](https://docs.seam.co/latest/~/revisions/WnT0iExlRmVG3JXMNm4C/core-concepts/workspaces) associated with the event.

</details>

***

## Endpoints

[**`/spaces/add_acs_entrances`**](https://docs.seam.co/latest/~/revisions/WnT0iExlRmVG3JXMNm4C/api/spaces/add_acs_entrances)

Adds [entrances](https://docs.seam.co/latest/~/revisions/WnT0iExlRmVG3JXMNm4C/capability-guides/access-systems/retrieving-entrance-details) to a specific space.

[**`/spaces/add_devices`**](https://docs.seam.co/latest/~/revisions/WnT0iExlRmVG3JXMNm4C/api/spaces/add_devices)

Adds devices to a specific space.

[**`/spaces/create`**](https://docs.seam.co/latest/~/revisions/WnT0iExlRmVG3JXMNm4C/api/spaces/create)

Creates a new space.

[**`/spaces/delete`**](https://docs.seam.co/latest/~/revisions/WnT0iExlRmVG3JXMNm4C/api/spaces/delete)

Deletes a space.

[**`/spaces/get`**](https://docs.seam.co/latest/~/revisions/WnT0iExlRmVG3JXMNm4C/api/spaces/get)

Gets a space.

[**`/spaces/get_related`**](https://docs.seam.co/latest/~/revisions/WnT0iExlRmVG3JXMNm4C/api/spaces/get_related)

Gets all related resources for one or more Spaces.

[**`/spaces/list`**](https://docs.seam.co/latest/~/revisions/WnT0iExlRmVG3JXMNm4C/api/spaces/list)

Returns a list of all spaces.

[**`/spaces/remove_acs_entrances`**](https://docs.seam.co/latest/~/revisions/WnT0iExlRmVG3JXMNm4C/api/spaces/remove_acs_entrances)

Removes [entrances](https://docs.seam.co/latest/~/revisions/WnT0iExlRmVG3JXMNm4C/capability-guides/access-systems/retrieving-entrance-details) from a specific space.

[**`/spaces/remove_devices`**](https://docs.seam.co/latest/~/revisions/WnT0iExlRmVG3JXMNm4C/api/spaces/remove_devices)

Removes devices from a specific space.

[**`/spaces/update`**](https://docs.seam.co/latest/~/revisions/WnT0iExlRmVG3JXMNm4C/api/spaces/update)

Updates an existing space.
