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 updateTicket() {
  const response = await client.ticket.update({
    ticket_id: 'BKT-001',
    assignee: '[email protected]'
  });

  console.log(response);
}

updateTicket();
{}

Authorizations

Authorization
string
header
required

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

Path Parameters

ticket_id
string
required
  • The unique identifier of the ticket
Example:

"BKT-001"

Body

application/json
assignee
string
  • Update the assignee of the ticket. Must be an email of a user in the organization
Example:

""

due_date
any | null
  • Updates the due date of the ticket.
  • Must be a string that can be parsed to a date
Example:

null

labels
string
  • A comma-separated list of labels to be assigned to the tickets. All labels are case-insensitive.
  • If any label currently does not exist, it will be created
Example:

""

priority
string
  • Updates the priority of the ticket.
  • Only accepts the following values - 1,2,3,4
    • 1 = Low
    • 2 = Medium
    • 3 = High
    • 4 = Urgent
Example:

"2"

status
string
  • Updates the status of the ticket.
  • Only accepts the following values - open, inprogress, closed, archived
Example:

""

subject
string
  • Updates the subject of the ticket
Example:

"New subject 1"

Response

200 - application/json

200 OK

The response is a ticket object. Refer to the ticket object here