> ## 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.

# Unmanaged Access Codes Events

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

## `access_code.unmanaged.converted_to_managed`

An [unmanaged access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) was converted successfully to a managed access code.

```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.unmanaged.converted_to_managed",
  "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.unmanaged.converted_to_managed`
  </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.unmanaged.failed_to_convert_to_managed`

An [unmanaged access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) failed to be converted to a managed access code.

```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.unmanaged.failed_to_convert_to_managed",
  "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.unmanaged.failed_to_convert_to_managed`
  </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.unmanaged.created`

An [unmanaged access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) was created on 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.unmanaged.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.unmanaged.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.unmanaged.removed`

An [unmanaged access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes/migrating-existing-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.unmanaged.removed",
  "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.unmanaged.removed`
  </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>
