---
title: "Update a Device Profile"
method: PUT
path: "/deviceprofiles/{deviceProfileId}"
tags: ["Profiles"]
---

# Update a Device Profile

`PUT /deviceprofiles/{deviceProfileId}`

## Request

- Base URL: `https://api.smartthings.com/v1`
- URL: `https://api.smartthings.com/v1/deviceprofiles/{deviceProfileId}`
- Auth: OAuth 2
  - Implicit: `https://auth-global.api.smartthings.com`
  - Scopes: `w:deviceprofiles`
- TypeScript: <https://skmtc.dev/smartthings/apis/smartthings-api/docs/deviceprofiles/:deviceProfileId/put.ts> (a function with typed inputs; its response is checked against the schema)

Update a Device Profile. The Device Profile must be currently deployed.

## Request body

- UpdateDeviceProfileRequest
  - `components` DeviceComponentRequest[]: A list of components for this profile.
    - `label` string: UTF-8 label for the component.
    - `id` string, ^[-_!.~'()*0-9a-zA-Z]{1,36}$, required
    - `capabilities` CapabilityReferenceRequest[], required: A list of `[ 1..100 ]` capabilities for this component.
      - `id` string, required
      - `version` integer
      - `optional` boolean: An optional capability is available to be enabled for a device, but will not be part of the device record at join time unless specified. In other words, if set to `true`, then devices using this profile can support the capability, but are not required to. If set to `false`, devices using profile must support the capability.
      - `config` CapabilityConfiguration
        - `values` CapabilityConfigurationValue[], required
          - `key` string, required: The path to the preference attribute that is being configured.
          - `range` number[]: The range of values supported by the capability attribute. The range must be a subset of the one defined on the capability. Either `range` OR `enabledValues` must be provided, not both.
          - `enabledValues` string[]: The list of enumerated values that are supported for the capability attribute. The list of supported value must be a subset of the one defined on the capability. Either `range` OR `enabledValues` must be provided, not both.
          - `step` number, double: The incremental step that increases or decreases for numeric values.
      - `restrictions` Restriction: A typed model which describes a restriction pertaining to a platform entity.
        - `tier` integer, required: The restriction level of an entity to limit actions it can take.
        - `historyRetentionTTLDays` integer: The number of days to retain the state before deletion.
        - `visibleWhenRestricted` boolean: Indicate whether or not the entity is visible when restricted.
    - `categories` DeviceCategory[], required
      - `name` string, required
      - `categoryType` 'manufacturer' | 'user', required
    - `restrictions` Restriction: A typed model which describes a restriction pertaining to a platform entity.
      - `tier` integer, required: The restriction level of an entity to limit actions it can take.
      - `historyRetentionTTLDays` integer: The number of days to retain the state before deletion.
      - `visibleWhenRestricted` boolean: Indicate whether or not the entity is visible when restricted.
    - `optional` boolean: An optional component is available to be enabled for a device, but will not be part of the device record at join time unless specified. In other words, if set to `true`, then devices using this profile can support the component, but are not required to. If set to `false`, devices using profile must support the component. Note that all components, whether optional or not, must have at least one required (i.e. not optional) capability.
  - `metadata` unknown
  - `preferences` PreferenceRequest[]: A list of preferences for this profile, whether implicit or explicit.
    - `preferenceId` string: The ID of the preference. When explicit flag is true this field is required.
    - `name` string, required: An alphanumeric English language name for this preference. Will be appended to a namespace to generate the full preference id.
    - `title` string, required: A short description for this preference.
    - `description` string: A long description for this preference.
    - `explicit` boolean: A flag describing whether this preference is explicit, or inline. When set to true a preferenceId is required.
    - `required` boolean: A flag describing whether this property is required or not.
    - `preferenceType` 'integer' | 'number' | 'boolean' | 'string' | 'enumeration', required: The type of preference this is.
    - `definition` object, required: The definition of this preference.
      - `minimum` number, double: Minimum value a preference may be set to. Only valid for `integer` and `number` preference types.
      - `maximum` number, double: Maximum value a preference may be set to. Only valid for `integer` and `number` preference types.
      - `minLength` integer: Minimum length a string may be set to. Only valid for `string` preference type.
      - `maxLength` integer: Maximum length a string may be set to. Only valid for `string` preference type.
      - `default` unknown
      - `stringType` 'text' | 'password' | 'paragraph': The type of a string preference. `text` is a normal preference, `password` encrypts the values, and `paragraph` is for documentation purposes.
      - `options` object: The available selections for an `enumeration` preference.
  - `presentationId` string

## Response `200`

The Device Profile

- DeviceProfileResponse: Describes the migration status (from v1 -> v2). This profile will be available in a backwards compatible fashion regardless.
  - `id` string, required
  - `name` string, required
  - `metadata` unknown
  - `restrictions` DeviceRestriction: A typed model which describes a restriction pertaining to a platform entity.
    - `tier` integer, required: The restriction level of an entity to limit actions it can take.
    - `historyRetentionTTLDays` integer: The number of days to retain the state before deletion.
    - `visibleWhenRestricted` boolean: Indicate whether or not the entity is visible when restricted.
  - `presentationId` string
  - `migrationStatus` 'MIGRATED' | 'NOT_MIGRATED', required
  - `status` 'DEVELOPMENT' | 'PUBLISHED', required: The lifecycle status of a device profile. 'DEVELOPMENT' - Device profile can be modified. The profile is only available to the developer and can only be used with a self-published app. 'PUBLISHED' - Device profile can be shared with other users, but cannot be modified.
  - `preferences` PreferenceResponse[]
    - `preferenceId` string: The ID of the preference
    - `name` string: An alphanumeric English language name for this preference.
    - `title` string, required: A short description for this preference.
    - `description` string: A long description for this preference.
    - `required` boolean: A flag describing whether this property is required or not.
    - `explicit` boolean: A flag describing whether this preference is explicit, or inline.
    - `preferenceType` 'integer' | 'number' | 'boolean' | 'string' | 'enumeration', required: The type of preference this is.
  - `components` DeviceComponent[], required
    - `id` string, ^[-_!.~'()*0-9a-zA-Z]{1,36}$, required
    - `label` string: UTF-8 label for the component.
    - `capabilities` DeviceCapabilityReference[], required
      - `id` string, required
      - `version` integer
      - `optional` boolean: An optional capability is available to be enabled for a device, but will not be part of the device record at join time unless specified. In other words, if set to `true`, then devices using this profile can support the capability, but are not required to. If set to `false`, devices using profile must support the capability.
      - `config` CapabilityConfiguration
        - `values` CapabilityConfigurationValue[], required
          - `key` string, required: The path to the preference attribute that is being configured.
          - `range` number[]: The range of values supported by the capability attribute. The range must be a subset of the one defined on the capability. Either `range` OR `enabledValues` must be provided, not both.
          - `enabledValues` string[]: The list of enumerated values that are supported for the capability attribute. The list of supported value must be a subset of the one defined on the capability. Either `range` OR `enabledValues` must be provided, not both.
          - `step` number, double: The incremental step that increases or decreases for numeric values.
      - `restrictions` Restriction: A typed model which describes a restriction pertaining to a platform entity.
        - `tier` integer, required: The restriction level of an entity to limit actions it can take.
        - `historyRetentionTTLDays` integer: The number of days to retain the state before deletion.
        - `visibleWhenRestricted` boolean: Indicate whether or not the entity is visible when restricted.
      - `ephemeral` boolean
      - `status` CapabilityStatus: A map of attribute name to attribute state.
    - `categories` DeviceCategory[], required: Defines the categories for the device. There can be up to two: one defined by the manufacturer, the other a user-selected value.
      - `name` string, required
      - `categoryType` 'manufacturer' | 'user', required
    - `restrictions` Restriction: A typed model which describes a restriction pertaining to a platform entity.
      - `tier` integer, required: The restriction level of an entity to limit actions it can take.
      - `historyRetentionTTLDays` integer: The number of days to retain the state before deletion.
      - `visibleWhenRestricted` boolean: Indicate whether or not the entity is visible when restricted.
    - `optional` boolean: An optional component is available to be enabled for a device, but will not be part of the device record at join time unless specified. In other words, if set to `true`, then devices using this profile can support the component, but are not required to. If set to `false`, devices using profile must support the component. Note that all components, whether optional or not, must have at least one required (i.e. not optional) capability.

## Other responses

- `400`: Bad request
- `401`: Unauthorized
- `403`: Forbidden
- `429`: Too many requests
- `default`: Unexpected error

## Changes

- **2022-12-19** `adcacfc2749d`: 1 info
  - added the new optional `header` request parameter `X-ST-Organization` to all path's operations

[Operation history](https://skmtc.dev/smartthings/apis/smartthings-api/changes/deviceprofiles/:deviceProfileId/put.md)

---

[API](https://skmtc.dev/smartthings/apis/smartthings-api.md) - [All operations](https://skmtc.dev/smartthings/apis/smartthings-api/llms.txt) - [OpenAPI document](https://skmtc.dev/smartthings/apis/smartthings-api/revisions/2788a4236800?raw)
