telnyx-10dlc-python
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinese<!-- Auto-generated from Telnyx OpenAPI specs. Do not edit. -->
<!-- 从Telnyx OpenAPI规范自动生成,请勿编辑。 -->
Telnyx 10DLC - Python
Telnyx 10DLC - Python
Installation
安装
bash
pip install telnyxbash
pip install telnyxSetup
初始化设置
python
import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)All examples below assume is already initialized as shown above.
clientpython
import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)以下所有示例都假定已经按照上方所示完成初始化。
clientError Handling
错误处理
All API calls can fail with network errors, rate limits (429), validation errors (422),
or authentication errors (401). Always handle errors in production code:
python
import telnyx
try:
telnyx_brand = client.messaging_10dlc.brand.create(
country="US",
display_name="ABC Mobile",
email="support@example.com",
entity_type="PRIVATE_PROFIT",
vertical="TECHNOLOGY",
)
except telnyx.APIConnectionError:
print("Network error — check connectivity and retry")
except telnyx.RateLimitError:
import time
time.sleep(1) # Check Retry-After header for actual delay
except telnyx.APIStatusError as e:
print(f"API error {e.status_code}: {e.message}")
if e.status_code == 422:
print("Validation error — check required fields and formats")Common error codes: invalid API key, insufficient permissions,
resource not found, validation error (check field formats),
rate limited (retry with exponential backoff).
401403404422429所有API调用都可能因网络错误、速率限制(429)、校验错误(422)或认证错误(401)失败。在生产代码中请务必做好错误处理:
python
import telnyx
try:
telnyx_brand = client.messaging_10dlc.brand.create(
country="US",
display_name="ABC Mobile",
email="support@example.com",
entity_type="PRIVATE_PROFIT",
vertical="TECHNOLOGY",
)
except telnyx.APIConnectionError:
print("Network error — check connectivity and retry")
except telnyx.RateLimitError:
import time
time.sleep(1) # Check Retry-After header for actual delay
except telnyx.APIStatusError as e:
print(f"API error {e.status_code}: {e.message}")
if e.status_code == 422:
print("Validation error — check required fields and formats")常见错误码: API密钥无效, 权限不足, 资源不存在, 校验错误(请检查字段格式), 触发速率限制(请使用指数退避策略重试)。
401403404422429Important Notes
重要说明
- Pagination: List methods return an auto-paginating iterator. Use to iterate through all pages automatically.
for item in page_result:
- 分页: 列表方法会返回一个支持自动分页的迭代器,你可以使用自动遍历所有分页结果。
for item in page_result:
Operational Caveats
操作注意事项
- 10DLC is sequential: create the brand first, then submit the campaign, then attach messaging infrastructure such as the messaging profile.
- Registration calls are not enough by themselves. Messaging cannot use the campaign until the assignment step completes successfully.
- Treat registration status fields as part of the control flow. Do not assume the campaign is send-ready until the returned status fields confirm it.
- 10DLC操作有先后顺序:首先创建品牌,然后提交活动,最后绑定消息配置文件等消息基础设施。
- 仅完成注册调用是不够的,只有分配步骤成功完成后,消息服务才能使用该活动。
- 请将注册状态字段作为控制流程的判断依据,在返回的状态字段确认活动就绪前,不要假定活动已经可以发送消息。
Reference Use Rules
参考使用规则
Do not invent Telnyx parameters, enums, response fields, or webhook fields.
- If the parameter, enum, or response field you need is not shown inline in this skill, read references/api-details.md before writing code.
- Before using any operation in , read the optional-parameters section and the response-schemas section.
## Additional Operations - Before reading or matching webhook fields beyond the inline examples, read the webhook payload reference.
不要自行编造Telnyx参数、枚举值、响应字段或webhook字段。
- 如果你需要的参数、枚举值或响应字段没有在本技能的示例中列出,请在编写代码前阅读references/api-details.md。
- 在使用中的任意接口前,请阅读可选参数章节和响应结构章节。
## 额外操作 - 如需读取或匹配示例之外的webhook字段,请先阅读webhook payload参考。
Core Tasks
核心任务
Create a brand
创建品牌
Brand registration is the entrypoint for any US A2P 10DLC campaign flow.
client.messaging_10dlc.brand.create()POST /10dlc/brand| Parameter | Type | Required | Description |
|---|---|---|---|
| object | Yes | Entity type behind the brand. |
| string | Yes | Display name, marketing name, or DBA name of the brand. |
| string | Yes | ISO2 2 characters country code. |
| string | Yes | Valid email address of brand support contact. |
| object | Yes | Vertical or industry segment of the brand. |
| string | No | (Required for Non-profit/private/public) Legal company name. |
| string | No | First name of business contact. |
| string | No | Last name of business contact. |
| ... | +16 optional params in references/api-details.md |
python
telnyx_brand = client.messaging_10dlc.brand.create(
country="US",
display_name="ABC Mobile",
email="support@example.com",
entity_type="PRIVATE_PROFIT",
vertical="TECHNOLOGY",
)
print(telnyx_brand.identity_status)Primary response fields:
telnyx_brand.brand_idtelnyx_brand.identity_statustelnyx_brand.statustelnyx_brand.display_nametelnyx_brand.statetelnyx_brand.alt_business_id
品牌注册是所有美国A2P 10DLC活动流程的入口。
client.messaging_10dlc.brand.create()POST /10dlc/brand| 参数 | 类型 | 必填 | 描述 |
|---|---|---|---|
| object | 是 | 品牌对应的实体类型。 |
| string | 是 | 品牌的展示名称、营销名称或经营名称。 |
| string | 是 | ISO2标准的两位国家代码。 |
| string | 是 | 品牌支持联系人的有效邮箱地址。 |
| object | 是 | 品牌所属的垂直领域或行业分类。 |
| string | 否 | (非盈利/私营/公共实体必填)合法公司名称。 |
| string | 否 | 业务联系人的名。 |
| string | 否 | 业务联系人的姓。 |
| ... | 另有16个可选参数见references/api-details.md |
python
telnyx_brand = client.messaging_10dlc.brand.create(
country="US",
display_name="ABC Mobile",
email="support@example.com",
entity_type="PRIVATE_PROFIT",
vertical="TECHNOLOGY",
)
print(telnyx_brand.identity_status)主要响应字段:
telnyx_brand.brand_idtelnyx_brand.identity_statustelnyx_brand.statustelnyx_brand.display_nametelnyx_brand.statetelnyx_brand.alt_business_id
Submit a campaign
提交活动
Campaign submission is the compliance-critical step that determines whether traffic can be provisioned.
client.messaging_10dlc.campaign_builder.submit()POST /10dlc/campaignBuilder| Parameter | Type | Required | Description |
|---|---|---|---|
| string (UUID) | Yes | Alphanumeric identifier of the brand associated with this ca... |
| string | Yes | Summary description of this campaign. |
| string | Yes | Campaign usecase. |
| boolean | No | Age gated message content in campaign. |
| boolean | No | Campaign subscription auto-renewal option. |
| boolean | No | Direct lending or loan arrangement |
| ... | +29 optional params in references/api-details.md |
python
telnyx_campaign_csp = client.messaging_10dlc.campaign_builder.submit(
brand_id="BXXXXXX",
description="Two-factor authentication messages",
usecase="2FA",
sample_messages=["Your verification code is {{code}}"],
)
print(telnyx_campaign_csp.brand_id)Primary response fields:
telnyx_campaign_csp.campaign_idtelnyx_campaign_csp.brand_idtelnyx_campaign_csp.campaign_statustelnyx_campaign_csp.submission_statustelnyx_campaign_csp.failure_reasonstelnyx_campaign_csp.status
活动提交是合规关键步骤,决定了流量是否可以被开通。
client.messaging_10dlc.campaign_builder.submit()POST /10dlc/campaignBuilder| 参数 | 类型 | 必填 | 描述 |
|---|---|---|---|
| string (UUID) | 是 | 该活动关联的品牌的字母数字标识符。 |
| string | 是 | 该活动的概述说明。 |
| string | 是 | 活动使用场景。 |
| boolean | 否 | 活动是否包含年龄限制的消息内容。 |
| boolean | 否 | 活动订阅自动续费选项。 |
| boolean | 否 | 是否涉及直接借贷或贷款安排 |
| ... | 另有29个可选参数见references/api-details.md |
python
telnyx_campaign_csp = client.messaging_10dlc.campaign_builder.submit(
brand_id="BXXXXXX",
description="Two-factor authentication messages",
usecase="2FA",
sample_messages=["Your verification code is {{code}}"],
)
print(telnyx_campaign_csp.brand_id)主要响应字段:
telnyx_campaign_csp.campaign_idtelnyx_campaign_csp.brand_idtelnyx_campaign_csp.campaign_statustelnyx_campaign_csp.submission_statustelnyx_campaign_csp.failure_reasonstelnyx_campaign_csp.status
Assign a messaging profile to a campaign
为活动分配消息配置文件
Messaging profile assignment is the practical handoff from registration to send-ready messaging infrastructure.
client.messaging_10dlc.phone_number_assignment_by_profile.assign()POST /10dlc/phoneNumberAssignmentByProfile| Parameter | Type | Required | Description |
|---|---|---|---|
| string (UUID) | Yes | The ID of the messaging profile that you want to link to the... |
| string (UUID) | Yes | The ID of the campaign you want to link to the specified mes... |
| string (UUID) | No | The TCR ID of the shared campaign you want to link to the sp... |
python
response = client.messaging_10dlc.phone_number_assignment_by_profile.assign(
messaging_profile_id="4001767e-ce0f-4cae-9d5f-0d5e636e7809",
campaign_id="CXXX001",
)
print(response.messaging_profile_id)Primary response fields:
response.messaging_profile_idresponse.campaign_idresponse.task_idresponse.tcr_campaign_id
消息配置文件分配是从注册到可发送消息基础设施的实际交接步骤。
client.messaging_10dlc.phone_number_assignment_by_profile.assign()POST /10dlc/phoneNumberAssignmentByProfile| 参数 | 类型 | 必填 | 描述 |
|---|---|---|---|
| string (UUID) | 是 | 你想要关联到活动的消息配置文件ID。 |
| string (UUID) | 是 | 你想要关联到指定消息配置文件的活动ID。 |
| string (UUID) | 否 | 你想要关联到指定配置的共享活动的TCR ID。 |
python
response = client.messaging_10dlc.phone_number_assignment_by_profile.assign(
messaging_profile_id="4001767e-ce0f-4cae-9d5f-0d5e636e7809",
campaign_id="CXXX001",
)
print(response.messaging_profile_id)主要响应字段:
response.messaging_profile_idresponse.campaign_idresponse.task_idresponse.tcr_campaign_id
Webhook Verification
Webhook签名验证
Telnyx signs webhooks with Ed25519. Each request includes
and headers. Always verify signatures in production:
telnyx-signature-ed25519telnyx-timestamppython
undefinedTelnyx使用Ed25519对webhook进行签名,每个请求都包含和头。生产环境中请务必验证签名:
telnyx-signature-ed25519telnyx-timestamppython
undefinedIn your webhook handler (e.g., Flask — use raw body, not parsed JSON):
In your webhook handler (e.g., Flask — use raw body, not parsed JSON):
@app.route("/webhooks", methods=["POST"])
def handle_webhook():
payload = request.get_data(as_text=True) # raw body as string
headers = dict(request.headers)
try:
event = client.webhooks.unwrap(payload, headers=headers)
except Exception as e:
print(f"Webhook verification failed: {e}")
return "Invalid signature", 400
# Signature valid — event is the parsed webhook payload
print(f"Received event: {event.data.event_type}")
return "OK", 200
undefined@app.route("/webhooks", methods=["POST"])
def handle_webhook():
payload = request.get_data(as_text=True) # raw body as string
headers = dict(request.headers)
try:
event = client.webhooks.unwrap(payload, headers=headers)
except Exception as e:
print(f"Webhook verification failed: {e}")
return "Invalid signature", 400
# Signature valid — event is the parsed webhook payload
print(f"Received event: {event.data.event_type}")
return "OK", 200
undefinedWebhooks
Webhook事件
These webhook payload fields are inline because they are part of the primary integration path.
以下webhook payload字段是核心集成路径的一部分,因此在此处列出。
Campaign Status Update
活动状态更新
| Field | Type | Description |
|---|---|---|
| string | Brand ID associated with the campaign. |
| string | The ID of the campaign. |
| string | Unix timestamp when campaign was created. |
| string | Alphanumeric identifier of the CSP associated with this campaign. |
| boolean | Indicates whether the campaign is registered with T-Mobile. |
| enum: TELNYX_EVENT, REGISTRATION, MNO_REVIEW, TELNYX_REVIEW, NUMBER_POOL_PROVISIONED, NUMBER_POOL_DEPROVISIONED, TCR_EVENT, VERIFIED | |
| string | Description of the event. |
| enum: ACCEPTED, REJECTED, DORMANT, success, failed | The status of the campaign. |
If you need webhook fields that are not listed inline here, read the webhook payload reference before writing the handler.
| 字段 | 类型 | 描述 |
|---|---|---|
| string | 活动关联的品牌ID。 |
| string | 活动ID。 |
| string | 活动创建的Unix时间戳。 |
| string | 该活动关联的CSP的字母数字标识符。 |
| boolean | 指示活动是否已在T-Mobile注册。 |
| enum: TELNYX_EVENT, REGISTRATION, MNO_REVIEW, TELNYX_REVIEW, NUMBER_POOL_PROVISIONED, NUMBER_POOL_DEPROVISIONED, TCR_EVENT, VERIFIED | |
| string | 事件描述。 |
| enum: ACCEPTED, REJECTED, DORMANT, success, failed | 活动状态。 |
如果你需要的webhook字段没有在此处列出,请在编写处理逻辑前阅读webhook payload参考。
Important Supporting Operations
重要辅助操作
Use these when the core tasks above are close to your flow, but you need a common variation or follow-up step.
当上述核心任务接近你的业务流程,但你需要通用变体或后续步骤时,可以使用这些操作。
Get Brand
查询品牌信息
Inspect the current state of an existing brand registration.
client.messaging_10dlc.brand.retrieve()GET /10dlc/brand/{brandId}| Parameter | Type | Required | Description |
|---|---|---|---|
| string (UUID) | Yes |
python
brand = client.messaging_10dlc.brand.retrieve(
"brandId",
)
print(brand)Primary response fields:
brand.statusbrand.statebrand.alt_business_idbrand.alt_business_id_typebrand.assigned_campaigns_countbrand.brand_id
查看现有品牌注册的当前状态。
client.messaging_10dlc.brand.retrieve()GET /10dlc/brand/{brandId}| 参数 | 类型 | 必填 | 描述 |
|---|---|---|---|
| string (UUID) | 是 |
python
brand = client.messaging_10dlc.brand.retrieve(
"brandId",
)
print(brand)主要响应字段:
brand.statusbrand.statebrand.alt_business_idbrand.alt_business_id_typebrand.assigned_campaigns_countbrand.brand_id
Qualify By Usecase
按使用场景校验资格
Fetch the current state before updating, deleting, or making control-flow decisions.
client.messaging_10dlc.campaign_builder.brand.qualify_by_usecase()GET /10dlc/campaignBuilder/brand/{brandId}/usecase/{usecase}| Parameter | Type | Required | Description |
|---|---|---|---|
| string | Yes | |
| string (UUID) | Yes |
python
response = client.messaging_10dlc.campaign_builder.brand.qualify_by_usecase(
usecase="CUSTOMER_CARE",
brand_id="brandId",
)
print(response.annual_fee)Primary response fields:
response.annual_feeresponse.max_sub_usecasesresponse.min_sub_usecasesresponse.mno_metadataresponse.monthly_feeresponse.quarterly_fee
在进行更新、删除或做出控制流决策前获取当前状态。
client.messaging_10dlc.campaign_builder.brand.qualify_by_usecase()GET /10dlc/campaignBuilder/brand/{brandId}/usecase/{usecase}| 参数 | 类型 | 必填 | 描述 |
|---|---|---|---|
| string | 是 | |
| string (UUID) | 是 |
python
response = client.messaging_10dlc.campaign_builder.brand.qualify_by_usecase(
usecase="CUSTOMER_CARE",
brand_id="brandId",
)
print(response.annual_fee)主要响应字段:
response.annual_feeresponse.max_sub_usecasesresponse.min_sub_usecasesresponse.mno_metadataresponse.monthly_feeresponse.quarterly_fee
Create New Phone Number Campaign
创建新的电话号码活动绑定
Create or provision an additional resource when the core tasks do not cover this flow.
client.messaging_10dlc.phone_number_campaigns.create()POST /10dlc/phone_number_campaigns| Parameter | Type | Required | Description |
|---|---|---|---|
| string (E.164) | Yes | The phone number you want to link to a specified campaign. |
| string (UUID) | Yes | The ID of the campaign you want to link to the specified pho... |
python
phone_number_campaign = client.messaging_10dlc.phone_number_campaigns.create(
campaign_id="4b300178-131c-d902-d54e-72d90ba1620j",
phone_number="+18005550199",
)
print(phone_number_campaign.campaign_id)Primary response fields:
phone_number_campaign.assignment_statusphone_number_campaign.brand_idphone_number_campaign.campaign_idphone_number_campaign.created_atphone_number_campaign.failure_reasonsphone_number_campaign.phone_number
当核心任务未覆盖该流程时,创建或开通额外资源。
client.messaging_10dlc.phone_number_campaigns.create()POST /10dlc/phone_number_campaigns| 参数 | 类型 | 必填 | 描述 |
|---|---|---|---|
| string (E.164) | 是 | 你想要关联到指定活动的电话号码。 |
| string (UUID) | 是 | 你想要关联到指定电话号码的活动ID。 |
python
phone_number_campaign = client.messaging_10dlc.phone_number_campaigns.create(
campaign_id="4b300178-131c-d902-d54e-72d90ba1620j",
phone_number="+18005550199",
)
print(phone_number_campaign.campaign_id)主要响应字段:
phone_number_campaign.assignment_statusphone_number_campaign.brand_idphone_number_campaign.campaign_idphone_number_campaign.created_atphone_number_campaign.failure_reasonsphone_number_campaign.phone_number
Get campaign
查询活动信息
Inspect the current state of an existing campaign registration.
client.messaging_10dlc.campaign.retrieve()GET /10dlc/campaign/{campaignId}| Parameter | Type | Required | Description |
|---|---|---|---|
| string (UUID) | Yes |
python
telnyx_campaign_csp = client.messaging_10dlc.campaign.retrieve(
"campaignId",
)
print(telnyx_campaign_csp.brand_id)Primary response fields:
telnyx_campaign_csp.statustelnyx_campaign_csp.age_gatedtelnyx_campaign_csp.auto_renewaltelnyx_campaign_csp.billed_datetelnyx_campaign_csp.brand_display_nametelnyx_campaign_csp.brand_id
查看现有活动注册的当前状态。
client.messaging_10dlc.campaign.retrieve()GET /10dlc/campaign/{campaignId}| 参数 | 类型 | 必填 | 描述 |
|---|---|---|---|
| string (UUID) | 是 |
python
telnyx_campaign_csp = client.messaging_10dlc.campaign.retrieve(
"campaignId",
)
print(telnyx_campaign_csp.brand_id)主要响应字段:
telnyx_campaign_csp.statustelnyx_campaign_csp.age_gatedtelnyx_campaign_csp.auto_renewaltelnyx_campaign_csp.billed_datetelnyx_campaign_csp.brand_display_nametelnyx_campaign_csp.brand_id
List Brands
列出品牌
Inspect available resources or choose an existing resource before mutating it.
client.messaging_10dlc.brand.list()GET /10dlc/brand| Parameter | Type | Required | Description |
|---|---|---|---|
| enum (assignedCampaignsCount, -assignedCampaignsCount, brandId, -brandId, createdAt, ...) | No | Specifies the sort order for results. |
| integer | No | |
| integer | No | number of records per page. |
| ... | +6 optional params in references/api-details.md |
python
page = client.messaging_10dlc.brand.list()
page = page.records[0]
print(page.identity_status)Primary response fields:
page.pagepage.recordspage.total_records
在修改资源前查看可用资源或选择现有资源。
client.messaging_10dlc.brand.list()GET /10dlc/brand| 参数 | 类型 | 必填 | 描述 |
|---|---|---|---|
| enum (assignedCampaignsCount, -assignedCampaignsCount, brandId, -brandId, createdAt, ...) | 否 | 指定结果的排序规则。 |
| integer | 否 | |
| integer | 否 | 每页的记录数量。 |
| ... | 另有6个可选参数见references/api-details.md |
python
page = client.messaging_10dlc.brand.list()
page = page.records[0]
print(page.identity_status)主要响应字段:
page.pagepage.recordspage.total_records
Get Brand Feedback By Id
根据ID获取品牌反馈
Fetch the current state before updating, deleting, or making control-flow decisions.
client.messaging_10dlc.brand.get_feedback()GET /10dlc/brand/feedback/{brandId}| Parameter | Type | Required | Description |
|---|---|---|---|
| string (UUID) | Yes |
python
response = client.messaging_10dlc.brand.get_feedback(
"brandId",
)
print(response.brand_id)Primary response fields:
response.brand_idresponse.category
在进行更新、删除或做出控制流决策前获取当前状态。
client.messaging_10dlc.brand.get_feedback()GET /10dlc/brand/feedback/{brandId}| 参数 | 类型 | 必填 | 描述 |
|---|---|---|---|
| string (UUID) | 是 |
python
response = client.messaging_10dlc.brand.get_feedback(
"brandId",
)
print(response.brand_id)主要响应字段:
response.brand_idresponse.category
Additional Operations
额外操作
Use the core tasks above first. The operations below are indexed here with exact SDK methods and required params; use references/api-details.md for full optional params, response schemas, and lower-frequency webhook payloads.
Before using any operation below, read the optional-parameters section and the response-schemas section so you do not guess missing fields.
| Operation | SDK method | Endpoint | Use when | Required params |
|---|---|---|---|---|
| Get Brand SMS OTP Status | | | Fetch the current state before updating, deleting, or making control-flow decisions. | |
| Update Brand | | | Inspect the current state of an existing brand registration. | |
| Delete Brand | | | Inspect the current state of an existing brand registration. | |
| Resend brand 2FA email | | | Create or provision an additional resource when the core tasks do not cover this flow. | |
| List External Vettings | | | Fetch the current state before updating, deleting, or making control-flow decisions. | |
| Order Brand External Vetting | | | Create or provision an additional resource when the core tasks do not cover this flow. | |
| Import External Vetting Record | | | Modify an existing resource without recreating it. | |
| Revet Brand | | | Modify an existing resource without recreating it. | |
| Get Brand SMS OTP Status by Brand ID | | | Fetch the current state before updating, deleting, or making control-flow decisions. | |
| Trigger Brand SMS OTP | | | Create or provision an additional resource when the core tasks do not cover this flow. | |
| Verify Brand SMS OTP | | | Modify an existing resource without recreating it. | |
| List Campaigns | | | Inspect available resources or choose an existing resource before mutating it. | None |
| Accept Shared Campaign | | | Create or provision an additional resource when the core tasks do not cover this flow. | |
| Get Campaign Cost | | | Inspect available resources or choose an existing resource before mutating it. | None |
| Update campaign | | | Inspect the current state of an existing campaign registration. | |
| Deactivate campaign | | | Inspect the current state of an existing campaign registration. | |
| Submit campaign appeal for manual review | | | Create or provision an additional resource when the core tasks do not cover this flow. | |
| Get Campaign Mno Metadata | | | Fetch the current state before updating, deleting, or making control-flow decisions. | |
| Get campaign operation status | | | Fetch the current state before updating, deleting, or making control-flow decisions. | |
| Get OSR campaign attributes | | | Fetch the current state before updating, deleting, or making control-flow decisions. | |
| Get Sharing Status | | | Fetch the current state before updating, deleting, or making control-flow decisions. | |
| List shared partner campaigns | | | Inspect available resources or choose an existing resource before mutating it. | None |
| Get Sharing Status | | | Fetch the current state before updating, deleting, or making control-flow decisions. | |
| List Shared Campaigns | | | Inspect available resources or choose an existing resource before mutating it. | None |
| Get Single Shared Campaign | | | Fetch the current state before updating, deleting, or making control-flow decisions. | |
| Update Single Shared Campaign | | | Modify an existing resource without recreating it. | |
| Get Assignment Task Status | | | Fetch the current state before updating, deleting, or making control-flow decisions. | |
| Get Phone Number Status | | | Fetch the current state before updating, deleting, or making control-flow decisions. | |
| List phone number campaigns | | | Inspect available resources or choose an existing resource before mutating it. | None |
| Get Single Phone Number Campaign | | | Fetch the current state before updating, deleting, or making control-flow decisions. | |
| Create New Phone Number Campaign | | | Modify an existing resource without recreating it. | |
| Delete Phone Number Campaign | | | Remove, detach, or clean up an existing resource. | |
For exhaustive optional parameters, full response schemas, and complete webhook payloads, see references/api-details.md.
请优先使用上述核心任务。下方的操作在此处列出了精确的SDK方法和必填参数;请参考references/api-details.md获取完整的可选参数、响应结构和低频率webhook payload。
在使用下方任意操作前,请阅读可选参数章节和响应结构章节,不要猜测缺失的字段。
| 操作 | SDK方法 | 接口地址 | 使用场景 | 必填参数 |
|---|---|---|---|---|
| 获取品牌SMS OTP状态 | | | 在进行更新、删除或做出控制流决策前获取当前状态。 | |
| 更新品牌 | | | 查看现有品牌注册的当前状态。 | |
| 删除品牌 | | | 查看现有品牌注册的当前状态。 | |
| 重发品牌2FA邮件 | | | 当核心任务未覆盖该流程时,创建或开通额外资源。 | |
| 列出外部审核记录 | | | 在进行更新、删除或做出控制流决策前获取当前状态。 | |
| 订购品牌外部审核服务 | | | 当核心任务未覆盖该流程时,创建或开通额外资源。 | |
| 导入外部审核记录 | | | 无需重建即可修改现有资源。 | |
| 重新审核品牌 | | | 无需重建即可修改现有资源。 | |
| 通过品牌ID获取品牌SMS OTP状态 | | | 在进行更新、删除或做出控制流决策前获取当前状态。 | |
| 触发品牌SMS OTP | | | 当核心任务未覆盖该流程时,创建或开通额外资源。 | |
| 验证品牌SMS OTP | | | 无需重建即可修改现有资源。 | |
| 列出活动 | | | 在修改资源前查看可用资源或选择现有资源。 | None |
| 接受共享活动 | | | 当核心任务未覆盖该流程时,创建或开通额外资源。 | |
| 获取活动成本 | | | 在修改资源前查看可用资源或选择现有资源。 | None |
| 更新活动 | | | 查看现有活动注册的当前状态。 | |
| 停用活动 | | | 查看现有活动注册的当前状态。 | |
| 提交活动申诉请求人工审核 | | | 当核心任务未覆盖该流程时,创建或开通额外资源。 | |
| 获取活动MNO元数据 | | | 在进行更新、删除或做出控制流决策前获取当前状态。 | |
| 获取活动操作状态 | | | 在进行更新、删除或做出控制流决策前获取当前状态。 | |
| 获取OSR活动属性 | | | 在进行更新、删除或做出控制流决策前获取当前状态。 | |
| 获取共享状态 | | | 在进行更新、删除或做出控制流决策前获取当前状态。 | |
| 列出我共享的合作伙伴活动 | | | 在修改资源前查看可用资源或选择现有资源。 | None |
| 获取共享状态 | | | 在进行更新、删除或做出控制流决策前获取当前状态。 | |
| 列出共享活动 | | | 在修改资源前查看可用资源或选择现有资源。 | None |
| 获取单个共享活动 | | | 在进行更新、删除或做出控制流决策前获取当前状态。 | |
| 更新单个共享活动 | | | 无需重建即可修改现有资源。 | |
| 获取分配任务状态 | | | 在进行更新、删除或做出控制流决策前获取当前状态。 | |
| 获取电话号码状态 | | | 在进行更新、删除或做出控制流决策前获取当前状态。 | |
| 列出电话号码活动绑定 | | | 在修改资源前查看可用资源或选择现有资源。 | None |
| 获取单个电话号码活动绑定 | | | 在进行更新、删除或做出控制流决策前获取当前状态。 | |
| 创建新的电话号码活动绑定 | | | 无需重建即可修改现有资源。 | |
| 删除电话号码活动绑定 | | | 移除、解绑或清理现有资源。 | |
如需完整的可选参数、全量响应结构和完整的webhook payload,请查看references/api-details.md。