Skip to main content
GET
/
objects
/
{object_name}
/
records
/
{record_id}
cURL
curl --request GET \
  --url https://api.unifygtm.com/data/v1/objects/{object_name}/records/{record_id} \
  --header 'x-api-key: <api-key>'
import requests

url = "https://api.unifygtm.com/data/v1/objects/{object_name}/records/{record_id}"

headers = {"x-api-key": "<api-key>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};

fetch('https://api.unifygtm.com/data/v1/objects/{object_name}/records/{record_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.unifygtm.com/data/v1/objects/{object_name}/records/{record_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://api.unifygtm.com/data/v1/objects/{object_name}/records/{record_id}"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("x-api-key", "<api-key>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.unifygtm.com/data/v1/objects/{object_name}/records/{record_id}")
.header("x-api-key", "<api-key>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.unifygtm.com/data/v1/objects/{object_name}/records/{record_id}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'

response = http.request(request)
puts response.read_body
{
  "status": "success",
  "data": {
    "object": "<string>",
    "id": "<string>",
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z",
    "attributes": {}
  }
}
{
"status": "bad_request",
"errors": [
{
"code": "<string>",
"path": [
"<string>"
],
"object_api_name": "<string>",
"attribute_api_name": "<string>"
}
],
"message": "<string>"
}
{
"status": "unauthorized",
"message": "<string>"
}
{
"message": "<string>"
}
{
"status": "error",
"message": "<string>"
}

Overview

The get method retrieves a single record by its ID from the specified object. This is the most accurate way to fetch a specific record when you know its ID. If the record doesn’t exist, an error will be returned.

Examples

This retrieves a specific company record:
GET /objects/company/records/de885595-2d9a-4fb9-ae30-25ef18b6219b
{
  "status": "success",
  "data": {
    "object": "company",
    "id": "de885595-2d9a-4fb9-ae30-25ef18b6219b",
    "created_at": "2025-09-04T01:23:45Z",
    "updated_at": "2025-09-04T01:23:45Z",
    "attributes": {
      "name": "Unify",
      "domain": "unifygtm.com",
      "description": "A nice company with a top-notch API.",
      "status": "Active"
      // ...
    }
  }
}
This retrieves a record from a custom object:
GET /objects/product_user/records/6741cc39-b332-45a8-a439-75b69db998b1
{
  "status": "success",
  "data": {
    "object": "product_user",
    "id": "6741cc39-b332-45a8-a439-75b69db998b1",
    "created_at": "2025-09-04T01:23:45Z",
    "updated_at": "2025-09-04T01:23:45Z",
    "attributes": {
      "user_id": "6b2a2761-3cbe-481f-8a1e-b24859c674f8",
      "full_name": "Bob Smith",
      "email_address": "bob.smith@gmail.com",
      "plan": "free_tier"
      // ...
    }
  }
}

Usage

Authorizations

x-api-key
string
header
required

Path Parameters

object_name
string
required
record_id
string
required

Response

Response for a successful get operation.

Response for a successful get operation.

status
enum<string>
required
Available options:
success
data
object
required