> ## Documentation Index
> Fetch the complete documentation index at: https://docs.seam.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Access Code Events

> Webhook events that Seam emits for the Access Code resource, with example payloads and properties.

## `access_code.created`

An [access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes) was created.

```json Example webhook payload theme={null}
{
  "access_code_id": "00000000-0000-0000-0000-000000000000",
  "connected_account_custom_metadata": {},
  "connected_account_id": "00000000-0000-0000-0000-000000000000",
  "created_at": "2025-01-01T00:00:00.000Z",
  "device_custom_metadata": {},
  "device_id": "00000000-0000-0000-0000-000000000000",
  "event_id": "00000000-0000-0000-0000-000000000000",
  "event_type": "access_code.created",
  "occurred_at": "2025-01-01T00:00:00.000Z",
  "workspace_id": "00000000-0000-0000-0000-000000000000"
}
```

<Accordion title="Properties">
  <ResponseField name="access_code_id" type="String (UUID)">
    ID of the affected access code.
  </ResponseField>

  <ResponseField name="connected_account_custom_metadata" type="Object">
    Custom metadata of the connected account, present when connected\_account\_id is provided.
  </ResponseField>

  <ResponseField name="connected_account_id" type="String (UUID)">
    ID of the connected account associated with the affected access code.
  </ResponseField>

  <ResponseField name="created_at" type="String (ISO 8601)">
    Date and time at which the event was created.
  </ResponseField>

  <ResponseField name="device_custom_metadata" type="Object">
    Custom metadata of the device, present when device\_id is provided.
  </ResponseField>

  <ResponseField name="device_id" type="String (UUID)">
    ID of the device associated with the affected access code.
  </ResponseField>

  <ResponseField name="event_id" type="String (UUID)">
    ID of the event.
  </ResponseField>

  <ResponseField name="event_type" type="Enum (String)">
    Value: `access_code.created`
  </ResponseField>

  <ResponseField name="occurred_at" type="String (ISO 8601)">
    Date and time at which the event occurred.
  </ResponseField>

  <ResponseField name="workspace_id" type="String (UUID)">
    ID of the workspace associated with the event.
  </ResponseField>
</Accordion>

## `access_code.changed`

An [access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes) was changed.

```json Example webhook payload theme={null}
{
  "access_code_id": "00000000-0000-0000-0000-000000000000",
  "change_reason": "",
  "changed_properties": [],
  "connected_account_custom_metadata": {},
  "connected_account_id": "00000000-0000-0000-0000-000000000000",
  "created_at": "2025-01-01T00:00:00.000Z",
  "device_custom_metadata": {},
  "device_id": "00000000-0000-0000-0000-000000000000",
  "event_id": "00000000-0000-0000-0000-000000000000",
  "event_type": "access_code.changed",
  "occurred_at": "2025-01-01T00:00:00.000Z",
  "workspace_id": "00000000-0000-0000-0000-000000000000"
}
```

<Accordion title="Properties">
  <ResponseField name="access_code_id" type="String (UUID)">
    ID of the affected access code.
  </ResponseField>

  <ResponseField name="change_reason" type="String">
    Human-readable reason for the change (e.g. `ongoing code auto-renewed`).
  </ResponseField>

  <ResponseField name="changed_properties" type="Array">
    List of properties that changed on the access code.
  </ResponseField>

  <ResponseField name="connected_account_custom_metadata" type="Object">
    Custom metadata of the connected account, present when connected\_account\_id is provided.
  </ResponseField>

  <ResponseField name="connected_account_id" type="String (UUID)">
    ID of the connected account associated with the affected access code.
  </ResponseField>

  <ResponseField name="created_at" type="String (ISO 8601)">
    Date and time at which the event was created.
  </ResponseField>

  <ResponseField name="device_custom_metadata" type="Object">
    Custom metadata of the device, present when device\_id is provided.
  </ResponseField>

  <ResponseField name="device_id" type="String (UUID)">
    ID of the device associated with the affected access code.
  </ResponseField>

  <ResponseField name="event_id" type="String (UUID)">
    ID of the event.
  </ResponseField>

  <ResponseField name="event_type" type="Enum (String)">
    Value: `access_code.changed`
  </ResponseField>

  <ResponseField name="occurred_at" type="String (ISO 8601)">
    Date and time at which the event occurred.
  </ResponseField>

  <ResponseField name="workspace_id" type="String (UUID)">
    ID of the workspace associated with the event.
  </ResponseField>
</Accordion>

## `access_code.name_changed`

The name of an [access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes) was changed on the device.

```json Example webhook payload theme={null}
{
  "access_code_id": "00000000-0000-0000-0000-000000000000",
  "connected_account_custom_metadata": {},
  "connected_account_id": "00000000-0000-0000-0000-000000000000",
  "created_at": "2025-01-01T00:00:00.000Z",
  "description": "",
  "device_custom_metadata": {},
  "device_id": "00000000-0000-0000-0000-000000000000",
  "event_id": "00000000-0000-0000-0000-000000000000",
  "event_type": "access_code.name_changed",
  "from": {
    "name": "My Access Code"
  },
  "occurred_at": "2025-01-01T00:00:00.000Z",
  "to": {
    "name": "My Access Code"
  },
  "workspace_id": "00000000-0000-0000-0000-000000000000"
}
```

<Accordion title="Properties">
  <ResponseField name="access_code_id" type="String (UUID)">
    ID of the affected access code.
  </ResponseField>

  <ResponseField name="connected_account_custom_metadata" type="Object">
    Custom metadata of the connected account, present when connected\_account\_id is provided.
  </ResponseField>

  <ResponseField name="connected_account_id" type="String (UUID)">
    ID of the connected account associated with the affected access code.
  </ResponseField>

  <ResponseField name="created_at" type="String (ISO 8601)">
    Date and time at which the event was created.
  </ResponseField>

  <ResponseField name="description" type="String">
    Human-readable description of the change and its source.
  </ResponseField>

  <ResponseField name="device_custom_metadata" type="Object">
    Custom metadata of the device, present when device\_id is provided.
  </ResponseField>

  <ResponseField name="device_id" type="String (UUID)">
    ID of the device associated with the affected access code.
  </ResponseField>

  <ResponseField name="event_id" type="String (UUID)">
    ID of the event.
  </ResponseField>

  <ResponseField name="event_type" type="Enum (String)">
    Value: `access_code.name_changed`
  </ResponseField>

  <ResponseField name="from" type="Object">
    Previous access code name configuration.

    <Expandable title="properties">
      <ResponseField name="name" type="String">
        Previous name of the access code.
      </ResponseField>
    </Expandable>
  </ResponseField>

  <ResponseField name="occurred_at" type="String (ISO 8601)">
    Date and time at which the event occurred.
  </ResponseField>

  <ResponseField name="to" type="Object">
    New access code name configuration.

    <Expandable title="properties">
      <ResponseField name="name" type="String">
        New name of the access code.
      </ResponseField>
    </Expandable>
  </ResponseField>

  <ResponseField name="workspace_id" type="String (UUID)">
    ID of the workspace associated with the event.
  </ResponseField>
</Accordion>

## `access_code.code_changed`

The pin code of an [access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes) was changed on the device.

```json Example webhook payload theme={null}
{
  "access_code_id": "00000000-0000-0000-0000-000000000000",
  "connected_account_custom_metadata": {},
  "connected_account_id": "00000000-0000-0000-0000-000000000000",
  "created_at": "2025-01-01T00:00:00.000Z",
  "description": "",
  "device_custom_metadata": {},
  "device_id": "00000000-0000-0000-0000-000000000000",
  "event_id": "00000000-0000-0000-0000-000000000000",
  "event_type": "access_code.code_changed",
  "from": {
    "code": "1234"
  },
  "occurred_at": "2025-01-01T00:00:00.000Z",
  "to": {
    "code": "1234"
  },
  "workspace_id": "00000000-0000-0000-0000-000000000000"
}
```

<Accordion title="Properties">
  <ResponseField name="access_code_id" type="String (UUID)">
    ID of the affected access code.
  </ResponseField>

  <ResponseField name="connected_account_custom_metadata" type="Object">
    Custom metadata of the connected account, present when connected\_account\_id is provided.
  </ResponseField>

  <ResponseField name="connected_account_id" type="String (UUID)">
    ID of the connected account associated with the affected access code.
  </ResponseField>

  <ResponseField name="created_at" type="String (ISO 8601)">
    Date and time at which the event was created.
  </ResponseField>

  <ResponseField name="description" type="String">
    Human-readable description of the change and its source.
  </ResponseField>

  <ResponseField name="device_custom_metadata" type="Object">
    Custom metadata of the device, present when device\_id is provided.
  </ResponseField>

  <ResponseField name="device_id" type="String (UUID)">
    ID of the device associated with the affected access code.
  </ResponseField>

  <ResponseField name="event_id" type="String (UUID)">
    ID of the event.
  </ResponseField>

  <ResponseField name="event_type" type="Enum (String)">
    Value: `access_code.code_changed`
  </ResponseField>

  <ResponseField name="from" type="Object">
    Previous pin code configuration.

    <Expandable title="properties">
      <ResponseField name="code" type="String">
        Previous pin code.
      </ResponseField>
    </Expandable>
  </ResponseField>

  <ResponseField name="occurred_at" type="String (ISO 8601)">
    Date and time at which the event occurred.
  </ResponseField>

  <ResponseField name="to" type="Object">
    New pin code configuration.

    <Expandable title="properties">
      <ResponseField name="code" type="String">
        New pin code.
      </ResponseField>
    </Expandable>
  </ResponseField>

  <ResponseField name="workspace_id" type="String (UUID)">
    ID of the workspace associated with the event.
  </ResponseField>
</Accordion>

## `access_code.time_frame_changed`

The time frame of an [access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes) was changed on the device.

```json Example webhook payload theme={null}
{
  "access_code_id": "00000000-0000-0000-0000-000000000000",
  "connected_account_custom_metadata": {},
  "connected_account_id": "00000000-0000-0000-0000-000000000000",
  "created_at": "2025-01-01T00:00:00.000Z",
  "description": "",
  "device_custom_metadata": {},
  "device_id": "00000000-0000-0000-0000-000000000000",
  "event_id": "00000000-0000-0000-0000-000000000000",
  "event_type": "access_code.time_frame_changed",
  "from": {
    "ends_at": "2025-01-01T00:00:00.000Z",
    "starts_at": "2025-01-01T00:00:00.000Z"
  },
  "occurred_at": "2025-01-01T00:00:00.000Z",
  "to": {
    "ends_at": "2025-01-01T00:00:00.000Z",
    "starts_at": "2025-01-01T00:00:00.000Z"
  },
  "workspace_id": "00000000-0000-0000-0000-000000000000"
}
```

<Accordion title="Properties">
  <ResponseField name="access_code_id" type="String (UUID)">
    ID of the affected access code.
  </ResponseField>

  <ResponseField name="connected_account_custom_metadata" type="Object">
    Custom metadata of the connected account, present when connected\_account\_id is provided.
  </ResponseField>

  <ResponseField name="connected_account_id" type="String (UUID)">
    ID of the connected account associated with the affected access code.
  </ResponseField>

  <ResponseField name="created_at" type="String (ISO 8601)">
    Date and time at which the event was created.
  </ResponseField>

  <ResponseField name="description" type="String">
    Human-readable description of the change and its source.
  </ResponseField>

  <ResponseField name="device_custom_metadata" type="Object">
    Custom metadata of the device, present when device\_id is provided.
  </ResponseField>

  <ResponseField name="device_id" type="String (UUID)">
    ID of the device associated with the affected access code.
  </ResponseField>

  <ResponseField name="event_id" type="String (UUID)">
    ID of the event.
  </ResponseField>

  <ResponseField name="event_type" type="Enum (String)">
    Value: `access_code.time_frame_changed`
  </ResponseField>

  <ResponseField name="from" type="Object">
    Previous time frame configuration.

    <Expandable title="properties">
      <ResponseField name="ends_at" type="String">
        Previous end time.
      </ResponseField>

      <ResponseField name="starts_at" type="String">
        Previous start time.
      </ResponseField>
    </Expandable>
  </ResponseField>

  <ResponseField name="occurred_at" type="String (ISO 8601)">
    Date and time at which the event occurred.
  </ResponseField>

  <ResponseField name="to" type="Object">
    New time frame configuration.

    <Expandable title="properties">
      <ResponseField name="ends_at" type="String">
        New end time.
      </ResponseField>

      <ResponseField name="starts_at" type="String">
        New start time.
      </ResponseField>
    </Expandable>
  </ResponseField>

  <ResponseField name="workspace_id" type="String (UUID)">
    ID of the workspace associated with the event.
  </ResponseField>
</Accordion>

## `access_code.scheduled_on_device`

An [access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes) was [scheduled natively](https://docs.seam.co/low-level-apis/smart-locks/access-codes#native-scheduling) on a device.

```json Example webhook payload theme={null}
{
  "access_code_id": "00000000-0000-0000-0000-000000000000",
  "code": "1234",
  "connected_account_custom_metadata": {},
  "connected_account_id": "00000000-0000-0000-0000-000000000000",
  "created_at": "2025-01-01T00:00:00.000Z",
  "device_custom_metadata": {},
  "device_id": "00000000-0000-0000-0000-000000000000",
  "event_id": "00000000-0000-0000-0000-000000000000",
  "event_type": "access_code.scheduled_on_device",
  "occurred_at": "2025-01-01T00:00:00.000Z",
  "workspace_id": "00000000-0000-0000-0000-000000000000"
}
```

<Accordion title="Properties">
  <ResponseField name="access_code_id" type="String (UUID)">
    ID of the affected access code.
  </ResponseField>

  <ResponseField name="code" type="String">
    Code for the affected access code.
  </ResponseField>

  <ResponseField name="connected_account_custom_metadata" type="Object">
    Custom metadata of the connected account, present when connected\_account\_id is provided.
  </ResponseField>

  <ResponseField name="connected_account_id" type="String (UUID)">
    ID of the connected account associated with the affected access code.
  </ResponseField>

  <ResponseField name="created_at" type="String (ISO 8601)">
    Date and time at which the event was created.
  </ResponseField>

  <ResponseField name="device_custom_metadata" type="Object">
    Custom metadata of the device, present when device\_id is provided.
  </ResponseField>

  <ResponseField name="device_id" type="String (UUID)">
    ID of the device associated with the affected access code.
  </ResponseField>

  <ResponseField name="event_id" type="String (UUID)">
    ID of the event.
  </ResponseField>

  <ResponseField name="event_type" type="Enum (String)">
    Value: `access_code.scheduled_on_device`
  </ResponseField>

  <ResponseField name="occurred_at" type="String (ISO 8601)">
    Date and time at which the event occurred.
  </ResponseField>

  <ResponseField name="workspace_id" type="String (UUID)">
    ID of the workspace associated with the event.
  </ResponseField>
</Accordion>

## `access_code.set_on_device`

An [access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes) was set on a device.

```json Example webhook payload theme={null}
{
  "access_code_id": "00000000-0000-0000-0000-000000000000",
  "code": "1234",
  "connected_account_custom_metadata": {},
  "connected_account_id": "00000000-0000-0000-0000-000000000000",
  "created_at": "2025-01-01T00:00:00.000Z",
  "device_custom_metadata": {},
  "device_id": "00000000-0000-0000-0000-000000000000",
  "event_id": "00000000-0000-0000-0000-000000000000",
  "event_type": "access_code.set_on_device",
  "occurred_at": "2025-01-01T00:00:00.000Z",
  "workspace_id": "00000000-0000-0000-0000-000000000000"
}
```

<Accordion title="Properties">
  <ResponseField name="access_code_id" type="String (UUID)">
    ID of the affected access code.
  </ResponseField>

  <ResponseField name="code" type="String">
    Code for the affected access code.
  </ResponseField>

  <ResponseField name="connected_account_custom_metadata" type="Object">
    Custom metadata of the connected account, present when connected\_account\_id is provided.
  </ResponseField>

  <ResponseField name="connected_account_id" type="String (UUID)">
    ID of the connected account associated with the affected access code.
  </ResponseField>

  <ResponseField name="created_at" type="String (ISO 8601)">
    Date and time at which the event was created.
  </ResponseField>

  <ResponseField name="device_custom_metadata" type="Object">
    Custom metadata of the device, present when device\_id is provided.
  </ResponseField>

  <ResponseField name="device_id" type="String (UUID)">
    ID of the device associated with the affected access code.
  </ResponseField>

  <ResponseField name="event_id" type="String (UUID)">
    ID of the event.
  </ResponseField>

  <ResponseField name="event_type" type="Enum (String)">
    Value: `access_code.set_on_device`
  </ResponseField>

  <ResponseField name="occurred_at" type="String (ISO 8601)">
    Date and time at which the event occurred.
  </ResponseField>

  <ResponseField name="workspace_id" type="String (UUID)">
    ID of the workspace associated with the event.
  </ResponseField>
</Accordion>

## `access_code.removed_from_device`

An [access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes) was removed from a device.

```json Example webhook payload theme={null}
{
  "access_code_id": "00000000-0000-0000-0000-000000000000",
  "connected_account_custom_metadata": {},
  "connected_account_id": "00000000-0000-0000-0000-000000000000",
  "created_at": "2025-01-01T00:00:00.000Z",
  "device_custom_metadata": {},
  "device_id": "00000000-0000-0000-0000-000000000000",
  "event_id": "00000000-0000-0000-0000-000000000000",
  "event_type": "access_code.removed_from_device",
  "occurred_at": "2025-01-01T00:00:00.000Z",
  "workspace_id": "00000000-0000-0000-0000-000000000000"
}
```

<Accordion title="Properties">
  <ResponseField name="access_code_id" type="String (UUID)">
    ID of the affected access code.
  </ResponseField>

  <ResponseField name="connected_account_custom_metadata" type="Object">
    Custom metadata of the connected account, present when connected\_account\_id is provided.
  </ResponseField>

  <ResponseField name="connected_account_id" type="String (UUID)">
    ID of the connected account associated with the affected access code.
  </ResponseField>

  <ResponseField name="created_at" type="String (ISO 8601)">
    Date and time at which the event was created.
  </ResponseField>

  <ResponseField name="device_custom_metadata" type="Object">
    Custom metadata of the device, present when device\_id is provided.
  </ResponseField>

  <ResponseField name="device_id" type="String (UUID)">
    ID of the device associated with the affected access code.
  </ResponseField>

  <ResponseField name="event_id" type="String (UUID)">
    ID of the event.
  </ResponseField>

  <ResponseField name="event_type" type="Enum (String)">
    Value: `access_code.removed_from_device`
  </ResponseField>

  <ResponseField name="occurred_at" type="String (ISO 8601)">
    Date and time at which the event occurred.
  </ResponseField>

  <ResponseField name="workspace_id" type="String (UUID)">
    ID of the workspace associated with the event.
  </ResponseField>
</Accordion>

## `access_code.delay_in_setting_on_device`

There was an unusually long delay in setting an [access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes) on a device.

```json Example webhook payload theme={null}
{
  "access_code_errors": [],
  "access_code_id": "00000000-0000-0000-0000-000000000000",
  "access_code_warnings": [],
  "connected_account_custom_metadata": {},
  "connected_account_errors": [],
  "connected_account_id": "00000000-0000-0000-0000-000000000000",
  "connected_account_warnings": [],
  "created_at": "2025-01-01T00:00:00.000Z",
  "device_custom_metadata": {},
  "device_errors": [],
  "device_id": "00000000-0000-0000-0000-000000000000",
  "device_warnings": [],
  "event_id": "00000000-0000-0000-0000-000000000000",
  "event_type": "access_code.delay_in_setting_on_device",
  "occurred_at": "2025-01-01T00:00:00.000Z",
  "workspace_id": "00000000-0000-0000-0000-000000000000"
}
```

<Accordion title="Properties">
  <ResponseField name="access_code_errors" type="Array">
    Errors associated with the access code.
  </ResponseField>

  <ResponseField name="access_code_id" type="String (UUID)">
    ID of the affected access code.
  </ResponseField>

  <ResponseField name="access_code_warnings" type="Array">
    Warnings associated with the access code.
  </ResponseField>

  <ResponseField name="connected_account_custom_metadata" type="Object">
    Custom metadata of the connected account, present when connected\_account\_id is provided.
  </ResponseField>

  <ResponseField name="connected_account_errors" type="Array">
    Errors associated with the connected account.
  </ResponseField>

  <ResponseField name="connected_account_id" type="String (UUID)">
    ID of the connected account associated with the affected access code.
  </ResponseField>

  <ResponseField name="connected_account_warnings" type="Array">
    Warnings associated with the connected account.
  </ResponseField>

  <ResponseField name="created_at" type="String (ISO 8601)">
    Date and time at which the event was created.
  </ResponseField>

  <ResponseField name="device_custom_metadata" type="Object">
    Custom metadata of the device, present when device\_id is provided.
  </ResponseField>

  <ResponseField name="device_errors" type="Array">
    Errors associated with the device.
  </ResponseField>

  <ResponseField name="device_id" type="String (UUID)">
    ID of the device associated with the affected access code.
  </ResponseField>

  <ResponseField name="device_warnings" type="Array">
    Warnings associated with the device.
  </ResponseField>

  <ResponseField name="event_id" type="String (UUID)">
    ID of the event.
  </ResponseField>

  <ResponseField name="event_type" type="Enum (String)">
    Value: `access_code.delay_in_setting_on_device`
  </ResponseField>

  <ResponseField name="occurred_at" type="String (ISO 8601)">
    Date and time at which the event occurred.
  </ResponseField>

  <ResponseField name="workspace_id" type="String (UUID)">
    ID of the workspace associated with the event.
  </ResponseField>
</Accordion>

## `access_code.failed_to_set_on_device`

An [access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes) failed to be set on a device.

```json Example webhook payload theme={null}
{
  "access_code_errors": [],
  "access_code_id": "00000000-0000-0000-0000-000000000000",
  "access_code_warnings": [],
  "connected_account_custom_metadata": {},
  "connected_account_errors": [],
  "connected_account_id": "00000000-0000-0000-0000-000000000000",
  "connected_account_warnings": [],
  "created_at": "2025-01-01T00:00:00.000Z",
  "device_custom_metadata": {},
  "device_errors": [],
  "device_id": "00000000-0000-0000-0000-000000000000",
  "device_warnings": [],
  "event_id": "00000000-0000-0000-0000-000000000000",
  "event_type": "access_code.failed_to_set_on_device",
  "occurred_at": "2025-01-01T00:00:00.000Z",
  "workspace_id": "00000000-0000-0000-0000-000000000000"
}
```

<Accordion title="Properties">
  <ResponseField name="access_code_errors" type="Array">
    Errors associated with the access code.
  </ResponseField>

  <ResponseField name="access_code_id" type="String (UUID)">
    ID of the affected access code.
  </ResponseField>

  <ResponseField name="access_code_warnings" type="Array">
    Warnings associated with the access code.
  </ResponseField>

  <ResponseField name="connected_account_custom_metadata" type="Object">
    Custom metadata of the connected account, present when connected\_account\_id is provided.
  </ResponseField>

  <ResponseField name="connected_account_errors" type="Array">
    Errors associated with the connected account.
  </ResponseField>

  <ResponseField name="connected_account_id" type="String (UUID)">
    ID of the connected account associated with the affected access code.
  </ResponseField>

  <ResponseField name="connected_account_warnings" type="Array">
    Warnings associated with the connected account.
  </ResponseField>

  <ResponseField name="created_at" type="String (ISO 8601)">
    Date and time at which the event was created.
  </ResponseField>

  <ResponseField name="device_custom_metadata" type="Object">
    Custom metadata of the device, present when device\_id is provided.
  </ResponseField>

  <ResponseField name="device_errors" type="Array">
    Errors associated with the device.
  </ResponseField>

  <ResponseField name="device_id" type="String (UUID)">
    ID of the device associated with the affected access code.
  </ResponseField>

  <ResponseField name="device_warnings" type="Array">
    Warnings associated with the device.
  </ResponseField>

  <ResponseField name="event_id" type="String (UUID)">
    ID of the event.
  </ResponseField>

  <ResponseField name="event_type" type="Enum (String)">
    Value: `access_code.failed_to_set_on_device`
  </ResponseField>

  <ResponseField name="occurred_at" type="String (ISO 8601)">
    Date and time at which the event occurred.
  </ResponseField>

  <ResponseField name="workspace_id" type="String (UUID)">
    ID of the workspace associated with the event.
  </ResponseField>
</Accordion>

## `access_code.deleted`

An [access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes) was deleted.

```json Example webhook payload theme={null}
{
  "access_code_id": "00000000-0000-0000-0000-000000000000",
  "code": "1234",
  "connected_account_custom_metadata": {},
  "connected_account_id": "00000000-0000-0000-0000-000000000000",
  "created_at": "2025-01-01T00:00:00.000Z",
  "device_custom_metadata": {},
  "device_id": "00000000-0000-0000-0000-000000000000",
  "event_id": "00000000-0000-0000-0000-000000000000",
  "event_type": "access_code.deleted",
  "occurred_at": "2025-01-01T00:00:00.000Z",
  "workspace_id": "00000000-0000-0000-0000-000000000000"
}
```

<Accordion title="Properties">
  <ResponseField name="access_code_id" type="String (UUID)">
    ID of the affected access code.
  </ResponseField>

  <ResponseField name="code" type="String">
    Code for the affected access code.
  </ResponseField>

  <ResponseField name="connected_account_custom_metadata" type="Object">
    Custom metadata of the connected account, present when connected\_account\_id is provided.
  </ResponseField>

  <ResponseField name="connected_account_id" type="String (UUID)">
    ID of the connected account associated with the affected access code.
  </ResponseField>

  <ResponseField name="created_at" type="String (ISO 8601)">
    Date and time at which the event was created.
  </ResponseField>

  <ResponseField name="device_custom_metadata" type="Object">
    Custom metadata of the device, present when device\_id is provided.
  </ResponseField>

  <ResponseField name="device_id" type="String (UUID)">
    ID of the device associated with the affected access code.
  </ResponseField>

  <ResponseField name="event_id" type="String (UUID)">
    ID of the event.
  </ResponseField>

  <ResponseField name="event_type" type="Enum (String)">
    Value: `access_code.deleted`
  </ResponseField>

  <ResponseField name="occurred_at" type="String (ISO 8601)">
    Date and time at which the event occurred.
  </ResponseField>

  <ResponseField name="workspace_id" type="String (UUID)">
    ID of the workspace associated with the event.
  </ResponseField>
</Accordion>

## `access_code.delay_in_removing_from_device`

There was an unusually long delay in removing an [access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes) from a device.

```json Example webhook payload theme={null}
{
  "access_code_errors": [],
  "access_code_id": "00000000-0000-0000-0000-000000000000",
  "access_code_warnings": [],
  "connected_account_custom_metadata": {},
  "connected_account_errors": [],
  "connected_account_id": "00000000-0000-0000-0000-000000000000",
  "connected_account_warnings": [],
  "created_at": "2025-01-01T00:00:00.000Z",
  "device_custom_metadata": {},
  "device_errors": [],
  "device_id": "00000000-0000-0000-0000-000000000000",
  "device_warnings": [],
  "event_id": "00000000-0000-0000-0000-000000000000",
  "event_type": "access_code.delay_in_removing_from_device",
  "occurred_at": "2025-01-01T00:00:00.000Z",
  "workspace_id": "00000000-0000-0000-0000-000000000000"
}
```

<Accordion title="Properties">
  <ResponseField name="access_code_errors" type="Array">
    Errors associated with the access code.
  </ResponseField>

  <ResponseField name="access_code_id" type="String (UUID)">
    ID of the affected access code.
  </ResponseField>

  <ResponseField name="access_code_warnings" type="Array">
    Warnings associated with the access code.
  </ResponseField>

  <ResponseField name="connected_account_custom_metadata" type="Object">
    Custom metadata of the connected account, present when connected\_account\_id is provided.
  </ResponseField>

  <ResponseField name="connected_account_errors" type="Array">
    Errors associated with the connected account.
  </ResponseField>

  <ResponseField name="connected_account_id" type="String (UUID)">
    ID of the connected account associated with the affected access code.
  </ResponseField>

  <ResponseField name="connected_account_warnings" type="Array">
    Warnings associated with the connected account.
  </ResponseField>

  <ResponseField name="created_at" type="String (ISO 8601)">
    Date and time at which the event was created.
  </ResponseField>

  <ResponseField name="device_custom_metadata" type="Object">
    Custom metadata of the device, present when device\_id is provided.
  </ResponseField>

  <ResponseField name="device_errors" type="Array">
    Errors associated with the device.
  </ResponseField>

  <ResponseField name="device_id" type="String (UUID)">
    ID of the device associated with the affected access code.
  </ResponseField>

  <ResponseField name="device_warnings" type="Array">
    Warnings associated with the device.
  </ResponseField>

  <ResponseField name="event_id" type="String (UUID)">
    ID of the event.
  </ResponseField>

  <ResponseField name="event_type" type="Enum (String)">
    Value: `access_code.delay_in_removing_from_device`
  </ResponseField>

  <ResponseField name="occurred_at" type="String (ISO 8601)">
    Date and time at which the event occurred.
  </ResponseField>

  <ResponseField name="workspace_id" type="String (UUID)">
    ID of the workspace associated with the event.
  </ResponseField>
</Accordion>

## `access_code.failed_to_remove_from_device`

An [access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes) failed to be removed from a device.

```json Example webhook payload theme={null}
{
  "access_code_errors": [],
  "access_code_id": "00000000-0000-0000-0000-000000000000",
  "access_code_warnings": [],
  "connected_account_custom_metadata": {},
  "connected_account_errors": [],
  "connected_account_id": "00000000-0000-0000-0000-000000000000",
  "connected_account_warnings": [],
  "created_at": "2025-01-01T00:00:00.000Z",
  "device_custom_metadata": {},
  "device_errors": [],
  "device_id": "00000000-0000-0000-0000-000000000000",
  "device_warnings": [],
  "event_id": "00000000-0000-0000-0000-000000000000",
  "event_type": "access_code.failed_to_remove_from_device",
  "occurred_at": "2025-01-01T00:00:00.000Z",
  "workspace_id": "00000000-0000-0000-0000-000000000000"
}
```

<Accordion title="Properties">
  <ResponseField name="access_code_errors" type="Array">
    Errors associated with the access code.
  </ResponseField>

  <ResponseField name="access_code_id" type="String (UUID)">
    ID of the affected access code.
  </ResponseField>

  <ResponseField name="access_code_warnings" type="Array">
    Warnings associated with the access code.
  </ResponseField>

  <ResponseField name="connected_account_custom_metadata" type="Object">
    Custom metadata of the connected account, present when connected\_account\_id is provided.
  </ResponseField>

  <ResponseField name="connected_account_errors" type="Array">
    Errors associated with the connected account.
  </ResponseField>

  <ResponseField name="connected_account_id" type="String (UUID)">
    ID of the connected account associated with the affected access code.
  </ResponseField>

  <ResponseField name="connected_account_warnings" type="Array">
    Warnings associated with the connected account.
  </ResponseField>

  <ResponseField name="created_at" type="String (ISO 8601)">
    Date and time at which the event was created.
  </ResponseField>

  <ResponseField name="device_custom_metadata" type="Object">
    Custom metadata of the device, present when device\_id is provided.
  </ResponseField>

  <ResponseField name="device_errors" type="Array">
    Errors associated with the device.
  </ResponseField>

  <ResponseField name="device_id" type="String (UUID)">
    ID of the device associated with the affected access code.
  </ResponseField>

  <ResponseField name="device_warnings" type="Array">
    Warnings associated with the device.
  </ResponseField>

  <ResponseField name="event_id" type="String (UUID)">
    ID of the event.
  </ResponseField>

  <ResponseField name="event_type" type="Enum (String)">
    Value: `access_code.failed_to_remove_from_device`
  </ResponseField>

  <ResponseField name="occurred_at" type="String (ISO 8601)">
    Date and time at which the event occurred.
  </ResponseField>

  <ResponseField name="workspace_id" type="String (UUID)">
    ID of the workspace associated with the event.
  </ResponseField>
</Accordion>

## `access_code.modified_external_to_seam`

An [access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes) was modified outside of Seam.

```json Example webhook payload theme={null}
{
  "access_code_id": "00000000-0000-0000-0000-000000000000",
  "connected_account_custom_metadata": {},
  "connected_account_id": "00000000-0000-0000-0000-000000000000",
  "created_at": "2025-01-01T00:00:00.000Z",
  "device_custom_metadata": {},
  "device_id": "00000000-0000-0000-0000-000000000000",
  "event_id": "00000000-0000-0000-0000-000000000000",
  "event_type": "access_code.modified_external_to_seam",
  "occurred_at": "2025-01-01T00:00:00.000Z",
  "workspace_id": "00000000-0000-0000-0000-000000000000"
}
```

<Accordion title="Properties">
  <ResponseField name="access_code_id" type="String (UUID)">
    ID of the affected access code.
  </ResponseField>

  <ResponseField name="connected_account_custom_metadata" type="Object">
    Custom metadata of the connected account, present when connected\_account\_id is provided.
  </ResponseField>

  <ResponseField name="connected_account_id" type="String (UUID)">
    ID of the connected account associated with the affected access code.
  </ResponseField>

  <ResponseField name="created_at" type="String (ISO 8601)">
    Date and time at which the event was created.
  </ResponseField>

  <ResponseField name="device_custom_metadata" type="Object">
    Custom metadata of the device, present when device\_id is provided.
  </ResponseField>

  <ResponseField name="device_id" type="String (UUID)">
    ID of the device associated with the affected access code.
  </ResponseField>

  <ResponseField name="event_id" type="String (UUID)">
    ID of the event.
  </ResponseField>

  <ResponseField name="event_type" type="Enum (String)">
    Value: `access_code.modified_external_to_seam`
  </ResponseField>

  <ResponseField name="occurred_at" type="String (ISO 8601)">
    Date and time at which the event occurred.
  </ResponseField>

  <ResponseField name="workspace_id" type="String (UUID)">
    ID of the workspace associated with the event.
  </ResponseField>
</Accordion>

## `access_code.deleted_external_to_seam`

An [access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes) was deleted outside of Seam.

```json Example webhook payload theme={null}
{
  "access_code_id": "00000000-0000-0000-0000-000000000000",
  "connected_account_custom_metadata": {},
  "connected_account_id": "00000000-0000-0000-0000-000000000000",
  "created_at": "2025-01-01T00:00:00.000Z",
  "device_custom_metadata": {},
  "device_id": "00000000-0000-0000-0000-000000000000",
  "event_id": "00000000-0000-0000-0000-000000000000",
  "event_type": "access_code.deleted_external_to_seam",
  "occurred_at": "2025-01-01T00:00:00.000Z",
  "workspace_id": "00000000-0000-0000-0000-000000000000"
}
```

<Accordion title="Properties">
  <ResponseField name="access_code_id" type="String (UUID)">
    ID of the affected access code.
  </ResponseField>

  <ResponseField name="connected_account_custom_metadata" type="Object">
    Custom metadata of the connected account, present when connected\_account\_id is provided.
  </ResponseField>

  <ResponseField name="connected_account_id" type="String (UUID)">
    ID of the connected account associated with the affected access code.
  </ResponseField>

  <ResponseField name="created_at" type="String (ISO 8601)">
    Date and time at which the event was created.
  </ResponseField>

  <ResponseField name="device_custom_metadata" type="Object">
    Custom metadata of the device, present when device\_id is provided.
  </ResponseField>

  <ResponseField name="device_id" type="String (UUID)">
    ID of the device associated with the affected access code.
  </ResponseField>

  <ResponseField name="event_id" type="String (UUID)">
    ID of the event.
  </ResponseField>

  <ResponseField name="event_type" type="Enum (String)">
    Value: `access_code.deleted_external_to_seam`
  </ResponseField>

  <ResponseField name="occurred_at" type="String (ISO 8601)">
    Date and time at which the event occurred.
  </ResponseField>

  <ResponseField name="workspace_id" type="String (UUID)">
    ID of the workspace associated with the event.
  </ResponseField>
</Accordion>

## `access_code.backup_access_code_pulled`

A [backup access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes/backup-access-codes) was pulled from the backup access code pool and set on a device.

```json Example webhook payload theme={null}
{
  "access_code_id": "00000000-0000-0000-0000-000000000000",
  "backup_access_code_id": "",
  "connected_account_custom_metadata": {},
  "connected_account_id": "00000000-0000-0000-0000-000000000000",
  "created_at": "2025-01-01T00:00:00.000Z",
  "device_custom_metadata": {},
  "device_id": "00000000-0000-0000-0000-000000000000",
  "event_id": "00000000-0000-0000-0000-000000000000",
  "event_type": "access_code.backup_access_code_pulled",
  "occurred_at": "2025-01-01T00:00:00.000Z",
  "workspace_id": "00000000-0000-0000-0000-000000000000"
}
```

<Accordion title="Properties">
  <ResponseField name="access_code_id" type="String (UUID)">
    ID of the affected access code.
  </ResponseField>

  <ResponseField name="backup_access_code_id" type="String">
    ID of the backup access code that was pulled from the pool.
  </ResponseField>

  <ResponseField name="connected_account_custom_metadata" type="Object">
    Custom metadata of the connected account, present when connected\_account\_id is provided.
  </ResponseField>

  <ResponseField name="connected_account_id" type="String (UUID)">
    ID of the connected account associated with the affected access code.
  </ResponseField>

  <ResponseField name="created_at" type="String (ISO 8601)">
    Date and time at which the event was created.
  </ResponseField>

  <ResponseField name="device_custom_metadata" type="Object">
    Custom metadata of the device, present when device\_id is provided.
  </ResponseField>

  <ResponseField name="device_id" type="String (UUID)">
    ID of the device associated with the affected access code.
  </ResponseField>

  <ResponseField name="event_id" type="String (UUID)">
    ID of the event.
  </ResponseField>

  <ResponseField name="event_type" type="Enum (String)">
    Value: `access_code.backup_access_code_pulled`
  </ResponseField>

  <ResponseField name="occurred_at" type="String (ISO 8601)">
    Date and time at which the event occurred.
  </ResponseField>

  <ResponseField name="workspace_id" type="String (UUID)">
    ID of the workspace associated with the event.
  </ResponseField>
</Accordion>
