Health check endpoints
Varmply Backend API (0.1.0)
Varmply API – MVP backend for campaigns, wallets, authentication, and influencer participation.
Common error codes: - NOT_FOUND - Resource not found (404) - VALIDATION_ERROR - Input validation failed (400) - PERMISSION_DENIED - User lacks permission (403) - CONFLICT - Resource conflict (409) - UNAUTHORIZED - Authentication required (401) - INTERNAL_SERVER_ERROR - Unexpected server error (500)
Request
Returns read-only analytics summary for a campaign, including aggregated metrics totals and participation-level breakdown. Only the campaign owner can view analytics. Returns aggregated metrics from the latest snapshot per participation. All timestamps are in UTC (ISO 8601 format with Z suffix).
- Mock serverhttps://docs-staging.varmply.com/_mock/openapi/analytics/campaigns/{campaignId}/summary
- Local development serverhttp://localhost:3000/analytics/campaigns/{campaignId}/summary
- Staging environmenthttps://api-staging.varmply.com/analytics/campaigns/{campaignId}/summary
- Production environmenthttps://api.varmply.com/analytics/campaigns/{campaignId}/summary
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
https://docs-staging.varmply.com/_mock/openapi/analytics/campaigns/campaign_abc123/summary \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'Campaign analytics summary
Sum of impressions across all participations with metrics
Sum of reach across all participations with metrics
Sum of likes across all participations with metrics
Sum of comments across all participations with metrics
Sum of shares across all participations with metrics
Number of participations that have at least one metrics snapshot
Total number of participations in the campaign (regardless of metrics presence)
Ratio of participations with metrics to total participations (0-1)
Earliest fetchedAtTimestamp across all snapshots, or null if no snapshots
List of participation analytics views, one per participation that has metrics
Unique identifier for the participation
Unique identifier for the influencer user
External media ID from the latest snapshot
Impressions from the latest snapshot
Comments from the latest snapshot
Last time metrics were synced for this participation (from participation entity)
{ "summary": { "campaignId": "campaign_abc123", "totalImpressions": 2592, "totalReach": 2023, "totalLikes": 192, "totalComments": 112, "totalSaves": 24, "totalShares": 5, "participationCountWithMetrics": 3, "totalParticipationCount": 5, "metricsCoverageRatio": 0.6, "earliestSnapshotFetchedAtTimestamp": "2025-11-26T23:39:30.449Z", "latestSnapshotFetchedAtTimestamp": "2025-11-27T10:12:02.100Z" }, "participationAnalyticsList": [ { … } ] }
Request
Returns a read-only payout preview for a campaign showing calculated payouts per participation based on metrics and a default payout formula, compared against available escrow balance. Only the campaign owner can view payout previews. This endpoint does not execute any payouts.
- Mock serverhttps://docs-staging.varmply.com/_mock/openapi/analytics/campaigns/{campaignId}/payout-preview
- Local development serverhttp://localhost:3000/analytics/campaigns/{campaignId}/payout-preview
- Staging environmenthttps://api-staging.varmply.com/analytics/campaigns/{campaignId}/payout-preview
- Production environmenthttps://api.varmply.com/analytics/campaigns/{campaignId}/payout-preview
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
https://docs-staging.varmply.com/_mock/openapi/analytics/campaigns/campaign_abc123/payout-preview \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'Campaign payout preview
Total requested payout amount across all participations in cents
Shortfall amount if escrow is insufficient (0 if escrow covers all payouts)
List of participation payout previews
Unique identifier for the participation
Unique identifier for the influencer user
External media ID from the latest snapshot
Impressions from the latest snapshot
Last time metrics were synced for this participation
FetchedAtTimestamp of the latest snapshot
{ "campaignId": "campaign_abc123", "campaignCurrencyCode": "NGN", "escrowAvailableAmountCents": 5000000, "totalRequestedPayoutAmountCents": 3200000, "shortfallAmountCents": 0, "participationPayoutList": [ { … } ] }
- Mock serverhttps://docs-staging.varmply.com/_mock/openapi/submissions/{submissionId}/analytics
- Local development serverhttp://localhost:3000/submissions/{submissionId}/analytics
- Staging environmenthttps://api-staging.varmply.com/submissions/{submissionId}/analytics
- Production environmenthttps://api.varmply.com/submissions/{submissionId}/analytics
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://docs-staging.varmply.com/_mock/openapi/submissions/submission_abc123/analytics?from=2024-01-01T00%3A00%3A00Z&to=2024-01-15T00%3A00%3A00Z&bucket=DAY' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'Submission analytics retrieved successfully
Unique identifier for the participation
Platform type for the submission
Original content URL submitted by the creator
Bucket granularity for timeseries aggregation.
Normalized Varmply metric key.
Start of the aggregation window (inclusive, UTC)
End of the aggregation window (exclusive, UTC)
Value for the metric in this window (null if unavailable)
True if derived from an incomplete window (e.g. range cuts a bucket boundary)
Timestamp of the most recent snapshot fetchedAtTimestamp (UTC)
Timestamp of the most recent ingestion attempt (UTC)
Timestamp of the most recent successful ingestion (UTC)
Last failure reason mapped into a stable enum (null if none)
{ "submission_id": "submission_abc123", "participation_id": "participation_xyz789", "campaign_id": "campaign_abc123", "platform": "INSTAGRAM", "content_url": "https://instagram.com/p/example", "status": "ACCEPTED", "metrics": { "totals": { … }, "timeseries": { … } }, "money": { "accrued_cents": 5000, "paid_cents": 0, "blocked_cents": 0, "blocked_reason_code": null }, "freshness": { "last_snapshot_at": "2024-01-01T12:00:00Z", "last_attempt_at": "2024-01-01T12:10:00Z", "last_success_at": "2024-01-01T12:00:00Z", "last_failure_reason": null, "freshness_status": "FRESH" } }