Get campaign analytics

GET/v1/campaigns/{campaign_id}/analysis
Scope: campaigns:read

Aggregate 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

  • AuthorizationstringRequired

    Bearer followed by a space and your API key, for example Bearer vk_….

Path parameters

  • campaign_idstring · uuidRequired

    ID of the campaign.

Query parameters

  • date_filterstring or null

    Count from this point onwards: a number of days such as 7d, 30d or 90d, or an ISO 8601 timestamp. Answers 400 INVALID_DATE_FILTER if it can't be parsed.

    at most 64 charactersExample "30d"
  • variationstring or null

    Limit the counts to one A/B variation. Answers 400 INVALID_VARIATION for any other value.

    at most 32 charactersExample "a"One of"a""b""unassigned""all"

Response

200

  • campaign_idstringRequired
  • analysisobject or null

    Aggregate analytics for one campaign, counted by each lead's first event of a kind inside the window.

    Show 6 child attributes
    • by_variationobject or null

      Per-arm breakdown keyed by A/B arm: 'a', 'b', 'unassigned' (leads with no arm yet)

    • channelsobject or null
      Show 2 child attributes
      • emailobject or null
        Show 5 child attributes
        • open_rate_pctnumber or null
        • openedinteger or null
        • positive_leadsinteger or null
        • replied_leadsinteger or null
        • sentinteger or null
      • linkedinobject or null
        Show 7 child attributes
        • accept_rate_pctnumber or null
        • acceptedinteger or null
        • connected_leadsinteger or null
        • messagesinteger or null
        • positive_leadsinteger or null
        • replied_leadsinteger or null
        • requestsinteger or null

          Connection requests sent

    • funnelobject or null
      Show 8 child attributes
      • contactedinteger or null
      • enrolledinteger or null
      • meeting_rate_pctnumber or null

        meetings / positive; null when there were no positives

      • meetingsinteger or null
      • positiveinteger or null
      • positive_rate_pctnumber or null

        positive / contacted; null when nobody was contacted

      • repliedinteger or null
      • reply_rate_pctnumber or null

        replied / contacted; null when nobody was contacted

    • leadsobject or null
      Show 5 child attributes
      • activeinteger or null
      • completedinteger or null
      • enrolledinteger or null
      • not_contactedinteger or null
      • pausedinteger or null
    • repliesobject or null
      Show 5 child attributes
      • negativeinteger or null
      • neutralinteger or null
      • ooointeger or null

        Out-of-office replies

      • positiveinteger or null
      • totalinteger or null
    • windowobject or null
      Show 3 child attributes
      • fromstring · date-time or null

        Start of the window; null = all time

      • tostring · date-time or null

        End of the window; null = now

      • variationstring or null

        The A/B arm the report covers: 'a', 'b', 'unassigned', or 'all'

        One of"a""b""unassigned""all"null
  • successboolean
    Default true

Errors

Errors share one JSON body: success, error, message, optional details, and request_id.

StatusCodeMeaning
400VALIDATION_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. details.errors lists each failing field with its field, message and type.

400INVALID_DATE_FILTER

date_filter must be a number of days such as 30d, or an ISO 8601 timestamp.

400INVALID_VARIATION

variation must be one of a, b, unassigned or all.

401UNAUTHORIZED

The Authorization header is missing or malformed, or the API key is unknown or has been deactivated.

401API_KEY_EXPIRED

The API key is past its expiry date. Create a new key in the Victoria AI app.

403INSUFFICIENT_SCOPE

The API key doesn't have the scope this endpoint requires, such as leads:write.

403ORGANIZATION_DEACTIVATED

The organization that owns this API key has been deactivated.

404CAMPAIGN_NOT_FOUND

No campaign with this ID exists in your organization.

404NOT_FOUND

No endpoint matches the path. A resource ID in the path that isn't a valid UUID also answers NOT_FOUND.

429RATE_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 Retry-After header. See Rate limits.

500INTERNAL_ERROR

Something failed on our side. The response never includes internal details; quote its request_id when you contact support.

503UPSTREAM_TIMEOUT

A service the API depends on timed out. The request is safe to retry.

503AUTH_UNAVAILABLE

The API key couldn't be checked because the authentication service was unavailable. The request is safe to retry.

Response headers

HeaderDescription
X-Request-ID

Correlation ID for the request, also returned as request_id in error bodies. Send your own X-Request-ID, up to 128 letters, digits, ., _, : or -, and it's used instead.

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 429: seconds to wait before retrying.