Skip to main content
PATCH
/
v1
/
custom-properties
/
groups
/
{groupId}
/
values
/
{valueId}
Update custom property value
curl --request PATCH \
  --url https://api.light.inc/v1/custom-properties/groups/{groupId}/values/{valueId} \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json;charset=UTF-8' \
  --data '
{
  "label": "<string>",
  "context": "<string>"
}
'
import requests

url = "https://api.light.inc/v1/custom-properties/groups/{groupId}/values/{valueId}"

payload = {
"label": "<string>",
"context": "<string>"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json;charset=UTF-8"
}

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

print(response.text)
const options = {
method: 'PATCH',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json;charset=UTF-8'},
body: JSON.stringify({label: '<string>', context: '<string>'})
};

fetch('https://api.light.inc/v1/custom-properties/groups/{groupId}/values/{valueId}', 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.light.inc/v1/custom-properties/groups/{groupId}/values/{valueId}",
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([
'label' => '<string>',
'context' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json;charset=UTF-8"
],
]);

$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.light.inc/v1/custom-properties/groups/{groupId}/values/{valueId}"

payload := strings.NewReader("{\n \"label\": \"<string>\",\n \"context\": \"<string>\"\n}")

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

req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json;charset=UTF-8")

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.light.inc/v1/custom-properties/groups/{groupId}/values/{valueId}")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json;charset=UTF-8")
.body("{\n \"label\": \"<string>\",\n \"context\": \"<string>\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.light.inc/v1/custom-properties/groups/{groupId}/values/{valueId}")

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

request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json;charset=UTF-8'
request.body = "{\n \"label\": \"<string>\",\n \"context\": \"<string>\"\n}"

response = http.request(request)
puts response.read_body
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "groupId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "groupInternalName": "<string>",
  "companyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "internalName": "<string>",
  "label": "<string>",
  "context": "<string>",
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

Basic authentication header of the form Basic <api_key>, where <api_key> is your api key.

Path Parameters

groupId
string<uuid>
required
valueId
string<uuid>
required

Body

application/json;charset=UTF-8
label
string | null

Display label for the custom property value.

context
string | null

Optional context or description for the custom property value.

Response

default - application/json;charset=UTF-8

default response

List of values. Note that this will be a single value unless the group input type supports multiple values

id
string<uuid>

Unique identifier for the object

groupId
string<uuid>

ID of the custom property group

groupInternalName
string

Internal name of the custom property group

companyId
string<uuid>

ID of the company

internalName
string

Internal name of the custom property value

label
string

Label of the custom property value

context
string | null

Context/description of the custom property value

createdAt
string<date-time>

Timestamp when the custom property value was created

updatedAt
string<date-time>

Timestamp when the custom property value was last updated