Node.js
import { PeriskopeApi } from '@periskope/periskope-client';
const client = new PeriskopeApi({
authToken: 'YOUR_API_KEY',
phone: 'YOUR_PHONE_NUMBER', // e.g., '919876543210'
});
async function createCustomProperty() {
const response = await client.property.create({
name: 'Workspace',
type: 'ticket',
kind: 'dropdown',
section: 'Issue Details',
options: ['Acme Corp', 'Globex']
});
console.log(response);
}
createCustomProperty();curl -X POST \
https://api.periskope.app/v1/properties/create \
-H 'Authorization: Bearer <token>' \
-H 'Content-Type: application/json' \
-H 'x-phone: YOUR_PHONE_NUMBER' \
-d '{
"name": "Workspace",
"type": "ticket",
"kind": "dropdown",
"section": "Issue Details",
"options": ["Acme Corp", "Globex"]
}'{
"success": true,
"message": "Custom property created",
"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": "CONFLICT_ERROR",
"message": "A ticket custom property named \"Workspace\" already exists",
"status": 409
}{
"code": "VALIDATION_ERROR",
"message": "dropdown properties require at least one non-empty option",
"status": 422,
"fields": {
"options": {
"message": "dropdown properties require at least one non-empty option"
}
}
}Custom Property APIs
Create Custom Property
This endpoint creates a custom property in your workspace
For dropdown and picklist kinds, provide the initial option list in options - these kinds cannot be created without at least one option
The property name must be unique within its type. The same name can exist once as a chat property and once as a ticket property
mandatory is supported only for ticket properties. Passing mandatory: true for a chat property returns a validation error
The dependent_dropdown kind cannot be created via the API
Node.js
import { PeriskopeApi } from '@periskope/periskope-client';
const client = new PeriskopeApi({
authToken: 'YOUR_API_KEY',
phone: 'YOUR_PHONE_NUMBER', // e.g., '919876543210'
});
async function createCustomProperty() {
const response = await client.property.create({
name: 'Workspace',
type: 'ticket',
kind: 'dropdown',
section: 'Issue Details',
options: ['Acme Corp', 'Globex']
});
console.log(response);
}
createCustomProperty();curl -X POST \
https://api.periskope.app/v1/properties/create \
-H 'Authorization: Bearer <token>' \
-H 'Content-Type: application/json' \
-H 'x-phone: YOUR_PHONE_NUMBER' \
-d '{
"name": "Workspace",
"type": "ticket",
"kind": "dropdown",
"section": "Issue Details",
"options": ["Acme Corp", "Globex"]
}'{
"success": true,
"message": "Custom property created",
"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": "CONFLICT_ERROR",
"message": "A ticket custom property named \"Workspace\" already exists",
"status": 409
}{
"code": "VALIDATION_ERROR",
"message": "dropdown properties require at least one non-empty option",
"status": 422,
"fields": {
"options": {
"message": "dropdown properties require at least one non-empty option"
}
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
- The name of the property
- Must be unique within its type (chat/ticket)
Example:
"Workspace"
- The type the property belongs to
Available options:
chat, ticket Example:
"ticket"
- The value kind of the property
dropdownis single-select,picklistis multi-select
Available options:
text, date, file, dropdown, picklist Example:
"dropdown"
- The name of the section to place the property under
- Created automatically if it does not exist
Example:
"Issue Details"
- Whether the property is mandatory
- Supported only for ticket properties; rejected for chat properties
- Defaults to false
Example:
false
- The initial option labels
- Required (at least one non-empty label) for dropdown and picklist kinds
- Not allowed for other kinds
Example:
["Acme Corp", "Globex"]
Was this page helpful?