Sender Profile Architect

sentdm/sent-plugin/plugins/sent/skills/sender-profile-architect

作者 sentdme3d91640fb6f48601c17ddb4ff3df2d3a5f81d6f無授權條款48 個星標收錄於 2026年10月9日更新於 2026年10月9日儲存庫6 天前更新

Designs Sent Sender Profile architecture for multi-tenant, multi-brand, and multi-channel systems. Use for API-key scoping, x-profile-id, isolation, inheritance, sharing, billing, WABA, 10DLC campaigns, webhooks, or tenant offboarding.

AI 產生的概覽

為多租戶、多品牌與多通道訊息系統設計 Sent Sender Profile 架構。

功能
指導 Sent Sender Profile 的架構決策,涵蓋租戶隔離、使用 x-profile-id 的 API 金鑰範圍、繼承與共享旗標、計費歸屬、WABA 路徑、10DLC 活動、Webhook 歸屬以及租戶下線。產出的是設計建議與檢查清單,而非程式碼或設定檔。參考文件提供多租戶模式、邊界範例與資料模型。
適用情境
在開通佈建之前,需要決定如何在 Sent 中隔離租戶、品牌或通道時使用。也適用於檢視憑證範圍、速率限制影響範圍、繼承、計費、WABA 設定、活動結構或 Webhook 與租戶的對應關係。
執行需求
沒有指令碼,僅包含說明與參考 Markdown 文件。代理不需要憑證或網路存取,但內容涉及 Sent v3 REST API 與 MCP 工具。

Sender Profile Architect

A Sender Profile is the operational boundary for tenant identity, channel configuration, inherited resources, billing, and credentials. Use this skill before provisioning when a poor boundary would mix brands, compliance posture, rate-limit impact, or webhook ownership.

For live MCP profile lifecycle operations use sent-profile-provisioning; for market requirements use sent-compliance. MCP selects an acting profile with optional profileId on ordinary account tools for organization grants only. sender_profiles.* tools operate on target id and reject acting profileId. REST headers below are not MCP arguments.

Recommended tenancy model

When tenants require isolation, recommend one Sent organization with one Sender Profile per tenant. A shared profile is appropriate only when the tenants genuinely share one brand, sender resources, compliance posture, billing/rate-limit expectations, and operational blast radius.

Do not recommend pooled-by-default architecture. Make the isolation decision explicit using references/multi-tenancy-patterns.md [blocked].

Authentication patterns

Sent v3 supports both:

PatternHeadersBlast radius
Profile-specific API keyx-api-keyProfile-scoped credentials and rate-limit context. Do not add x-profile-id.
Organization API key acting for a childx-api-key plus x-profile-id: <profile UUID>Organization credential can reach permitted child profiles; rate limits remain in the organization pool.

Only organization keys may send x-profile-id. A profile key that sends it receives 403. A profile outside the organization returns 404. X-Profile-Id can be echoed in scoped responses.

x-sender-id is legacy v1/v2 terminology only. Do not use it for v3 authentication or routing.

Choose profile keys when tenant-level credential isolation and revocation are primary. Choose organization-key scoping for centrally controlled integrations that can protect a broader credential and deliberately accept a shared organization rate-limit pool.

Profile creation model

Create with POST /v3/profiles. name is required. Current optional areas include:

  • identity: icon, description, short_name;
  • sharing: allow_contact_sharing, allow_template_sharing;
  • inheritance: inherit_contacts, inherit_templates, inherit_tcr_brand, inherit_tcr_campaign;
  • billing: billing_model, billing_contact, and ephemeral payment_details;
  • dedicated WABA credentials: whatsapp_business_account with waba_id, optional phone_number_id, and access_token;
  • a dedicated brand: brand.contact, brand.business, and brand.compliance.

Do not add a separate brand endpoint. A dedicated brand is created with the profile; campaigns are managed under /v3/profiles/{profileId}/campaigns.

Inheritance rules

  • inherit_tcr_brand: true means the profile uses the organization's brand and cannot submit its own brand object.
  • inherit_tcr_campaign: true makes inherited campaigns read-only for that profile.
  • An inherited brand with inherit_tcr_campaign: false is a supported dedicated-campaign pattern.
  • Sharing flags expose a profile's contacts/templates; inheritance flags consume organization resources. Treat those directions separately.

Billing and number references

billing_model currently supports profile, organization, and profile_and_organization. A profile or fallback billing model requires billing_contact when none exists. Card fields are forwarded to the payment processor and must not be logged or persisted.

Profile update can manage sending_phone_number_profile_id, sending_whatsapp_number_profile_id, sending_phone_number, whatsapp_phone_number, and allow_number_change_during_onboarding. Model reference IDs and direct numbers separately, and prevent cycles when one profile references another.

WABA choices

There are three distinct paths:

  1. Organization Embedded Signup in the dashboard.
  2. Child profile inheritance by omitting whatsapp_business_account after the organization has a WABA.
  3. Dedicated profile WABA using waba_id and access_token; phone_number_id is optional.

There is no public endpoint that starts organization Embedded Signup. Direct credentials on POST /v3/profiles are not an “Embedded Signup endpoint.” Use waba-embedded-signup for the operational flow.

10DLC and campaigns

Use a profile brand object for a dedicated brand. Manage campaigns at:

  • GET|POST /v3/profiles/{profileId}/campaigns
  • PUT|DELETE /v3/profiles/{profileId}/campaigns/{campaignId}

Use sms-10dlc-registration for the payload and policy layer.

Completion and status handling

Complete a profile with POST /v3/profiles/{profileId}/complete and a required webHookUrl:

json
{  "webHookUrl": "https://example.com/webhooks/profile-complete",  "sandbox": true}

Status is surface-specific:

  • Create response currently demonstrates lowercase incomplete.
  • Completion 202 means processing started and does not contain a final status.
  • Completion 200 currently demonstrates lowercase completed for an already-complete profile.
  • Completion callbacks can report COMPLETED, SUBMITTED, or failed.
  • REST guides and OpenAPI publish different profile status sets.

Do not assert a closed REST enum. Preserve unknown strings and record the endpoint/callback surface that produced them.

Webhook attribution

Sent events do not contain your application tenant ID. Before sending, persist the returned message_id with the tenant and profile. Route outbound status events through that mapping. For inbound messages, map the receiving number/profile resource to the tenant.

text
message_id -> tenant_id, profile_id, logical_send_id, channelreceiving_number -> tenant_id, profile_id

Do not infer tenant ownership from account_id alone. Multiple tenant profiles can belong to one organization.

Design checklist

  • Tenant/brand isolation decision is explicit.
  • Credential pattern and rate-limit/blast radius are documented.
  • Sharing and inheritance directions are intentional.
  • Billing ownership is named.
  • Number references cannot form cycles.
  • WABA path is organization signup, inheritance, or dedicated credentials—not an invented hybrid.
  • Dedicated brand/campaign paths are profile-based.
  • message_id and inbound-number mappings support webhook attribution.
  • Unknown profile statuses are tolerated.
  • Tenant offboarding revokes credentials, disables sends, detaches resources safely, and retains audit evidence.

See references/sender-profile-data-model.md [blocked] and references/profile-boundary-examples.md [blocked] for implementation patterns.

來源與署名

來源:sentdm/sent-plugin位於plugins/sent/skills/sender-profile-architect提交e3d9164

授權條款: 無授權條款

內容歸原作者所有。SourceWeft 從公開儲存庫中收錄這些內容。

檢舉或申請下架