SubXDocs

REST API

SubX REST API endpoint reference. All requests are JSON format and require authentication.

Authentication

Two authentication methods are supported:

MethodHeaderUsage
JWT 토큰Authorization: Bearer <token>Dashboard logged-in users
API 키X-API-Key: your_api_keyServer-side / SDK / MCP integration

Base URL

https://api.subx.dev

Authentication

MethodPathDescription
POST/auth/registerRegister
POST/auth/loginLogin (issue JWT)
POST/auth/refreshRefresh JWT token
GET/auth/meGet current user info

Projects

MethodPathDescription
GET/v1/projectsList projects
POST/v1/projectsCreate project
GET/v1/projects/:idGet project details
PATCH/v1/projects/:idUpdate project
DELETE/v1/projects/:idDelete project
GET/v1/projects/:id/setup-statusGet setup progress status

API Keys

MethodPathDescription
GET/v1/projects/:id/api-keysList API keys
POST/v1/projects/:id/api-keysCreate API key (full key only shown immediately after creation)
DELETE/v1/projects/:id/api-keys/:keyIdDelete API key

Apps

MethodPathDescription
GET/v1/projects/:id/appsList apps
POST/v1/projects/:id/appsRegister app (iOS/Android)
GET/v1/projects/:id/apps/:appIdGet app details
PATCH/v1/projects/:id/apps/:appIdUpdate app settings
DELETE/v1/projects/:id/apps/:appIdDelete app
POST/v1/projects/:id/apps/:appId/credentials/appleRegister Apple credentials
POST/v1/projects/:id/apps/:appId/credentials/googleRegister Google credentials
GET/v1/projects/:id/apps/:appId/credentials/statusGet credentials and notification status
DELETE/v1/projects/:id/apps/:appId/credentialsDelete credentials

App Settings

The following settings can be changed via PATCH /v1/projects/:id/apps/:appId:

FieldTypeDescription
notificationForwardingUrlstring | nullForwards Apple/Google store notifications to this URL as well
refundPolicyenumrevoke_immediately (default) or keep_until_expiry
appleSmallBusinessbooleanApple Small Business Program (15% commission)

Products

MethodPathDescription
GET/v1/projects/:id/productsList products
POST/v1/projects/:id/productsCreate product
GET/v1/projects/:id/products/:pidGet product details
DELETE/v1/projects/:id/products/:pidDelete product
POST/v1/projects/:id/products/:pid/pricesAdd price
DELETE/v1/projects/:id/products/:pid/prices/:priceIdDelete price

Entitlements

MethodPathDescription
GET/v1/projects/:id/entitlementsList entitlements
POST/v1/projects/:id/entitlementsCreate entitlement
GET/v1/projects/:id/entitlements/:eidGet entitlement details
PATCH/v1/projects/:id/entitlements/:eidUpdate entitlement
DELETE/v1/projects/:id/entitlements/:eidDelete entitlement
GET/v1/projects/:id/entitlements/:eid/productsList attached products
POST/v1/projects/:id/entitlements/:eid/productsAttach product
DELETE/v1/projects/:id/entitlements/:eid/productsDetach product

Offerings

MethodPathDescription
GET/v1/projects/:id/offeringsList offerings
POST/v1/projects/:id/offeringsCreate offering
PATCH/v1/projects/:id/offerings/:oidUpdate offering
GET/v1/projects/:id/offerings/:oid/packagesList packages
POST/v1/projects/:id/offerings/:oid/packagesCreate package
DELETE/v1/projects/:id/offerings/:oid/packages/:pidDelete package
POST/v1/projects/:id/offerings/:oid/packages/:pid/productsAttach product to package
DELETE/v1/projects/:id/offerings/:oid/packages/:pid/productsDetach product from package

Paywalls

MethodPathDescription
GET/v1/projects/:id/paywallsList paywalls
POST/v1/projects/:id/paywallsCreate paywall
GET/v1/projects/:id/paywalls/:pwidGet paywall details
PATCH/v1/projects/:id/paywalls/:pwidUpdate paywall
DELETE/v1/projects/:id/paywalls/:pwidDelete paywall

Customers

MethodPathDescription
GET/v1/projects/:id/customersList customers (search, pagination)
GET/v1/projects/:id/customers/:cidGet customer details (including subscriptions, entitlements)

Webhooks

MethodPathDescription
GET/v1/projects/:id/webhooksList webhooks
POST/v1/projects/:id/webhooksCreate webhook
GET/v1/projects/:id/webhooks/:widGet webhook details
PATCH/v1/projects/:id/webhooks/:widUpdate webhook
DELETE/v1/projects/:id/webhooks/:widDelete webhook

Experiments (A/B Testing)

MethodPathDescription
GET/v1/projects/:id/experimentsList experiments
POST/v1/projects/:id/experimentsCreate experiment
GET/v1/projects/:id/experiments/:eidGet experiment details
PATCH/v1/projects/:id/experiments/:eidUpdate experiment
DELETE/v1/projects/:id/experiments/:eidDelete experiment
POST/v1/projects/:id/experiments/:eid/variantsAdd variant
DELETE/v1/projects/:id/experiments/:eid/variants/:vidDelete variant

Metrics & Charts

MethodPathDescription
GET/v1/projects/:id/metrics/overviewDashboard overview metrics
GET/v1/projects/:id/metrics/chartsAvailable chart types (21 types)
GET/v1/projects/:id/metrics/charts/:chartIdGet chart data (specify period and interval)

Subscribers (SDK)

MethodPathDescription
GET/v1/subscribers/:appUserIdGet subscriber info
POST/v1/subscribers/:appUserIdCreate/update subscriber
POST/v1/subscribers/:appUserId/attributesSet custom attributes
POST/v1/subscribers/:appUserId/entitlementsGrant promotional entitlement
DELETE/v1/subscribers/:appUserId/entitlements/:eidRevoke promotional entitlement
POST/v1/subscribers/:appUserId/receiptsSubmit store receipt

SDK Offerings

MethodPathDescription
GET/v1/offeringsGet current offering (API key auth)
GET/v1/offerings/:oid/paywallsGet offering paywalls
GET/v1/subscribers/:appUserId/offeringsGet offerings by subscriber
POST/v1/eventsRecord custom event

Store Notifications

MethodPathDescription
POST/v1/store/apple/:tokenApple S2S notification endpoint
POST/v1/store/google/:tokenGoogle S2S notification endpoint

Request Examples

Create Product

POST https://api.subx.dev/v1/projects/:projectId/products
Content-Type: application/json
X-API-Key: your_api_key

{
  "appId": "app_xyz789",
  "storeProductId": "com.example.pro.monthly",
  "displayName": "Pro Monthly",
  "type": "subscription"
}

Update App Settings

PATCH https://api.subx.dev/v1/projects/:projectId/apps/:appId
Content-Type: application/json
X-API-Key: your_api_key

{
  "notificationForwardingUrl": "https:1
  6: "keep_until_expiry",
  "appleSmallBusiness": true
}

Error Responses

All errors are returned in the following format:

{
  "statusCode": 400,
  "message": "Validation failed",
  "error": "Bad Request"
}
Status CodeDescription
400Bad Request (missing required fields, validation failure)
401Unauthorized (missing or expired token/API key)
403Forbidden
404Resource not found
500Internal Server Error

Next Steps

  • Webhooks — 서버에서 구독 이벤트를 수신합니다.
  • SDK Integration — iOS/Android 앱에 SubX SDK를 연동합니다.
  • Store Setup — App Store Connect / Google Play Console 설정 방법을 확인합니다.
REST API | SubX