---
title: "Create Or Update Asset Profile (saveAssetProfile)"
method: POST
path: "/api/assetProfile"
tags: ["asset-profile-controller"]
---

# Create Or Update Asset Profile (saveAssetProfile)

`POST /api/assetProfile`

Create or update the Asset Profile. When creating asset profile, platform generates asset profile id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created asset profile id will be present in the response. Specify existing asset profile id to update the asset profile. Referencing non-existing asset profile Id will cause 'Not Found' error. 

Asset profile name is unique in the scope of tenant. Only one 'default' asset profile may exist in scope of tenant. Remove 'id', 'tenantId' from the request body example (below) to create new Asset Profile entity. 

Available for users with 'TENANT_ADMIN' authority.

## Request body

- AssetProfile — A JSON value representing the asset profile.
  - `id` AssetProfileId
    - `id` string, uuid, required — ID of the entity, time-based UUID v1
    - `entityType` 'ASSET_PROFILE', required — string
  - `createdTime` integer — Timestamp of the profile creation, in milliseconds
  - `tenantId` TenantId
    - `id` string, uuid, required — ID of the entity, time-based UUID v1
    - `entityType` 'TENANT', required — string
  - `name` string — Unique Asset Profile Name in scope of Tenant.
  - `description` string — Asset Profile description.
  - `image` string — Either URL or Base64 data of the icon. Used in the mobile application to visualize set of asset profiles in the grid view.
  - `defaultRuleChainId` RuleChainId
    - `id` string, uuid, required — ID of the entity, time-based UUID v1
    - `entityType` 'RULE_CHAIN', required — string
  - `defaultDashboardId` DashboardId
    - `id` string, uuid, required — ID of the entity, time-based UUID v1
    - `entityType` 'DASHBOARD', required — string
  - `defaultQueueName` string — Rule engine queue name. If present, the specified queue will be used to store all unprocessed messages related to asset, including asset updates, telemetry, attribute updates, etc. Otherwise, the 'Main' queue will be used to store those messages.
  - `defaultEdgeRuleChainId` RuleChainId
    - `id` string, uuid, required — ID of the entity, time-based UUID v1
    - `entityType` 'RULE_CHAIN', required — string
  - `version` integer
  - `default` boolean — Used to mark the default profile. Default profile is used when the asset profile is not specified during asset creation.

## Response `200`

OK

- AssetProfile — A JSON value representing the asset profile.
  - `id` AssetProfileId
    - `id` string, uuid, required — ID of the entity, time-based UUID v1
    - `entityType` 'ASSET_PROFILE', required — string
  - `createdTime` integer — Timestamp of the profile creation, in milliseconds
  - `tenantId` TenantId
    - `id` string, uuid, required — ID of the entity, time-based UUID v1
    - `entityType` 'TENANT', required — string
  - `name` string — Unique Asset Profile Name in scope of Tenant.
  - `description` string — Asset Profile description.
  - `image` string — Either URL or Base64 data of the icon. Used in the mobile application to visualize set of asset profiles in the grid view.
  - `defaultRuleChainId` RuleChainId
    - `id` string, uuid, required — ID of the entity, time-based UUID v1
    - `entityType` 'RULE_CHAIN', required — string
  - `defaultDashboardId` DashboardId
    - `id` string, uuid, required — ID of the entity, time-based UUID v1
    - `entityType` 'DASHBOARD', required — string
  - `defaultQueueName` string — Rule engine queue name. If present, the specified queue will be used to store all unprocessed messages related to asset, including asset updates, telemetry, attribute updates, etc. Otherwise, the 'Main' queue will be used to store those messages.
  - `defaultEdgeRuleChainId` RuleChainId
    - `id` string, uuid, required — ID of the entity, time-based UUID v1
    - `entityType` 'RULE_CHAIN', required — string
  - `version` integer
  - `default` boolean — Used to mark the default profile. Default profile is used when the asset profile is not specified during asset creation.

---

[API](https://skmtc.net/thingsboard/apis/thingsboard-rest-api.md) · [All operations](https://skmtc.net/thingsboard/apis/thingsboard-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/thingsboard/thingsboard-rest-api/revisions/40169ccdec5c/schema)
