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

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;
} 

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()
});

Python

Python
import dataclasses

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

@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]
Are we missing anything? Let us know
Was this page helpful?