Get campaign analytics
/v1/campaigns/{campaign_id}/analysisAggregate counts for a campaign: lead states, funnel counts and rates, reply sentiment, per-channel email and LinkedIn stats, and a breakdown per A/B variation. There's no daily timeline and no individual replies.
Rates are null when their denominator is zero.
Headers
AuthorizationstringRequiredBearerfollowed by a space and your API key, for exampleBearer vk_….
Path parameters
campaign_idstring · uuidRequiredID of the campaign.
Query parameters
date_filterstring or nullCount from this point onwards: a number of days such as
7d,30dor90d, or an ISO 8601 timestamp. Answers400 INVALID_DATE_FILTERif it can't be parsed.at most 64 charactersExample"30d"variationstring or nullLimit the counts to one A/B variation. Answers
400 INVALID_VARIATIONfor any other value.at most 32 charactersExample"a"One of"a""b""unassigned""all"
Response
200
campaign_idstringRequiredanalysisobject or nullAggregate analytics for one campaign, counted by each lead's first event of a kind inside the window.
Show 6 child attributesHide child attributes
by_variationobject or nullPer-arm breakdown keyed by A/B arm: 'a', 'b', 'unassigned' (leads with no arm yet)
channelsobject or nullShow 2 child attributesHide child attributes
emailobject or nullShow 5 child attributesHide child attributes
open_rate_pctnumber or nullopenedinteger or nullpositive_leadsinteger or nullreplied_leadsinteger or nullsentinteger or null
linkedinobject or nullShow 7 child attributesHide child attributes
accept_rate_pctnumber or nullacceptedinteger or nullconnected_leadsinteger or nullmessagesinteger or nullpositive_leadsinteger or nullreplied_leadsinteger or nullrequestsinteger or nullConnection requests sent
funnelobject or nullShow 8 child attributesHide child attributes
contactedinteger or nullenrolledinteger or nullmeeting_rate_pctnumber or nullmeetings / positive; null when there were no positives
meetingsinteger or nullpositiveinteger or nullpositive_rate_pctnumber or nullpositive / contacted; null when nobody was contacted
repliedinteger or nullreply_rate_pctnumber or nullreplied / contacted; null when nobody was contacted
leadsobject or nullShow 5 child attributesHide child attributes
activeinteger or nullcompletedinteger or nullenrolledinteger or nullnot_contactedinteger or nullpausedinteger or null
repliesobject or nullShow 5 child attributesHide child attributes
negativeinteger or nullneutralinteger or nullooointeger or nullOut-of-office replies
positiveinteger or nulltotalinteger or null
windowobject or nullShow 3 child attributesHide child attributes
fromstring · date-time or nullStart of the window; null = all time
tostring · date-time or nullEnd of the window; null = now
variationstring or nullThe A/B arm the report covers: 'a', 'b', 'unassigned', or 'all'
One of"a""b""unassigned""all"null
successbooleanDefaulttrue
Errors
Errors share one JSON body: success, error, message, optional details, and request_id.
| Status | Code | Meaning |
|---|---|---|
| 400 | VALIDATION_ERROR | The request didn't match the endpoint's schema: a missing or malformed field, a bad query parameter, or a value out of range. |
| 400 | INVALID_DATE_FILTER |
|
| 400 | INVALID_VARIATION |
|
| 401 | UNAUTHORIZED | The |
| 401 | API_KEY_EXPIRED | The API key is past its expiry date. Create a new key in the Victoria AI app. |
| 403 | INSUFFICIENT_SCOPE | The API key doesn't have the scope this endpoint requires, such as |
| 403 | ORGANIZATION_DEACTIVATED | The organization that owns this API key has been deactivated. |
| 404 | CAMPAIGN_NOT_FOUND | No campaign with this ID exists in your organization. |
| 404 | NOT_FOUND | No endpoint matches the path. A resource ID in the path that isn't a valid UUID also answers |
| 429 | RATE_LIMITED | Too many requests for this API key: more than 100 a minute to one endpoint, or 600 a minute in total. Retry after the number of seconds in the |
| 500 | INTERNAL_ERROR | Something failed on our side. The response never includes internal details; quote its |
| 503 | UPSTREAM_TIMEOUT | A service the API depends on timed out. The request is safe to retry. |
| 503 | AUTH_UNAVAILABLE | The API key couldn't be checked because the authentication service was unavailable. The request is safe to retry. |
Response headers
| Header | Description |
|---|---|
X-Request-ID | Correlation ID for the request, also returned as |
RateLimit-Limit | Requests allowed to this endpoint per minute. |
RateLimit-Remaining | Requests you can still send to this endpoint right now. |
RateLimit-Reset | Seconds until the endpoint's full limit is available again. |
Retry-After | On a |