Apicall data model

Updated:

FieldTypeRequiredDescription
idstringNoUnique identifier for this API call (read-only)
created_atstring (date-time)NoThe date that this object was created (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format) (read-only)
connection_idstringNo
workspace_idstringNo(reference to KmsSpace) (read-only)
integration_typestringYesThe integration type
external_xrefstringNoyour customer's user ID
namestringYesThe called name of the API method
pathstringYesThe called API method's HTTP verb and route path (PUT /crm/{integration}/deak/{id})
sizenumberNoThe size of the response
statusstringYesThe resulting HTTP status code (200)
errorstringNoThe error description (if status code is >= 400)
ip_addressstringNo
typeenumYesThe type of API Call being logged Values: login, webhook, inbound, mcp
methodstringYes
environmentstringNo
webhook_idstringNo
is_billablebooleanNo
user_agentstringNo
unified_response_timenumberNo
endapi_response_timenumberNo
key_idstringNoThe ID of the API key that made this call (never the key itself)
auth_methodenumNoHow the call was authenticated Values: session, enterprise_managed, service_key, api_key, legacy_api_key, mcp_connection_token
user_idstringNoThe workspace user ID for the caller when known (omitted for service keys) (reference to HrisEmployee)
query_paramsstring[]NoNames of the query-string parameters sent with this API call (eg. updated_gte, offset). Values are not stored.

TypeScript

TypeScript
export type ApiCall = {
	id?: string; // Unique identifier for this API call
	created_at?: string-time; // The date that this object was created (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
	connection_id?: string;
	workspace_id?: string; // (reference to KmsSpace)
	integration_type: string; // The integration type
	external_xref?: string; // your customer's user ID
	name: string; // The called name of the API method
	path: string; // The called API method's HTTP verb and route path (PUT /crm/{integration}/deak/{id})
	size?: number; // The size of the response
	status: string; // The resulting HTTP status code (200)
	error?: string; // The error description (if status code is >= 400)
	ip_address?: string;
	type: 'login' | 'webhook' | 'inbound' | 'mcp'; // The type of API Call being logged
	method: string;
	environment?: string;
	webhook_id?: string;
	is_billable?: boolean;
	user_agent?: string;
	unified_response_time?: number;
	endapi_response_time?: number;
	key_id?: string; // The ID of the API key that made this call (never the key itself)
	auth_method?: 'session' | 'enterprise_managed' | 'service_key' | 'api_key' | 'legacy_api_key' | 'mcp_connection_token'; // How the call was authenticated
	user_id?: string; // The workspace user ID for the caller when known (omitted for service keys) (reference to HrisEmployee)
	query_params?: string[]; // Names of the query-string parameters sent with this API call (eg. updated_gte, offset). Values are not stored.
} 

Zod

Zod
import { z } from 'zod';

export const ZodApiCall = z.object({
	id: z.string().optional().describe("Unique identifier for this API call"),
	created_at: z.string-time().optional().describe("The date that this object was created (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"),
	connection_id: z.string().optional(),
	workspace_id: z.string().optional().describe("(reference to KmsSpace)"),
	integration_type: z.string().describe("The integration type"),
	external_xref: z.string().optional().describe("your customer's user ID"),
	name: z.string().describe("The called name of the API method"),
	path: z.string().describe("The called API method's HTTP verb and route path (PUT /crm/{integration}/deak/{id})"),
	size: z.number().optional().describe("The size of the response"),
	status: z.string().describe("The resulting HTTP status code (200)"),
	error: z.string().optional().describe("The error description (if status code is >= 400)"),
	ip_address: z.string().optional(),
	type: z.enum("login", "webhook", "inbound", "mcp").describe("The type of API Call being logged"),
	method: z.string(),
	environment: z.string().optional(),
	webhook_id: z.string().optional(),
	is_billable: z.boolean().optional(),
	user_agent: z.string().optional(),
	unified_response_time: z.number().optional(),
	endapi_response_time: z.number().optional(),
	key_id: z.string().optional().describe("The ID of the API key that made this call (never the key itself)"),
	auth_method: z.enum("session", "enterprise_managed", "service_key", "api_key", "legacy_api_key", "mcp_connection_token").optional().describe("How the call was authenticated"),
	user_id: z.string().optional().describe("The workspace user ID for the caller when known (omitted for service keys) (reference to HrisEmployee)"),
	query_params: z.array().optional().describe("Names of the query-string parameters sent with this API call (eg. updated_gte, offset). Values are not stored.")
});

Python

Python
import dataclasses

@dataclasses.dataclass
class ApiCallType(str, Enum):
	login = 'login'
	webhook = 'webhook'
	inbound = 'inbound'
	mcp = 'mcp'

@dataclasses.dataclass
class ApiCallAuth_method(str, Enum):
	session = 'session'
	enterprise_managed = 'enterprise_managed'
	service_key = 'service_key'
	api_key = 'api_key'
	legacy_api_key = 'legacy_api_key'
	mcp_connection_token = 'mcp_connection_token'

@dataclasses.dataclass
class ApiCall:
	"""Unique identifier for this API call"""
	id: Optional[str]
	"""The date that this object was created (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"""
	created_at: Optional[str]
	connection_id: Optional[str]
	"""(reference to KmsSpace)"""
	workspace_id: Optional[str]
	"""The integration type"""
	integration_type: str
	"""your customer's user ID"""
	external_xref: Optional[str]
	"""The called name of the API method"""
	name: str
	"""The called API method's HTTP verb and route path (PUT /crm/{integration}/deak/{id})"""
	path: str
	"""The size of the response"""
	size: Optional[int]
	"""The resulting HTTP status code (200)"""
	status: str
	"""The error description (if status code is >= 400)"""
	error: Optional[str]
	ip_address: Optional[str]
	"""The type of API Call being logged"""
	type: ApiCallType
	method: str
	environment: Optional[str]
	webhook_id: Optional[str]
	is_billable: Optional[bool]
	user_agent: Optional[str]
	unified_response_time: Optional[int]
	endapi_response_time: Optional[int]
	"""The ID of the API key that made this call (never the key itself)"""
	key_id: Optional[str]
	"""How the call was authenticated"""
	auth_method: Optional[ApiCallAuth_method]
	"""The workspace user ID for the caller when known (omitted for service keys) (reference to HrisEmployee)"""
	user_id: Optional[str]
	"""Names of the query-string parameters sent with this API call (eg. updated_gte, offset). Values are not stored."""
	query_params: Optional[List[List[str]]]
Are we missing anything? Let us know
Was this page helpful?