Health check endpoints
Varmply Backend API (0.1.0)
Varmply API – MVP backend for campaigns, wallets, authentication, and influencer participation.
Request
Refreshes metrics (impressions, reach, likes, comments, saves, shares) for a participation's submitted content. Fetches the latest metrics from the social media platform API and creates a snapshot. Requires the participation to have submitted content and the user to have a connected social account with valid OAuth tokens. Returns 200 OK with the created metrics snapshot on success.
- Mock serverhttps://docs-staging.varmply.com/_mock/openapi/metrics/participations/{participationId}/refresh
- Local development serverhttp://localhost:3000/metrics/participations/{participationId}/refresh
- Staging environmenthttps://api-staging.varmply.com/metrics/participations/{participationId}/refresh
- Production environmenthttps://api.varmply.com/metrics/participations/{participationId}/refresh
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://docs-staging.varmply.com/_mock/openapi/metrics/participations/participation_xyz789/refresh \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'Metrics refreshed successfully
Unique identifier for the metrics snapshot
Unique identifier for the participation
External media ID from the social platform (e.g., Instagram post ID)
When the metrics were fetched from the platform API
When the snapshot was created
{ "snapshot": { "snapshotId": "snapshot_abc123", "participationId": "participation_xyz789", "externalMediaId": "ABC123", "impressions": 1000, "reach": 850, "likes": 100, "comments": 20, "saves": 50, "shares": 10, "fetchedAtTimestamp": "2024-01-01T12:00:00Z", "createdAtTimestamp": "2024-01-01T12:00:00Z", "lastUpdatedAtTimestamp": "2024-01-01T12:00:00Z" } }
Request
Refreshes metrics for all eligible participations in a campaign. Eligible participations are those with Instagram content submissions and status APPROVED or COMPLETED. Processes participations sequentially and returns a summary of successful and failed refreshes. Only the campaign owner can refresh metrics for their campaign. Returns 200 OK with the refresh summary on success.
- Mock serverhttps://docs-staging.varmply.com/_mock/openapi/metrics/campaigns/{campaignId}/refresh
- Local development serverhttp://localhost:3000/metrics/campaigns/{campaignId}/refresh
- Staging environmenthttps://api-staging.varmply.com/metrics/campaigns/{campaignId}/refresh
- Production environmenthttps://api.varmply.com/metrics/campaigns/{campaignId}/refresh
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://docs-staging.varmply.com/_mock/openapi/metrics/campaigns/campaign_abc123/refresh \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'{ "campaignId": "campaign_abc123", "totalEligibleParticipationCount": 5, "successfulCount": 4, "failedCount": 1, "failedParticipationIdList": [ "participation_xyz789" ] }
- 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 comments 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
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": [ { … } ] }