Skip to main content

Zenduty API

Zenduty API

Zenduty API

Zenduty actively maintains a REST API, providing developers the ability to supplement and deploy Zenduty in sync with other tools and services. Building with the Zenduty REST API allows you to create and update incidents, users, teams, services, integrations, schedules, escalations, and automate your workflows using simple scripts.

For a detailed guide, refer to the Zenduty API documentation and reach out to us if you have any queries while building.

Postman Collection

Zenduty also supports a Postman Collection to make building with our API easier. Postman's Collection folders conveniently keep our API requests and elements organized, and are essentially Executable API Descriptions.

To access the Zenduty API via the Postman Collection, follow these steps -

Generating the API Key

  1. Login to your Zenduty account. Navigate to your account page from the Zenduty dashboard in the top right corner.

  2. Click on the API Keys section, and then click on Create a new API key.

  3. Give a name to your new API key and then click Create.

  4. Copy the newly generated API key and save it in a secure location(you will not be able to retrieve the same API key again).

The API key is commonly confused with an integration key.

- An API key enables you to access Zenduty's API endpoints, build automations and fetch information associated with your account.
- An integration key on the other hand is a unique identifier created for each integration inside a service, and is used to send and receive alerts over webhooks.

Importing the Zenduty API Postman Collection

  1. Clone the zenduty-api-postman repository from GitHub.

  2. Open your Postman app and navigate to the Collections section.

  3. Navigate to the cloned project in your local machine. Import the Zenduty API.postman_collection.json file.

Adding the API Key to access the Zenduty API

  1. Click on the Zenduty API collection in your Postman app.

  2. Navigate to the Authorization tab. In the Value section, replace (Your API key here) with the API Key copied from Zenduty. The Value section should look like Token xxxxxxxxxxx.

  3. Click on Save.

Example Use-Cases

We can now use the Zenduty API calls to harness the information we want to build upon.

Let's try and get the list of all users on-call right now under a particular team.

  1. Expand the Teams folder in the Zenduty API collection and select the List Teams request.

  2. Everything is pre-filled, all you need to do is click on the Send button.

  3. In the response, we get a list of all teams inside the account. Copy the "team" UUID for a team you'd like to check the on-call users for.

  4. Now, expand the On Call folder and select the List Details of On-call request.

  5. Replace the team_id placeholder in the URL with your chosen team's UUID and click on Send.

  6. In the responses, we get a list of all the users on-call under different escalation policies in the chosen team.

We can build upon this as we require, like for essence, building an email script that fetches this list of people on-call and sends it to the team managers periodically.