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 deleteCustomProperties() {
const response = await client.property.delete({
ticket_properties: ['Workspace'],
chat_properties: ['Workspace']
});
console.log(response);
}
deleteCustomProperties();curl -X DELETE \
https://api.periskope.app/v1/properties \
-H 'Authorization: Bearer <token>' \
-H 'Content-Type: application/json' \
-H 'x-phone: YOUR_PHONE_NUMBER' \
-d '{
"ticket_properties": ["Workspace"],
"chat_properties": ["Workspace"]
}'{
"success": true,
"message": "Custom properties deleted",
"data": {
"deleted_count": 2,
"properties": [
{
"property_ref": "Workspace",
"property_id": "property-a1b2c3",
"deleted": true,
"reason": "not_found"
}
]
}
}{
"code": "VALIDATION_ERROR",
"message": "Provide at least one entry in ticket_properties or chat_properties",
"status": 422,
"fields": {
"properties": {
"message": "Provide at least one entry in ticket_properties or chat_properties"
}
}
}Custom Property APIs
Delete Custom Properties
This endpoint deletes one or more custom properties
Pass the ids or names of the properties to delete in ticket_properties and/or chat_properties. At least one of the two must be provided
Deleting a property is permanent. Any values set for it on tickets or chats are orphaned
Entries that do not match any property are reported with deleted: false and a reason, without failing the rest of the request
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 deleteCustomProperties() {
const response = await client.property.delete({
ticket_properties: ['Workspace'],
chat_properties: ['Workspace']
});
console.log(response);
}
deleteCustomProperties();curl -X DELETE \
https://api.periskope.app/v1/properties \
-H 'Authorization: Bearer <token>' \
-H 'Content-Type: application/json' \
-H 'x-phone: YOUR_PHONE_NUMBER' \
-d '{
"ticket_properties": ["Workspace"],
"chat_properties": ["Workspace"]
}'{
"success": true,
"message": "Custom properties deleted",
"data": {
"deleted_count": 2,
"properties": [
{
"property_ref": "Workspace",
"property_id": "property-a1b2c3",
"deleted": true,
"reason": "not_found"
}
]
}
}{
"code": "VALIDATION_ERROR",
"message": "Provide at least one entry in ticket_properties or chat_properties",
"status": 422,
"fields": {
"properties": {
"message": "Provide at least one entry in ticket_properties or chat_properties"
}
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Was this page helpful?