TypeScript
import { PeriskopeApi } from '@periskope/periskope-client';
const client = new PeriskopeApi({
authToken: 'YOUR_API_KEY',
});
async function main() {
const response = await client.properties.updatePropertyOptions({
property_id: 'property-aaaaaaaaaaaa',
operation: 'add',
options: [
'Example Corp',
'Globex',
],
});
console.log(response);
}
main();curl -X POST 'https://api.periskope.app/v1/properties/property-aaaaaaaaaaaa/options' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"operation": "add",
"options": [
"Example Corp",
"Globex"
]
}'{
"success": true,
"message": "Options updated",
"data": {
"property_id": "property-aaaaaaaaaaaa",
"operation": "add",
"options": [
{
"id": "1755859200000",
"label": "Example Corp",
"added": null,
"removed": null
}
]
}
}
Custom Property APIs
Update Property Options
Adds or removes options on a dropdown or picklist property. Adding is idempotent on the label (case-insensitive).
TypeScript
import { PeriskopeApi } from '@periskope/periskope-client';
const client = new PeriskopeApi({
authToken: 'YOUR_API_KEY',
});
async function main() {
const response = await client.properties.updatePropertyOptions({
property_id: 'property-aaaaaaaaaaaa',
operation: 'add',
options: [
'Example Corp',
'Globex',
],
});
console.log(response);
}
main();curl -X POST 'https://api.periskope.app/v1/properties/property-aaaaaaaaaaaa/options' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"operation": "add",
"options": [
"Example Corp",
"Globex"
]
}'{
"success": true,
"message": "Options updated",
"data": {
"property_id": "property-aaaaaaaaaaaa",
"operation": "add",
"options": [
{
"id": "1755859200000",
"label": "Example Corp",
"added": null,
"removed": null
}
]
}
}
Authorizations
Path Parameters
The property_id (property-xxxxxxxxxxxxxxxx) or the name (case-insensitive) of the custom property. Prefer the property_id — a name that exists as both a chat and a ticket property is ambiguous without the type query parameter.
Minimum string length:
1Example:
"property-aaaaaaaaaaaa"
Query Parameters
Body
application/json
Was this page helpful?