Pipedrive API Documentation

Pipedrive's API Docs

Welcome to Pipedrive's Developer Documentation. Here you'll find comprehensive guides and documentation to help you start working with Pipedrive's API, as well as the Changelog to see any relevant changes regarding the public API.

How to get the company domain

There are a few methods for getting the value of the subdomain for a Pipedrive company for which we use the company_domain parameter:

Method 1

You can get it manually from the Pipedrive app by logging into your Developer Sandbox account and see the URL:

Method 2

You can fetch it via GET /users/me. Just copy the code below to your favorite editor and don't forget to replace the text with your actual API token. Execute the code and get the company_domain from the output:


$api_token = 'Your API token';
$url = 'https://api.pipedrive.com/v1/users/me?api_token=' . $api_token;

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

echo 'Sending request...' . PHP_EOL;

$output = curl_exec($ch);

$result = json_decode($output, true);

if (!empty($result['data']['company_domain'])) {
  echo 'User company_domain is: ' . $result['data']['company_domain'] . PHP_EOL;

You can check the /users/me response JSON here.

Method 3

If you’re using OAuth authorization you can get the company_domain in the OAuth server's response when making a HTTP request to it.
In the JSON response body company_domain will be a part of the api_domain parameter's value.
More info can be found about it in the getting the OAuth tokens and refreshing the OAuth tokens sections.

Updated 5 months ago

How to get the company domain

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.