superwall

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Superwall

Superwall

API Access

API 访问

A bash helper is included at
{baseDir}/scripts/sw-api.sh
. It wraps the Superwall REST API V2.
Requires:
SUPERWALL_API_KEY
environment variable (org-scoped bearer token).
bash
undefined
{baseDir}/scripts/sw-api.sh
路径下包含一个bash辅助脚本,它封装了Superwall REST API V2。
要求:需设置
SUPERWALL_API_KEY
环境变量(组织级别的Bearer令牌)。
bash
undefined

List all routes with methods (fetches live OpenAPI spec, no API key needed)

列出所有带请求方法的路由(获取实时OpenAPI规范,无需API密钥)

{baseDir}/scripts/sw-api.sh --help
{baseDir}/scripts/sw-api.sh --help

Show full spec for a specific route (params, request body, responses)

查看特定路由的完整规范(参数、请求体、响应)

{baseDir}/scripts/sw-api.sh --help /v2/projects
{baseDir}/scripts/sw-api.sh --help /v2/projects

List all projects (start here to discover the org structure)

列出所有项目(从此处开始了解组织架构)

{baseDir}/scripts/sw-api.sh /v2/projects
{baseDir}/scripts/sw-api.sh /v2/projects

Get a specific project (includes its applications)

获取特定项目信息(包含其关联的应用)

{baseDir}/scripts/sw-api.sh /v2/projects/{id}
{baseDir}/scripts/sw-api.sh /v2/projects/{id}

Create a project

创建项目

{baseDir}/scripts/sw-api.sh -m POST -d '{"name":"My Project"}' /v2/projects
{baseDir}/scripts/sw-api.sh -m POST -d '{"name":"My Project"}' /v2/projects

Update a project

更新项目

{baseDir}/scripts/sw-api.sh -m PATCH -d '{"name":"Renamed"}' /v2/projects/{id}

The `--help` flag requires `jq`.
{baseDir}/scripts/sw-api.sh -m PATCH -d '{"name":"Renamed"}' /v2/projects/{id}

使用`--help`标志需要依赖`jq`工具。

Data hierarchy

数据层级

Organization → Projects → Applications. Each application has a
platform
(ios, android, flutter, react_native, web), a
bundle_id
, and a
public_api_key
(used for SDK initialization — distinct from the org API key used for REST calls).
组织 → 项目 → 应用。每个应用包含
platform
(ios、android、flutter、react_native、web)、
bundle_id
以及
public_api_key
(用于SDK初始化——与REST调用使用的组织API密钥不同)。

Bootstrap workflow

引导工作流

  1. Call
    GET /v2/projects
    to list all projects
  2. Find the project matching the user's context
  3. Inspect its
    applications
    array to find the right platform
  4. Use the application's
    public_api_key
    for SDK init, the org
    SUPERWALL_API_KEY
    for REST API calls
  1. 调用
    GET /v2/projects
    列出所有项目
  2. 找到与用户上下文匹配的项目
  3. 查看其
    applications
    数组,找到对应的平台
  4. 使用应用的
    public_api_key
    进行SDK初始化,使用组织的
    SUPERWALL_API_KEY
    进行REST API调用

Pagination

分页

Cursor-based. Responses include
has_more
. Pass
limit
(1-100),
starting_after
, or
ending_before
as query params.

基于游标分页。响应结果包含
has_more
字段。可通过查询参数传递
limit
(1-100)、
starting_after
ending_before

API Key Setup

API密钥设置

API keys are org-scoped — one key grants access to all projects and applications in the organization.
  • Get an API key:
    https://superwall.com/select-application?pathname=/applications/:app/settings/api-keys
  • Store the key as
    SUPERWALL_API_KEY
    in the environment.

API密钥是组织级别的——一个密钥即可访问组织内的所有项目和应用。
  • 获取API密钥:访问
    https://superwall.com/select-application?pathname=/applications/:app/settings/api-keys
  • 将密钥存储为环境变量
    SUPERWALL_API_KEY

Documentation

文档

All Superwall documentation is available in machine-readable formats. Do not hardcode doc content — always fetch live.
ResourceURLUse when
Doc index
https://superwall.com/docs/llms.txt
Finding the right doc page for a topic
Full docs
https://superwall.com/docs/llms-full.txt
Need comprehensive context across many topics
Single page
curl -sL https://superwall.com/docs/{path}.md
Reading a specific doc page
所有Superwall文档均提供机器可读格式。请勿硬编码文档内容——始终获取实时内容。
资源URL使用场景
文档索引
https://superwall.com/docs/llms.txt
查找对应主题的文档页面
完整文档
https://superwall.com/docs/llms-full.txt
需要跨多个主题的全面上下文信息
单页文档
curl -sL https://superwall.com/docs/{path}.md
阅读特定文档页面

Platform doc prefixes

平台文档前缀

  • iOS:
    /docs/ios/
  • Android:
    /docs/android/
  • Flutter:
    /docs/flutter/
  • Expo:
    /docs/expo/
  • React Native:
    /docs/react-native/
  • Dashboard:
    /docs/dashboard/
  • Web Checkout:
    /docs/web-checkout/
  • Integrations:
    /docs/integrations/
Tip: Fetch
llms.txt
first to find the exact path, then fetch that page with
curl -sL
.

  • iOS:
    /docs/ios/
  • Android:
    /docs/android/
  • Flutter:
    /docs/flutter/
  • Expo:
    /docs/expo/
  • React Native:
    /docs/react-native/
  • 仪表盘:
    /docs/dashboard/
  • Web结账:
    /docs/web-checkout/
  • 集成:
    /docs/integrations/
提示:先获取
llms.txt
找到准确路径,再使用
curl -sL
获取对应页面。

SDK Integration

SDK集成

For SDK integration, use the platform-specific quickstart skills when available:
PlatformSkill
iOS (Swift/ObjC)
superwall-ios-quickstart
Android (Kotlin/Java)
superwall-android-quickstart
Flutter
superwall-flutter-quickstart
Expo
superwall-expo-quickstart
For platforms without a dedicated skill (React Native), or when the quickstart skills are not installed, follow the live-doc workflow in references/sdk-integration.md.

对于SDK集成,优先使用平台专属的快速入门技能:
平台技能
iOS (Swift/ObjC)
superwall-ios-quickstart
Android (Kotlin/Java)
superwall-android-quickstart
Flutter
superwall-flutter-quickstart
Expo
superwall-expo-quickstart
对于没有专属技能的平台(如React Native),或未安装快速入门技能时,请遵循references/sdk-integration.md中的实时文档工作流。

Dashboard Links

仪表盘链接

URL patterns for linking users to Superwall dashboard pages. See references/dashboard-links.md.

用于引导用户访问Superwall仪表盘页面的URL模式,请参考references/dashboard-links.md

SDK Source (for debugging)

SDK源码(用于调试)

Clone SDK repos locally to trace internal behavior. See references/sdk-source.md.

本地克隆SDK仓库以追踪内部行为,请参考references/sdk-source.md

Webhooks & Integrations

Webhooks与集成

Live integration catalog (same source the Superwall dashboard pulls from):
bash
curl -s https://webhooks.superwall.me/integrations
Always fetch live — do not cache.
For general webhook and event documentation, fetch from the docs:
  • Webhook setup:
    curl -sL https://superwall.com/docs/integrations/webhooks.md
  • Event catalog: Fetch
    https://superwall.com/docs/llms.txt
    and search for "events" or "analytics" to find the full event type reference
实时集成目录(与Superwall仪表盘使用的数据源相同):
bash
curl -s https://webhooks.superwall.me/integrations
始终获取实时内容——请勿缓存。
关于Webhook和事件的通用文档,可从以下文档获取:
  • Webhook设置
    curl -sL https://superwall.com/docs/integrations/webhooks.md
  • 事件目录:获取
    https://superwall.com/docs/llms.txt
    并搜索"events"或"analytics"以找到完整的事件类型参考