TypeScript
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
}Custom Property APIs
Create Custom Property
Creates a custom property for chats or tickets. Options apply to dropdown and picklist kinds.
TypeScript
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
Body
application/json
Was this page helpful?