Fill in the parameters and request body fields on this page to change this example.
curl CLI Python Node.js Ruby PHP
Example request Copy curl --request GET \
--url 'https://a.klaviyo.com/api/object-types/01K5YKKQKM819VVGCPZZKGE6D4/relationships/object-types' \
--header 'Authorization: Klaviyo-API-Key your-private-api-key' \
--header 'accept: application/vnd.api+json' \
--header 'revision: 2026-10-15' Klaviyo CLI Copy klaviyo custom-objects get-object-type-relationships 01K5YKKQKM819VVGCPZZKGE6D4 Sign in first with klaviyo auth login. Install the Klaviyo CLI
Python SDK Copy from klaviyo_api import KlaviyoAPI
klaviyo = KlaviyoAPI ( "your-private-api-key" )
response = klaviyo. Custom_Objects. get_object_type_relationships ( "01K5YKKQKM819VVGCPZZKGE6D4" ) Install it with pip install klaviyo-api. The Python SDK on GitHub
Node.js SDK Copy import { ApiKeySession, CustomObjectsApi } from 'klaviyo-api'
const session = new ApiKeySession ('your-private-api-key' )
const customObjectsApi = new CustomObjectsApi (session)
const response = await customObjectsApi .getObjectTypeRelationships ('01K5YKKQKM819VVGCPZZKGE6D4' )Install it with npm install klaviyo-api. The Node.js SDK on GitHub
Ruby SDK Copy require 'klaviyo-api-sdk'
KlaviyoAPI . configure do | config|
config. api_key ['Klaviyo-API-Key' ] = 'Klaviyo-API-Key your-private-api-key'
end
response = KlaviyoAPI :: CustomObjects . get_object_type_relationships ('01K5YKKQKM819VVGCPZZKGE6D4' )Install it with gem install klaviyo-api-sdk. The Ruby SDK on GitHub
PHP SDK Copy <? php
require_once (__DIR__ . '/vendor/autoload.php' );
use KlaviyoAPI \ KlaviyoAPI ;
$klaviyo = new KlaviyoAPI ( 'your-private-api-key' ) ;
$response = $klaviyo-> CustomObjects-> getObjectTypeRelationships ( '01K5YKKQKM819VVGCPZZKGE6D4' ) ;Install it with composer require klaviyo/api. The PHP SDK on GitHub