import { PeriskopeApi } from '@periskope/periskope-client';
const client = new PeriskopeApi({
authToken: 'YOUR_API_KEY',
});
async function main() {
const response = await client.properties.createProperty({
name: 'Workspace',
type: 'ticket',
kind: 'dropdown',
});
console.log(response);
}
main();curl -X POST 'https://api.periskope.app/v1/properties/create' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"name": "Workspace",
"type": "ticket",
"kind": "dropdown"
}'{
"success": true,
"message": "Custom property created",
"data": {
"property_id": "property-aaaaaaaaaaaa",
"property_name": "Workspace",
"type": "ticket",
"kind": "dropdown",
"mandatory": false,
"section_id": "00000000-0000-0000-0000-000000000000",
"section_name": "Issue Details",
"options": [
{
"id": "1755859200000",
"label": "Example Corp"
},
{
"id": "1755859200001",
"label": "Globex"
}
],
"created_at": "2026-01-15T09:30:00.000Z"
}
}{
"code": "UNAUTHORIZED_ERROR",
"message": "Invalid bearer auth token",
"status": 401
}{
"code": "CONFLICT_ERROR",
"message": "A custom property with the same name already exists for the type",
"status": 409
}{
"code": "VALIDATION_ERROR",
"message": "Request validation failed",
"status": 422,
"fields": {
"body.chat_id": {
"message": "chat_id is required"
}
}
}{
"code": "RATE_LIMIT_ERROR",
"message": "You can only make 100 requests per second",
"status": 429
}{
"code": "UNKNOWN_ERROR",
"message": "Internal server error",
"status": 500
}Create Custom Property
Creates a custom property for chats or tickets. Options apply to dropdown and picklist kinds.
import { PeriskopeApi } from '@periskope/periskope-client';
const client = new PeriskopeApi({
authToken: 'YOUR_API_KEY',
});
async function main() {
const response = await client.properties.createProperty({
name: 'Workspace',
type: 'ticket',
kind: 'dropdown',
});
console.log(response);
}
main();curl -X POST 'https://api.periskope.app/v1/properties/create' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"name": "Workspace",
"type": "ticket",
"kind": "dropdown"
}'{
"success": true,
"message": "Custom property created",
"data": {
"property_id": "property-aaaaaaaaaaaa",
"property_name": "Workspace",
"type": "ticket",
"kind": "dropdown",
"mandatory": false,
"section_id": "00000000-0000-0000-0000-000000000000",
"section_name": "Issue Details",
"options": [
{
"id": "1755859200000",
"label": "Example Corp"
},
{
"id": "1755859200001",
"label": "Globex"
}
],
"created_at": "2026-01-15T09:30:00.000Z"
}
}{
"code": "UNAUTHORIZED_ERROR",
"message": "Invalid bearer auth token",
"status": 401
}{
"code": "CONFLICT_ERROR",
"message": "A custom property with the same name already exists for the type",
"status": 409
}{
"code": "VALIDATION_ERROR",
"message": "Request validation failed",
"status": 422,
"fields": {
"body.chat_id": {
"message": "chat_id is required"
}
}
}{
"code": "RATE_LIMIT_ERROR",
"message": "You can only make 100 requests per second",
"status": 429
}{
"code": "UNKNOWN_ERROR",
"message": "Internal server error",
"status": 500
}Authorizations
Your Periskope API token, sent as Authorization: Bearer <token>. Generate one from the Periskope dashboard under Settings → API & Webhooks. API access requires an active Pro or Enterprise plan.
Body
Name of the property. Must be unique within its type (compared case-insensitively, stored trimmed) — the same name can exist once as a chat property and once as a ticket property.
1"Workspace"
Whether the property appears on chats ('chat') or on tickets ('ticket')
chat, ticket "ticket"
Value kind of the property: 'text', 'date', 'file', 'dropdown' (single choice from options) or 'picklist' (multiple choices from options). The 'dependent_dropdown' kind cannot be created via the API.
text, date, file, dropdown, picklist "dropdown"
Name of the section to place the property under — sections group properties in the dashboard. Matched case-insensitively against existing sections of the same type; created automatically if it does not exist.
"Issue Details"
Whether the property must be filled in. Supported only for ticket properties — mandatory: true for a chat property is rejected. Defaults to false.
false
Initial option labels. Required (at least one non-empty label) for dropdown and picklist kinds; not allowed for other kinds. Duplicate labels (case-insensitive) are collapsed into one option.
["Example Corp", "Globex"]
Was this page helpful?