Skip to main content
PATCH
/
v1
/
asset_types
/
{assetTypeId}
Update an Asset Type
curl --request PATCH \
  --url https://api.us.lexful.app/v1/asset_types/{assetTypeId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'X-Account-ID: <api-key>' \
  --data '
{
  "display_name": "Secure Projects - Enhanced",
  "description": "Project management with enhanced security features and compliance tracking",
  "properties": [
    {
      "name": "project_name",
      "type": "string",
      "display_name": "Project Name",
      "description": "Name of the project",
      "required": true
    },
    {
      "name": "budget",
      "type": "number",
      "display_name": "Budget",
      "description": "Project budget in dollars",
      "required": false
    },
    {
      "name": "compliance_level",
      "type": "string",
      "display_name": "Compliance Level",
      "description": "Required compliance level",
      "required": false,
      "enum": [
        "Standard",
        "High",
        "Critical"
      ]
    }
  ]
}
'
import requests

url = "https://api.us.lexful.app/v1/asset_types/{assetTypeId}"

payload = {
"display_name": "Secure Projects - Enhanced",
"description": "Project management with enhanced security features and compliance tracking",
"properties": [
{
"name": "project_name",
"type": "string",
"display_name": "Project Name",
"description": "Name of the project",
"required": True
},
{
"name": "budget",
"type": "number",
"display_name": "Budget",
"description": "Project budget in dollars",
"required": False
},
{
"name": "compliance_level",
"type": "string",
"display_name": "Compliance Level",
"description": "Required compliance level",
"required": False,
"enum": ["Standard", "High", "Critical"]
}
]
}
headers = {
"Authorization": "Bearer <token>",
"X-Account-ID": "<api-key>",
"Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'PATCH',
headers: {
Authorization: 'Bearer <token>',
'X-Account-ID': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
display_name: 'Secure Projects - Enhanced',
description: 'Project management with enhanced security features and compliance tracking',
properties: [
{
name: 'project_name',
type: 'string',
display_name: 'Project Name',
description: 'Name of the project',
required: true
},
{
name: 'budget',
type: 'number',
display_name: 'Budget',
description: 'Project budget in dollars',
required: false
},
{
name: 'compliance_level',
type: 'string',
display_name: 'Compliance Level',
description: 'Required compliance level',
required: false,
enum: ['Standard', 'High', 'Critical']
}
]
})
};

fetch('https://api.us.lexful.app/v1/asset_types/{assetTypeId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.us.lexful.app/v1/asset_types/{assetTypeId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'display_name' => 'Secure Projects - Enhanced',
'description' => 'Project management with enhanced security features and compliance tracking',
'properties' => [
[
'name' => 'project_name',
'type' => 'string',
'display_name' => 'Project Name',
'description' => 'Name of the project',
'required' => true
],
[
'name' => 'budget',
'type' => 'number',
'display_name' => 'Budget',
'description' => 'Project budget in dollars',
'required' => false
],
[
'name' => 'compliance_level',
'type' => 'string',
'display_name' => 'Compliance Level',
'description' => 'Required compliance level',
'required' => false,
'enum' => [
'Standard',
'High',
'Critical'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"X-Account-ID: <api-key>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://api.us.lexful.app/v1/asset_types/{assetTypeId}"

payload := strings.NewReader("{\n \"display_name\": \"Secure Projects - Enhanced\",\n \"description\": \"Project management with enhanced security features and compliance tracking\",\n \"properties\": [\n {\n \"name\": \"project_name\",\n \"type\": \"string\",\n \"display_name\": \"Project Name\",\n \"description\": \"Name of the project\",\n \"required\": true\n },\n {\n \"name\": \"budget\",\n \"type\": \"number\",\n \"display_name\": \"Budget\",\n \"description\": \"Project budget in dollars\",\n \"required\": false\n },\n {\n \"name\": \"compliance_level\",\n \"type\": \"string\",\n \"display_name\": \"Compliance Level\",\n \"description\": \"Required compliance level\",\n \"required\": false,\n \"enum\": [\n \"Standard\",\n \"High\",\n \"Critical\"\n ]\n }\n ]\n}")

req, _ := http.NewRequest("PATCH", url, payload)

req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("X-Account-ID", "<api-key>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.patch("https://api.us.lexful.app/v1/asset_types/{assetTypeId}")
.header("Authorization", "Bearer <token>")
.header("X-Account-ID", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"display_name\": \"Secure Projects - Enhanced\",\n \"description\": \"Project management with enhanced security features and compliance tracking\",\n \"properties\": [\n {\n \"name\": \"project_name\",\n \"type\": \"string\",\n \"display_name\": \"Project Name\",\n \"description\": \"Name of the project\",\n \"required\": true\n },\n {\n \"name\": \"budget\",\n \"type\": \"number\",\n \"display_name\": \"Budget\",\n \"description\": \"Project budget in dollars\",\n \"required\": false\n },\n {\n \"name\": \"compliance_level\",\n \"type\": \"string\",\n \"display_name\": \"Compliance Level\",\n \"description\": \"Required compliance level\",\n \"required\": false,\n \"enum\": [\n \"Standard\",\n \"High\",\n \"Critical\"\n ]\n }\n ]\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.us.lexful.app/v1/asset_types/{assetTypeId}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["X-Account-ID"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"display_name\": \"Secure Projects - Enhanced\",\n \"description\": \"Project management with enhanced security features and compliance tracking\",\n \"properties\": [\n {\n \"name\": \"project_name\",\n \"type\": \"string\",\n \"display_name\": \"Project Name\",\n \"description\": \"Name of the project\",\n \"required\": true\n },\n {\n \"name\": \"budget\",\n \"type\": \"number\",\n \"display_name\": \"Budget\",\n \"description\": \"Project budget in dollars\",\n \"required\": false\n },\n {\n \"name\": \"compliance_level\",\n \"type\": \"string\",\n \"display_name\": \"Compliance Level\",\n \"description\": \"Required compliance level\",\n \"required\": false,\n \"enum\": [\n \"Standard\",\n \"High\",\n \"Critical\"\n ]\n }\n ]\n}"

response = http.request(request)
puts response.read_body
{
  "id": "019983a9-c4bf-77da-a35b-5eb177b7b859",
  "account_id": "019983a9-c4bf-77da-a35b-5eb177b7b859",
  "name": "system.contact",
  "display_name": "Contacts",
  "description": "Contacts are people and identities associated with an organization",
  "is_system": true,
  "properties": [
    {
      "name": "first_name",
      "type": "string",
      "display_name": "First Name",
      "required": false
    },
    {
      "name": "last_name",
      "type": "string",
      "display_name": "Last Name",
      "required": false
    },
    {
      "name": "title",
      "type": "string",
      "display_name": "Title",
      "required": false
    },
    {
      "name": "important",
      "type": "boolean",
      "display_name": "Important",
      "required": true
    },
    {
      "name": "contact_type",
      "type": "string",
      "display_name": "Contact Type",
      "required": false,
      "enum": [
        "Approver",
        "Champion",
        "Decision Maker",
        "End User",
        "Evaluator",
        "Influencer",
        "Owner",
        "Other"
      ]
    },
    {
      "name": "contact_methods",
      "type": "array",
      "display_name": "Contact Methods",
      "required": false,
      "array": {
        "type": "object",
        "properties": [
          {
            "name": "type",
            "type": "string",
            "display_name": "Contact Method Type",
            "required": true,
            "enum": [
              "Phone",
              "Fax",
              "Mobile",
              "Email",
              "Website",
              "Twitter",
              "LinkedIn",
              "Other"
            ]
          },
          {
            "name": "value",
            "type": "string",
            "display_name": "Contact Method Value",
            "required": true
          }
        ]
      }
    },
    {
      "name": "preferred_contact_method",
      "type": "string",
      "display_name": "Preferred Contact Method",
      "required": false,
      "enum": [
        "Phone",
        "Fax",
        "Mobile",
        "Email",
        "Website",
        "Twitter",
        "LinkedIn",
        "Other"
      ]
    },
    {
      "name": "notes",
      "type": "richtext",
      "display_name": "Notes",
      "required": false
    }
  ],
  "references": [
    {
      "name": "location",
      "display_name": "Location",
      "required": false,
      "multiple": false,
      "target_asset_types": [
        "system.location"
      ]
    }
  ],
  "version": 1,
  "created_at": "2024-01-15T10:30:00.000Z",
  "updated_at": "2024-01-15T10:30:00.000Z",
  "created_by": "019983a9-c4c0-73af-aec9-463feeadc2e7",
  "updated_by": "019983a9-c4c0-73af-aec9-463feeadc2e7"
}
{
"status": 123,
"message": "<string>",
"error_id": "<string>",
"error_code": "<string>",
"developer_message": "<string>"
}
{
"status": 123,
"message": "<string>",
"error_id": "<string>",
"error_code": "<string>",
"developer_message": "<string>"
}
{
"status": 123,
"message": "<string>",
"error_id": "<string>",
"error_code": "<string>",
"developer_message": "<string>"
}
{
"status": 123,
"message": "<string>",
"error_id": "<string>",
"error_code": "<string>",
"developer_message": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer token

X-Account-ID
string
header
required

Account ID

Path Parameters

assetTypeId
string<uuid>
required

Asset type ID

Body

application/json
display_name
string

Display name

Required string length: 1 - 255
description
string

Asset type description

Maximum string length: 1000
properties
object[]

Asset type properties

references
object[]

Asset type references

ui_config
object

UI rendering hints for the asset/entity type

Response

Default Response

id
string<uuid>
required

Asset type unique identifier

name
string
required

Asset type name (unique, used in URLs)

display_name
string
required

Display name for UI

is_system
boolean
required

Whether this is a system asset type

properties
object[]
required

Asset type properties

version
number
required

Asset type version

account_id
string<uuid>

Account ID

description
string

Asset type description

references
object[]

Asset type references

ui_config
object

UI rendering hints for the asset/entity type

created_at
string<date-time>

Creation timestamp

updated_at
string<date-time>

Last update timestamp

created_by
string

User ID who created

updated_by
string

User ID who last updated