Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

zendesk-node-api

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

zendesk-node-api

A wrapper library for Zendesk API using NodeJS

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.4K
increased by18.75%
Maintainers
1
Weekly downloads
 
Created
Source

Zendesk NodeJS API

A wrapper library for Zendesk using NodeJS

  • Tickets
  • Users

Getting started

Create a new instance of Zendesk, passing in your Zendesk URL, email and API token.

var zendesk = new Zendesk({
  url: YOUR_ZENDESK_URL,
  email: YOUR_ZENDESK_EMAIL,
  token: YOUR_ZENDESK_API_TOKEN
});

Tickets

These methods allow you to interact with tickets within Zendesk

List tickets

Returns a promise containing an array of all tickets in your Zendesk

zendesk.tickets.list().then(function(tickets){
  // Do something with tickets
});

Show a ticket

Returns a promise containing an object of a specific ticket

zendesk.tickets.show(TICKET_ID).then(function(ticket){
  // Do something with ticket
});

Create a ticket

Create a ticket inside Zendesk

zendesk.tickets.create({
  subject: 'A new ticket',
  comment: {
      body: 'A ticket created with zendesk-node-api'
  }
}).then(function(){
  console.log('Ticket created');
});

Update a ticket

Update a ticket inside Zendesk

zendesk.tickets.update(TICKET_ID, {
  comment: {
    body: 'Updated this ticket with zendesk-node-api'
  }
}).then(function(){
  console.log('Ticket updated');
});

Delete a ticket

Delete a ticket inside Zendesk

zendesk.tickets.delete(TICKET_ID).then(function(){
  console.log('Ticket deleted');
});

Users

These methods allow you to interact with users within Zendesk

List Users

Returns a promise containing an array of all users in your Zendesk

zendesk.users.list().then(function(users){
  // Do something with users
});

Show a user

Returns a promise containing an object of a specific user

zendesk.users.show(USER_ID).then(function(user){
  // Do something with user
});

Create a user

Create a user inside Zendesk

zendesk.users.create({
  name: 'API User',
  email: 'user@zendesknodeapi.com'
}).then(function(){
  console.log('User created');
});

Update a user

Update a user inside Zendesk

zendesk.users.update(USER_ID, {
  email: 'updatedemail@zendesknodeapi.com'
}).then(function(){
  console.log('User updated');
});

Delete a user

Delete a user inside Zendesk

zendesk.users.delete(USER_ID).then(function(){
  console.log('User deleted');
});

Keywords

FAQs

Package last updated on 03 Jun 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc