Skip to content

Varmply Backend API (0.1.0)

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

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/

Health

Health check endpoints

Operations

Authentication

User registration and authentication

Operations

Wallet

Wallet balance and operations

Operations

Dev

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

Operations

Campaigns

Campaign creation, management, and funding

Operations

Participation

Campaign participation and content submission

Operations

OAuth

Social media OAuth connection flows

Operations

Start Instagram OAuth connect flow

Request

Initiates the Instagram OAuth connect flow for an authenticated user. Returns an authorization URL that the client should redirect the user to. The user will authorize the app on Instagram and be redirected back to the callback endpoint.

Security
bearerAuth
Bodyapplication/jsonrequired
redirectPathstring^/required

Relative path (e.g., "/dashboard") where the user should be redirected after OAuth completion

Example: "/dashboard"
curl -i -X POST \
  https://docs-staging.varmply.com/_mock/openapi/oauth/instagram/start \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "redirectPath": "/dashboard"
  }'

Responses

Authorization URL generated successfully

Bodyapplication/json
authorizationUrlstring(uri)required

URL to redirect the user to for Instagram authorization

Example: "https://api.instagram.com/oauth/authorize?client_id=xxx&redirect_uri=xxx&scope=xxx&response_type=code&state=xxx"
Response
application/json
{ "authorizationUrl": "https://api.instagram.com/oauth/authorize?client_id=xxx&redirect_uri=xxx&scope=xxx&response_type=code&state=xxx" }

Handle Instagram OAuth callback

Request

Handles the OAuth callback from Instagram after user authorization. Exchanges the authorization code for access tokens, fetches user profile, and creates/updates the social account. Redirects to the redirect URI specified in the original request with a status query parameter.

Query
codestringrequired

Authorization code returned by Instagram

Example: code=AQBx...
statestringrequired

State token for CSRF protection and context

Example: state=eyJhbGc...
curl -i -X GET \
  'https://docs-staging.varmply.com/_mock/openapi/oauth/instagram/callback?code=AQBx...&state=eyJhbGc...'

Responses

Redirect to the redirect URI with status query parameter

Headers
Locationstring(uri)

Redirect URI with status=success or status=error

Example: "https://app.example.com/dashboard?status=success"
Response
No content

Metrics

Content metrics and analytics endpoints

Operations