import { PeriskopeApi } from '@periskope/periskope-client';
const client = new PeriskopeApi({
authToken: 'YOUR_API_KEY',
phone: 'YOUR_PHONE_NUMBER', // e.g., '919876543210'
});
async function updateCustomProperty() {
const response = await client.property.update({
property_id: 'Workspace',
type: 'ticket',
name: 'Workspace ID',
section: 'Issue Details'
});
console.log(response);
}
updateCustomProperty();curl -X POST \
https://api.periskope.app/v1/properties/Workspace?type=ticket \
-H 'Authorization: Bearer <token>' \
-H 'Content-Type: application/json' \
-H 'x-phone: YOUR_PHONE_NUMBER' \
-d '{
"name": "Workspace ID",
"section": "Issue Details"
}'{
"success": true,
"message": "Custom property updated",
"data": {
"property_id": "property-a1b2c3",
"property_name": "Workspace",
"type": "ticket",
"kind": "dropdown",
"mandatory": false,
"section_id": "3f8b6c1e-8f2a-4b6e-9c3d-2a1f0e9d8c7b",
"section_name": "Issue Details",
"options": [
{
"id": "1712345678901",
"label": "Acme Corp"
}
],
"created_at": "2026-07-06T10:00:00.000Z"
}
}{
"code": "NOT_FOUND_ERROR",
"message": "No custom property found matching \"Workspace\"",
"status": 404
}{
"code": "CONFLICT_ERROR",
"message": "A ticket custom property named \"Workspace ID\" already exists",
"status": 409
}{
"code": "VALIDATION_ERROR",
"message": "\"Workspace\" matches multiple custom properties (chat and ticket). Pass ?type=chat|ticket, or use the property_id, to disambiguate.",
"status": 422,
"fields": {
"property_id": {
"message": "\"Workspace\" matches multiple custom properties (chat and ticket). Pass ?type=chat|ticket, or use the property_id, to disambiguate."
}
}
}Update Custom Property
This endpoint updates the name, section or mandatory flag of a custom property
Provide any combination of the three fields - at least one is required. If the section does not exist yet, it is created automatically
Options for dropdown and picklist properties are managed separately via the Update Property Options endpoint
mandatory is supported only for ticket properties. Passing mandatory: true for a chat property returns a validation error
If the same property name exists under both chat and ticket, pass the type query parameter to specify which one to update. Without it, the request is rejected as ambiguous
import { PeriskopeApi } from '@periskope/periskope-client';
const client = new PeriskopeApi({
authToken: 'YOUR_API_KEY',
phone: 'YOUR_PHONE_NUMBER', // e.g., '919876543210'
});
async function updateCustomProperty() {
const response = await client.property.update({
property_id: 'Workspace',
type: 'ticket',
name: 'Workspace ID',
section: 'Issue Details'
});
console.log(response);
}
updateCustomProperty();curl -X POST \
https://api.periskope.app/v1/properties/Workspace?type=ticket \
-H 'Authorization: Bearer <token>' \
-H 'Content-Type: application/json' \
-H 'x-phone: YOUR_PHONE_NUMBER' \
-d '{
"name": "Workspace ID",
"section": "Issue Details"
}'{
"success": true,
"message": "Custom property updated",
"data": {
"property_id": "property-a1b2c3",
"property_name": "Workspace",
"type": "ticket",
"kind": "dropdown",
"mandatory": false,
"section_id": "3f8b6c1e-8f2a-4b6e-9c3d-2a1f0e9d8c7b",
"section_name": "Issue Details",
"options": [
{
"id": "1712345678901",
"label": "Acme Corp"
}
],
"created_at": "2026-07-06T10:00:00.000Z"
}
}{
"code": "NOT_FOUND_ERROR",
"message": "No custom property found matching \"Workspace\"",
"status": 404
}{
"code": "CONFLICT_ERROR",
"message": "A ticket custom property named \"Workspace ID\" already exists",
"status": 409
}{
"code": "VALIDATION_ERROR",
"message": "\"Workspace\" matches multiple custom properties (chat and ticket). Pass ?type=chat|ticket, or use the property_id, to disambiguate.",
"status": 422,
"fields": {
"property_id": {
"message": "\"Workspace\" matches multiple custom properties (chat and ticket). Pass ?type=chat|ticket, or use the property_id, to disambiguate."
}
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The property_id (e.g. property-xxxx) or the property_name of the custom property
Query Parameters
Specifies whether to resolve the chat or the ticket property when the same name exists under both
chat, ticket Body
- The new name of the property
- Must be unique within its type
"Workspace ID"
- The name of the section to move the property to
- Created automatically if it does not exist
"Issue Details"
- Whether the property is mandatory
- Supported only for ticket properties; rejected for chat properties
true
Was this page helpful?