Skip to content

Varmply Backend API (0.1.0)

Varmply API – MVP backend for campaigns, wallets, authentication, and influencer participation.

Error Messages

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)

Download OpenAPI description
Languages
Servers
Mock server
https://docs-staging.varmply.com/_mock/openapi/
Local development server
http://localhost:3000/
Staging environment
https://api-staging.varmply.com/
Production environment
https://api.varmply.com/
Operations

Authentication

User registration, authentication, and email verification

Operations

Onboarding

User onboarding flow for all user types, including role assignment, profile setup (creator and sponsor), and settings configuration

Operations

Connections

Social media platform connection status and management

Operations

OAuth

Social media OAuth connection flows

Operations

Wallet

Wallet balance and operations

Operations

Campaigns

Campaign creation, management, and funding

Operations

Marketplace

Public marketplace for discovering and joining campaigns

Operations

Participation

Campaign participation and content submission (creator-focused)

Operations

Analytics

Analytics and reporting endpoints for campaigns, participations, and submissions

Operations

Metrics

Metrics ingestion and refresh endpoints for participations and campaigns

Operations

Notifications

User notification management endpoints

Operations

Dev

Development-only endpoints for testing (not available in production)

Operations

Request

Fund a wallet for the authenticated user. This endpoint is only available in non-production environments. Returns 403 if called in production. Requires a valid JWT access token. The wallet must already exist for the user and currency (no auto-create). Creates a ledger-backed transaction to record the funding.

Security
bearerAuth
Bodyapplication/jsonrequired
currencyCodestringrequired

ISO currency code for the wallet

Enum"NGN""USD"
Example: "NGN"
amountCentsinteger>= 1required

Amount to fund in cents (must be positive)

Example: 500000
curl -i -X POST \
  https://docs-staging.varmply.com/_mock/openapi/dev/wallets/fund \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "currencyCode": "NGN",
    "amountCents": 500000
  }'

Responses

Wallet funded successfully

Bodyapplication/json
walletIdstringrequired

Unique identifier for the wallet

Example: "wallet_abc123"
userIdstringrequired

User identifier who owns the wallet

Example: "user_123"
currencyCodestringrequired

ISO currency code

Enum"NGN""USD"
Example: "NGN"
availableBalanceAmountCentsintegerrequired

Updated available balance in cents

Example: 500000
lockedBalanceAmountCentsintegerrequired

Locked balance in cents (unchanged)

Example: 0
createdAtTimestampstring(date-time)required

ISO 8601 timestamp when the wallet was created

Example: "2024-01-01T00:00:00Z"
lastUpdatedAtTimestampstring(date-time)required

ISO 8601 timestamp when the wallet was last updated

Example: "2024-01-01T00:00:00Z"
Response
application/json
{ "walletId": "wallet_abc123", "userId": "user_123", "currencyCode": "NGN", "availableBalanceAmountCents": 500000, "lockedBalanceAmountCents": 0, "createdAtTimestamp": "2024-01-01T00:00:00Z", "lastUpdatedAtTimestamp": "2024-01-01T00:00:00Z" }