API Reference
Auto-generated
Creator
API reference for creator endpoints.
Auto-generated
This page was generated from the OpenAPI spec. Run
make generate-docs to refresh after spec changes.GET /api/v1/creator/analytics
GET
/api/v1/creator/analyticsGet Creator Analytics
Request Example
Bash
curl -X GET https://api.alterlab.io/api/v1/creator/analytics \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json"Response Example
JSON
{
"arr_cents": 0,
"mrr_cents": 0,
"subscriber_count": 0,
"churn_rate_pct": 0,
"ltv_cents": 0,
"mrr_trend": []
}POST /api/v1/creator/connect/onboard
POST
/api/v1/creator/connect/onboardStart Onboarding
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| country_code | string | Optional | ISO 3166-1 alpha-2 country code (e.g. 'US', 'GB')Default: US |
| return_url | string | Optional | URL Stripe redirects to after onboarding is completedDefault: https://alterlab.io/store/sell?connect=return |
| refresh_url | string | Optional | URL Stripe redirects to if the onboarding link expiresDefault: https://alterlab.io/store/sell?connect=refresh |
Request Example
Bash
curl -X POST https://api.alterlab.io/api/v1/creator/connect/onboard \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"country_code": "example_country_code",
"return_url": "example_return_url",
"refresh_url": "example_refresh_url"
}'Response Example
JSON
{
"onboarding_url": "example",
"stripe_account_id": "example",
"message": "example",
"next_action": "example"
}GET /api/v1/creator/connect/status
GET
/api/v1/creator/connect/statusGet Connect Status
Request Example
Bash
curl -X GET https://api.alterlab.io/api/v1/creator/connect/status \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json"Response Example
JSON
{
"has_connect_account": true,
"onboarding_status": "example",
"kyc_verified": true,
"payout_eligible": true,
"eligibility_reason": "example",
"pending_balance_cents": 0
}GET /api/v1/creator/earnings
GET
/api/v1/creator/earningsGet Earnings Summary
Request Example
Bash
curl -X GET https://api.alterlab.io/api/v1/creator/earnings \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json"Response Example
JSON
{
"total_earned_cents": 0,
"pending_balance_cents": 0,
"paid_cents": 0,
"yearly_earnings_cents": 0,
"is_1099_eligible": true,
"onboarding_status": "example"
}GET /api/v1/creator/earnings/listings
GET
/api/v1/creator/earnings/listingsGet Listing Earnings
Request Example
Bash
curl -X GET https://api.alterlab.io/api/v1/creator/earnings/listings \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json"Response Example
JSON
{
"listings": [],
"subscription_earned_cents": 0
}GET /api/v1/creator/listing-plans/{listing_id}
GET
/api/v1/creator/listing-plans/{listing_id}Get Listing Plans
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| listing_id | string | Required | listing_id |
Request Example
Bash
curl -X GET https://api.alterlab.io/api/v1/creator/listing-plans/<listing_id> \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json"Response Example
JSON
{
"status": "ok"
}GET /api/v1/creator/storefront
GET
/api/v1/creator/storefrontGet My Storefront
Request Example
Bash
curl -X GET https://api.alterlab.io/api/v1/creator/storefront \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json"Response Example
JSON
{
"id": "example",
"user_id": "example",
"slug": "example",
"display_name": "example",
"bio": "example",
"logo_url": "example"
}PUT /api/v1/creator/storefront
PUT
/api/v1/creator/storefrontUpsert My Storefront
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| slug | string | Required | URL-safe identifier (used in /s/{{slug}}). Alphanumeric and hyphens only. Application normalises via python-slugify. |
| display_name | string | Required | Creator display name shown on the storefront page. |
| bio | string | Optional | bio |
| logo_url | string | Optional | logo_url |
| accent_color | string | Optional | accent_color |
| is_published | boolean | Optional | When True the storefront is visible at /s/{{slug}}.Default: False |
Request Example
Bash
curl -X PUT https://api.alterlab.io/api/v1/creator/storefront \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"slug": "example_slug",
"display_name": "example_display_name"
}'Response Example
JSON
{
"id": "example",
"user_id": "example",
"slug": "example",
"display_name": "example",
"bio": "example",
"logo_url": "example"
}POST /api/v1/creator/subscribe/{plan_id}
POST
/api/v1/creator/subscribe/{plan_id}Subscribe To Plan
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| plan_id | string | Required | plan_id |
| success_url | string | Required | URL to redirect to after successful subscription |
| cancel_url | string | Required | URL to redirect to if subscriber cancels checkout |
Request Example
Bash
curl -X POST https://api.alterlab.io/api/v1/creator/subscribe/<plan_id> \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"success_url": "example_success_url",
"cancel_url": "example_cancel_url"
}'Response Example
JSON
{
"checkout_url": "example",
"message": "example"
}GET /api/v1/creator/subscription-metrics
GET
/api/v1/creator/subscription-metricsGet Subscription Metrics
Request Example
Bash
curl -X GET https://api.alterlab.io/api/v1/creator/subscription-metrics \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json"Response Example
JSON
{
"subscriber_count": 0,
"mrr_cents": 0,
"ltv_cents": 0,
"churn_rate_pct": 0,
"plans": []
}POST /api/v1/creator/subscription-plans
POST
/api/v1/creator/subscription-plansCreate Subscription Plan
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| name | string | Required | Plan display name shown to potential subscribers |
| monthly_price_cents | integer | Required | Monthly price in USD cents (minimum $1.00 = 100 cents) |
| description | string | Optional | description |
| listing_id | string | Optional | listing_id |
| included_results_per_month | integer | Optional | included_results_per_month |
Request Example
Bash
curl -X POST https://api.alterlab.io/api/v1/creator/subscription-plans \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "example_name",
"monthly_price_cents": 0
}'Response Example
JSON
{
"status": "ok"
}GET /api/v1/creator/subscription-plans
GET
/api/v1/creator/subscription-plansList Subscription Plans
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| include_archived | boolean | Optional | Include archived (inactive) plansDefault: False |
Request Example
Bash
curl -X GET https://api.alterlab.io/api/v1/creator/subscription-plans \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json"Response Example
JSON
{
"status": "ok"
}PATCH /api/v1/creator/subscription-plans/{plan_id}/archive
PATCH
/api/v1/creator/subscription-plans/{plan_id}/archiveArchive Subscription Plan
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| plan_id | string | Required | plan_id |
Request Example
Bash
curl -X PATCH https://api.alterlab.io/api/v1/creator/subscription-plans/<plan_id>/archive \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json"Response Example
JSON
{
"plan_id": "example",
"name": "example",
"description": "example",
"monthly_price_cents": 0,
"stripe_price_id": "example",
"is_active": true
}