Skip to main content
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();
{
  "success": true,
  "message": "Custom properties deleted",
  "data": {
    "deleted_count": 2,
    "properties": [
      {
        "property_ref": "Workspace",
        "property_id": "property-a1b2c3",
        "deleted": true,
        "reason": "not_found"
      }
    ]
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
ticket_properties
string[]
  • The ids or names of the ticket properties to delete
Example:
["Workspace", "property-a1b2c3"]
chat_properties
string[]
  • The ids or names of the chat properties to delete
Example:
["Workspace"]

Response

200 OK

success
boolean
Example:

true

message
string
Example:

"Custom properties deleted"

data
object