Raw schema
{
"type": "object",
"properties": {
"projectId": {
"description": "Project id to query analytics from. Required when access is ambiguous.",
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"view": {
"type": "string",
"enum": [
"overview",
"notifications",
"recipients",
"workflow_runs"
],
"description": "Analytics surface to query: overview cards, notification rows, recipient rows, or workflow run rows."
},
"channel": {
"description": "Notification channel for overview and notification analytics. Defaults to email. Recipient analytics are email-only.",
"type": "string",
"enum": [
"email",
"slack"
]
},
"window": {
"description": "Relative analytics window. Defaults to 30d. Ignored when range is provided.",
"type": "string",
"enum": [
"1h",
"24h",
"7d",
"14d",
"30d",
"90d",
"all"
]
},
"range": {
"description": "Optional explicit timestamp range. Overrides window and is applied to the view's primary timestamp.",
"type": "object",
"properties": {
"from": {
"description": "Inclusive ISO timestamp lower bound.",
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"to": {
"description": "Inclusive ISO timestamp upper bound.",
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
}
}
},
"timeZone": {
"description": "IANA timezone for daily series bucketing. Defaults to UTC.",
"type": "string",
"minLength": 1,
"maxLength": 64
},
"filters": {
"description": "Optional analytics filters. Unsupported combinations return a clear error.",
"type": "object",
"properties": {
"workflowIds": {
"description": "Workflow ids to include.",
"maxItems": 100,
"type": "array",
"items": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"workflowRunId": {
"description": "Workflow run id to include for notification analytics.",
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"workflowStepRunId": {
"description": "Workflow step run id to include for notification analytics.",
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"topicIds": {
"description": "Email unsubscribe topic ids to include.",
"maxItems": 100,
"type": "array",
"items": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"notificationStatuses": {
"description": "Email notification lifecycle statuses to include.",
"maxItems": 7,
"type": "array",
"items": {
"type": "string",
"enum": [
"sent",
"pending",
"releasable",
"failed",
"canceled",
"suppressed",
"opted_out"
]
}
},
"recipient": {
"description": "Email recipient search string.",
"type": "string",
"maxLength": 320
},
"engagement": {
"description": "Email engagement filter.",
"type": "string",
"enum": [
"undelivered",
"bounced",
"complained",
"clicked",
"opened"
]
},
"slackWebhookIds": {
"description": "Slack webhook ids to include for Slack notification analytics.",
"maxItems": 100,
"type": "array",
"items": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"runStatuses": {
"description": "Workflow run statuses to include. Only applies to workflow_runs.",
"maxItems": 6,
"type": "array",
"items": {
"type": "string",
"enum": [
"RUNNING",
"PAUSED",
"COMPLETED",
"FAILED",
"SKIPPED",
"CANCELLED"
]
}
},
"startedAt": {
"description": "Workflow run started timestamp range. Only applies to workflow_runs.",
"type": "object",
"properties": {
"from": {
"description": "Inclusive ISO timestamp lower bound.",
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"to": {
"description": "Inclusive ISO timestamp upper bound.",
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
}
}
}
}
},
"sort": {
"description": "Optional row sort. Overview ignores sorting.",
"type": "object",
"properties": {
"field": {
"type": "string",
"enum": [
"timestamp",
"sentTo",
"subject",
"workflow",
"engagement",
"recipient",
"lastSentAt",
"sent",
"opened",
"clicked",
"bounced",
"complained"
],
"description": "Sort field. Valid fields depend on the requested view."
},
"dir": {
"description": "Sort direction. Defaults to desc.",
"type": "string",
"enum": [
"asc",
"desc"
]
}
},
"required": [
"field"
]
},
"limit": {
"description": "Maximum rows to return. Defaults to 25 and is capped at 100.",
"type": "integer",
"minimum": 1,
"maximum": 100
},
"cursor": {
"description": "Opaque pagination cursor from a previous get_analytics response.",
"type": "string",
"minLength": 1,
"maxLength": 2048
},
"include": {
"description": "Optional response sections to include. Defaults depend on the requested view.",
"maxItems": 5,
"type": "array",
"items": {
"type": "string",
"enum": [
"summary",
"series",
"rows",
"recentEvents",
"segments"
]
}
}
},
"required": [
"view"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}