GET/ companies-by-id/ :custom_id/
Get company by id
You can return specific company details by using the company custom_id.
Attributes
Optional unless marked required
- custom_id
- The unique identifier for the company which is provided by the client.
Request
- cURL
- JavaScript
- PHP
- Python
curl -X GET "https://<your_app_subdomain>.user.com/api/public/companies-by-id/:custom_id/" \
-H "Authorization: Token <your_64_char_api_key>" \
-H "Accept: */*; version=2"
const response = await fetch(
"https://<your_app_subdomain>.user.com/api/public/companies-by-id/:custom_id/",
{
method: "GET",
headers: {
Authorization: "Token <your_64_char_api_key>",
Accept: "*/*; version=2",
},
},
);
const data = await response.json();
console.log(data);
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://<your_app_subdomain>.user.com/api/public/companies-by-id/:custom_id/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Token <your_64_char_api_key>",
"Accept: */*; version=2",
],
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;
import requests
response = requests.get(
"https://<your_app_subdomain>.user.com/api/public/companies-by-id/:custom_id/",
headers={
"Authorization": "Token <your_64_char_api_key>",
"Accept": "*/*; version=2",
},
)
print(response.json())
Response examples
- 200 OK
- 404 Not Found
{"id": 34,"name": "Acme Inc","description": "Online store selling outdoor gear.","email": null,"country": null,"region": null,"city": null,"address": null,"postal_code": null,"size": 10,"created_at": "2026-11-09T13:40:25.713466Z","updated_at": "2026-11-09T13:40:25.713494Z","tags": [],"employees": [],"phone_numbers": null,"custom_id": "acme-inc","assigned_to": null}{
"detail": "Not found."
}
Response fields
Fields returned in the 200 OK response body.
- id
- A unique identifier for the company which is given by User automatically.
- name
- A company name.
- description
- A description of a company.
- A company’s email address.
- country
- A company country of residence.
- region
- A company region of residence.
- city
- A company city of residence.
- address
- A company’s address.
- postal_code
- A postal code according to the address of your company..
- size
- An approximate size of your company.
- created_at
- A creation date of a company.
- updated_at
- A date of last company update.
- tags
- A list of tags associated with a company
- employees
- IDs of the contacts who belong to the company.
- phone_numbers
- A list of phone numbers.
- custom_id
- The unique identifier for the company which is provided by the client.
- assigned_to
- ID of the agent group the company is assigned to.
note
Errors that can come from any endpoint (401, 429, 500, 502, 504) are described in HTTP response codes.