About

Getting started

The DevRev API is organized around REST. Our API has predictable resource-oriented URLs, accepts form-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes and authentication. If you're new to DevRev APIs, you've come to the right place. Our APIs serve as the foundation for integrating your apps, building automations, and creating custom snap-ins. Start your journey by going through the entities page, where you can get familiar with the basic concepts and terminologies used in the API documentation. You can also refer to our Postman collection.

Base URL
https://api.devrev.ai

Let's get started with DevRev APIs.

Prerequisites

First, create a DevRev account or log in.

Every call to a DevRev API must include a PAT. After you create your account, generate a personal access token and store it in a safe place.

In this guide, you’ll make a call to the dev-users.self API which gets the authenticated user's information. You will retrieve the user object created for your account on DevRev. This user object contains information such as a unique identifier, full name, display name, and profile picture.

Every object in DevRev is uniquely identified by an id known as DevRev Object Notation (DON). DON id can be found in the API response. The value SELF can be passed in as id to reference the logged-in user.

The display-id shown in the UI for work item objects such as issues and tickets can be used interchangeably with the id to enhance usability. In the image below, ISS-69 serves as an example of a display-id for issues.

Display ID in DevRev UI

Next, you'll want to set up your development environment to connect and interact with the DevRev API.

Send your first API request

To do this, make a GET request to the DevRev server ("https://api.devrev.ai/dev-users.self") and include the PAT created in the authorization header of the request.

This guide shows you how to get user information with a GET request using two popular languages as well as cURL:

Making a GET request

curl --location --request GET 'https://api.devrev.ai/dev-users.self' \
--header 'Authorization: <PAT>'

If everything works, the command line displays the following response for a user named "John Smith Doe":

Response
{
"dev_user": {
"display_handle": "John Doe",
"created_date": "2022-01-28T10:45:53.698Z",
"modified_date": "2022-01-28T10:45:53.698Z",
"profile_picture": "<logo-url-here>",
"auth0_user_ids": [
"auth0|abcd1234eca43c006913f97d"
],
"id": "don:identity:dvrv-us-1:devo/20:devu/40",
"display_id": "DEVU-40",
"state": "active",
"full_name": "John Smith Doe",
"email": "JohnDoe@devrev.ai"
}
}

The response contains "id": "don:identity:dvrv-us-1:devo/20:devu/40",. The id identifies the devo ID (Dev organization ID) as devo/<devo-id> and the devu ID (Dev user ID) as devu/<devu-id>. In the present response, devo/<devo-id> is 20, and devu/<devu-id> is 40, respectively.

In general, you can find devo, devu, revo, revu IDs in the id or external_ref fields of the API response.

Facing an error while authenticating the APIs? Refer to our errors guide to learn more about our error codes.

Next steps

You’re all set to explore our platform. Go through the entities page, where you can get familiar with the basic concepts and terminologies used in the API documentation. Visit methods page to browse through our APIs and build your first integration with DevRev.