---
agentTools:
  projectIndex: https://kolideapi.readme.io/llms.txt
---

# Update an existing Device authentication mode

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "version": "2026-04-07",
    "title": "K2 API"
  },
  "servers": [
    {
      "url": "https://api.kolide.com/"
    }
  ],
  "security": [
    {
      "api_key": []
    }
  ],
  "paths": {
    "/devices/{deviceId}/authentication_mode": {
      "patch": {
        "summary": "Update an existing Device authentication mode",
        "parameters": [
          {
            "name": "x-kolide-api-version",
            "in": "header",
            "description": "Specify the API version to be used",
            "required": false,
            "schema": {
              "type": "string",
              "default": "2026-04-07"
            }
          },
          {
            "name": "deviceId",
            "in": "path",
            "required": true,
            "description": "The device ID of the device authentication mode",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The updated Device authentication mode",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/device_authentication_mode"
                }
              }
            }
          },
          "401": {
            "description": "An 'unauthorized' response may occur for features restricted by or unavailable to your organization",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "an error message describing why the endpoint is unavailable",
                      "example": "This feature has been disabled by your organization"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "A 'forbidden' response may occur if the API key does not have necessary permissions to perform certain actions",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "a succinct error message",
                      "example": "Forbidden"
                    },
                    "message": {
                      "type": "string",
                      "description": "A longer-form error message explaining the reason for the response",
                      "example": "The API key used is not authorized to perform this action"
                    }
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/device_authentication_mode_request_body"
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "device_authentication_mode": {
        "type": "object",
        "properties": {
          "device_id": {
            "type": "string",
            "description": "The canonical identifier for the device"
          },
          "authentication_mode": {
            "type": "string",
            "description": "Authentication mode describing who can authentication with this device.  Must be one of: only_registered_owner, only_registered_owner_or_group_members, anyone"
          },
          "person_groups": {
            "description": "Description of the groups allowed to authenticate with this device",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/person_group"
            }
          }
        }
      },
      "device_authentication_mode_request_body": {
        "type": "object",
        "properties": {
          "authentication_mode": {
            "type": "string",
            "description": "Describes the authentication mode for this device. Must be one of: only_registered_owner, only_registered_owner_or_group_members, anyone"
          },
          "person_group_ids": {
            "description": "The identifiers for the groups that should be allowed to\nauthenticate with this device. Ignored if the auth_mode is not\n'only_registered_owner_or_group_members'\n",
            "type": "array",
            "items": {
              "type": "integer"
            }
          }
        }
      },
      "person_group": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The canonical identifier for this group"
          },
          "name": {
            "type": "string",
            "description": "The human-readable name for this group"
          }
        }
      }
    },
    "securitySchemes": {
      "api_key": {
        "type": "http",
        "scheme": "bearer"
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "_id": {
    "buffer": {
      "0": 105,
      "1": 226,
      "2": 139,
      "3": 67,
      "4": 129,
      "5": 230,
      "6": 244,
      "7": 250,
      "8": 221,
      "9": 30,
      "10": 223,
      "11": 173
    }
  }
}
```