SocialHub.AI

合规与许可 API 实时

阅读团队已发布的会员隐私/合规声明,并根据受监管的 v2 REST API 版本验证每位会员的同意情况。您的店铺、应用、数据仓库或后台系统可以获取当前声明,查看其版本历史记录,并使用经过审计的密钥准确确认会员同意的版本。

身份验证与范围

所有端点均位于 Flash API 主机上,并使用服务器端 API 密钥(Bearer)进行身份验证。团队始终源自密钥——绝不会在请求中发送密钥。两个只读范围控制访问权限:

  • privacy:read — 声明:当前版本、历史记录和特定版本。
  • consent:read — 会员的同意记录(版本、范围、状态、时间)。
# Every call uses a server-side API key (Bearer). teamId is derived from the key,
# never sent in the request. Two read scopes:
#   privacy:read  → the statement (current / history / a version)
#   consent:read  → a member's consent records
curl https://flash.socialhub.ai/api/v2/privacy/current \
  -H "Authorization: Bearer fl_live_your_key_here"

阅读声明

仅发布和存档版本——草稿绝不会公开,内容在离开 API 之前会进行清理(去除内部审核标记)。

GET https://flash.socialhub.ai/api/v2/privacy/current          # scope: privacy:read

# 200 — the current published statement (sanitized), or { "data": null } if none published.
{
  "data": {
    "id": "pol_…",
    "version": "v3",
    "versionSeq": 3,
    "status": "published",
    "locale": "en",
    "changeType": "material",
    "changeSummary": "Updated data-retention section",
    "effectiveAt": "2026-02-01T00:00:00.000Z",
    "contentHash": "…sha256…",
    "content": { "sections": [ { "key": "intro", "title": "…", "body": "…" } ] }
  }
}
GET https://flash.socialhub.ai/api/v2/privacy/policies         # scope: privacy:read

# 200 — version history, newest first (metadata only; published & archived — never drafts).
{
  "data": [
    { "id": "pol_3", "version": "v3", "versionSeq": 3, "status": "published",
      "changeType": "material", "effectiveAt": "2026-02-01T00:00:00.000Z", "contentHash": "…" },
    { "id": "pol_2", "version": "v2", "versionSeq": 2, "status": "archived",
      "changeType": "minor", "effectiveAt": "2026-01-01T00:00:00.000Z", "contentHash": "…" }
  ],
  "total": 2
}

GET https://flash.socialhub.ai/api/v2/privacy/policies/{id}    # one version, full sanitized content (404 for a draft id)

验证同意

确认成员同意的具体声明版本和范围。记录仅作为附加证据,即使成员删除记录,记录仍然有效;API 返回您需要验证的信息——不包含原始 IP 地址或用户代理(个人身份信息最小化)。

GET https://flash.socialhub.ai/api/v2/members/{id}/consents   # scope: consent:read

# 200 — the member's consent records, newest first. The evidence to VERIFY consent:
# which statement version + scopes, the method, status and time. No raw IP / user-agent.
{
  "data": [
    {
      "id": "con_…",
      "scopes": ["privacy_policy", "marketing_email"],
      "method": "register",
      "status": "active",                 // active | legacy_unverified | withdrawn
      "policyVersion": "v3",
      "policyVersionSeq": 3,
      "policyContentHash": "…sha256…",
      "consentedAt": "2026-02-02T10:30:00.000Z"
    }
  ]
}
# A member of another team (or unknown) → 404. No consents yet → { "data": [] }.

保障

租户隔离

teamId 来自 API 键;另一个团队的 ID 解析为 404。每个密钥的端点都有速率限制。

草稿绝不泄露

仅提供已发布/已存档的版本,并经过清理——正在开发的草稿和内部标记将保留在内部。

同意约束措辞

每个记录都包含版本号 number 和内容哈希值,因此“v3”始终代表相同的内容。

默认最小化

同意记录不包含原始 IP 地址/用户代理信息——您获得的是验证证据,而非监控数据。

机器可读参考:端点位于 v2 OpenAPI 规范中的 https://flash.socialhub.ai/api/v2/openapi.json(标记 Privacy)。

超越同意:主题订阅,在发送时强制执行。

同意是合法的大门;主题订阅是会员对他们想要的营销进行更细粒度的选择。会员可以在门户隐私区域关闭各个主题(促销、时事通讯、忠诚度、产品公告),同时保留其余主题。这是一个选择退出模型(无记录 = 订阅),并且在服务器端强制执行:每个活动都带有一个主题,当成员关闭该主题时,发送门会抑制消息 - 同时还有通信政策频率上限和安静时间。事务消息永远不会受到影响。会员自行管理;门户通过消费者会话端点 (/api/member/topic-subscriptions) 读取和写入它,因此不涉及管理 API 密钥。