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

# Update AutomationTile

> Update an existing AutomationTile record.

Updates an existing AutomationTile record. You must include the `Id` of the record to update along with all required fields.

## Authentication

<Note>
  This endpoint requires OAuth2 authentication. Include a valid bearer token in the `Authorization` header.
  The authenticated user must be a full unrestricted administrator or have the **`AutomationTile-Edit`** role.
</Note>

## Enums

<Accordion title="eAutomationTileAction — Action values">
  | Value | Name                  |
  | ----- | --------------------- |
  | 1     | None                  |
  | 2     | UnlockAct365Door      |
  | 3     | CheckIn               |
  | 4     | CheckOut              |
  | 5     | BookingCheckIn        |
  | 6     | EventCheckIn          |
  | 7     | ResourceCleaned       |
  | 8     | RequestUrl            |
  | 9     | RedirectUrl           |
  | 10    | UnlockDoorDeckDoor    |
  | 11    | UnlockKisiDoor        |
  | 12    | BookResource          |
  | 13    | BookDesk              |
  | 14    | ShowNewBookingForm    |
  | 15    | SmartLock             |
  | 16    | ExtendBookingBy       |
  | 17    | ShowAcsModal          |
  | 18    | UnlockPadWordDoor     |
  | 19    | UnlockOPaxtonNet2Door |
</Accordion>

<Accordion title="eAutomationTileGeofencePrecission — GeofencePrecission values">
  | Value | Name     |
  | ----- | -------- |
  | 1     | Low      |
  | 2     | Medium   |
  | 3     | High     |
  | 4     | VeryHigh |
</Accordion>

## Request Body

### Required Fields

<ParamField body="Id" type="integer" required>
  The Id of the AutomationTile record to update.
</ParamField>

<ParamField body="BusinessId" type="integer" required>
  ID of the business linked to this record.
</ParamField>

<ParamField body="Name" type="string" required>
  Tile name used to identify it in the admin panel.
</ParamField>

<ParamField body="Action" type="integer" required>
  Action triggered when the tile is scanned: None, CheckIn, CheckOut, BookingCheckIn, EventCheckIn, ExtendBookingBy, RequestUrl, RedirectUrl, ResourceCleaned, BookResource, BookDesk, ShowNewBookingForm, UnlockAct365Door, UnlockDoorDeckDoor, UnlockKisiDoor, SmartLock, etc..
</ParamField>

<ParamField body="GeofencePrecission" type="integer" required>
  Geofence precision level: Low, Medium, High, or VeryHigh. Higher precision requires the user to be closer to the tile coordinates.
</ParamField>

### Optional Fields

<ParamField body="TileNumber" type="string">
  Unique tile identifier (GUID) auto-assigned on creation. Used to generate the QR code and NFC URL.
</ParamField>

<ParamField body="ActionParameters" type="string">
  Parameters for the selected action. Format depends on the action type — e.g. a resource ID, a URL, or a resource ID|duration pair.
</ParamField>

<ParamField body="EnableGeofence" type="boolean">
  Whether to restrict the tile to a geographic area. When enabled, the tile only works if the user is within the configured radius of the tile's coordinates.
</ParamField>

<ParamField body="CheckCustomerIn" type="boolean">
  Whether to also check the customer into the space when they scan the tile, regardless of the primary action.
</ParamField>

<ParamField body="Longitude" type="string">
  Longitude of the tile's installed location. Used for geofencing.
</ParamField>

<ParamField body="Latitude" type="string">
  Latitude of the tile's installed location. Used for geofencing.
</ParamField>

<ParamField body="MaxDistanceMeters" type="integer">
  Custom maximum distance in meters from the tile's coordinates. Overrides the precision preset when set.
</ParamField>

<ParamField body="SuccessMessage" type="string">
  Custom message shown to the user when the tile action completes successfully.
</ParamField>

<ParamField body="ErrorMessage" type="string">
  Custom error message shown to the user when the tile action fails.
</ParamField>

<ParamField body="Resources" type="integer[]">
  List of resources linked to this record.
</ParamField>

<ParamField body="AddedResources" type="integer[]">
  The added resources value for this automation tile.
</ParamField>

<ParamField body="RemovedResources" type="integer[]">
  The removed resources value for this automation tile.
</ParamField>

<ParamField body="Tariffs" type="integer[]">
  List of tariffs linked to this record.
</ParamField>

<ParamField body="AddedTariffs" type="integer[]">
  The added tariffs value for this automation tile.
</ParamField>

<ParamField body="RemovedTariffs" type="integer[]">
  The removed tariffs value for this automation tile.
</ParamField>

<ParamField body="TimePasses" type="integer[]">
  List of time passes linked to this record.
</ParamField>

<ParamField body="AddedTimePasses" type="integer[]">
  The added time passes value for this automation tile.
</ParamField>

<ParamField body="RemovedTimePasses" type="integer[]">
  The removed time passes value for this automation tile.
</ParamField>

<ParamField body="FloorPlanDesks" type="integer[]">
  List of floor plan desks linked to this record.
</ParamField>

<ParamField body="AddedFloorPlanDesks" type="integer[]">
  The added floor plan desks value for this automation tile.
</ParamField>

<ParamField body="RemovedFloorPlanDesks" type="integer[]">
  The removed floor plan desks value for this automation tile.
</ParamField>

## Code Examples

<CodeGroup>
  ```bash cURL theme={null}
  curl -X PUT \
    "https://spaces.nexudus.com/api/sys/automationtiles" \
    -H "Authorization: Bearer YOUR_TOKEN" \
    -H "Content-Type: application/json" \
    -d '{
      "BusinessId": 0,
      "Name": "",
      "Action": 0,
      "GeofencePrecission": 0,
      "Id": 87654321
  }'
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(
    'https://spaces.nexudus.com/api/sys/automationtiles',
    {
      method: 'PUT',
      headers: {
        'Authorization': 'Bearer YOUR_TOKEN',
        'Content-Type': 'application/json'
      },
      body: JSON.stringify({
        BusinessId: 0,
        Name: '',
        Action: 0,
        GeofencePrecission: 0,
        Id: 87654321
      })
    }
  );

  const data = await response.json();
  ```

  ```python Python theme={null}
  import requests

  response = requests.put(
      'https://spaces.nexudus.com/api/sys/automationtiles',
      headers={
          'Authorization': 'Bearer YOUR_TOKEN',
          'Content-Type': 'application/json'
      },
      json={
          'BusinessId': 0,
          'Name': '',
          'Action': 0,
          'GeofencePrecission': 0,
          'Id': 87654321
      }
  )

  data = response.json()
  ```
</CodeGroup>

## Response

### 200

<ResponseField name="Status" type="integer">
  HTTP status code. `200` on success.
</ResponseField>

<ResponseField name="Message" type="string">
  A human-readable message confirming the update.
</ResponseField>

<ResponseField name="Value" type="object">
  Contains the `Id` of the updated record.
</ResponseField>

<ResponseField name="WasSuccessful" type="boolean">
  `true` if the automationtile was updated successfully.
</ResponseField>

<ResponseField name="Errors" type="array">
  `null` on success.
</ResponseField>

```json Example Response theme={null}
{
  "Status": 200,
  "Message": "AutomationTile was successfully updated.",
  "Value": {
    "Id": 87654321
  },
  "OpenInDialog": false,
  "OpenInWindow": false,
  "RedirectURL": null,
  "JavaScript": null,
  "UpdatedOn": "2025-01-15T10:30:00Z",
  "UpdatedBy": "admin@example.com",
  "Errors": null,
  "WasSuccessful": true
}
```

### 400

<ResponseField name="Message" type="string">
  A summary of the validation error(s), in the format `PropertyName: error message`.
</ResponseField>

<ResponseField name="Value" type="any">
  `null` on validation failure.
</ResponseField>

<ResponseField name="Errors" type="object[]">
  Array of validation errors.

  <Expandable>
    <ResponseField name="AttemptedValue" type="any">
      The value that was submitted for the field, or `null` if missing.
    </ResponseField>

    <ResponseField name="Message" type="string">
      The validation error message.
    </ResponseField>

    <ResponseField name="PropertyName" type="string">
      The name of the property that failed validation.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="WasSuccessful" type="boolean">
  `false` when the request fails validation.
</ResponseField>

```json Example Response theme={null}
{
  "Message": "Name: is a required field",
  "Value": null,
  "Errors": [
    {
      "AttemptedValue": null,
      "Message": "is a required field",
      "PropertyName": "Name"
    }
  ],
  "WasSuccessful": false
}
```
