telnyx-10dlc-javascript
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinese<!-- Auto-generated from Telnyx OpenAPI specs. Do not edit. -->
<!-- 自动生成自Telnyx OpenAPI规范,请勿编辑 -->
Telnyx 10DLC - JavaScript
Telnyx 10DLC - JavaScript
Installation
安装
bash
npm install telnyxbash
npm install telnyxSetup
初始化配置
javascript
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});All examples below assume is already initialized as shown above.
clientjavascript
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // 这是默认配置,可省略
});以下所有示例均假设已按上文方式完成初始化。
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:
javascript
try {
const telnyxBrand = await client.messaging10dlc.brand.create({
country: 'US',
displayName: 'ABC Mobile',
email: 'support@example.com',
entityType: 'PRIVATE_PROFIT',
vertical: 'TECHNOLOGY',
});
} catch (err) {
if (err instanceof Telnyx.APIConnectionError) {
console.error('Network error — check connectivity and retry');
} else if (err instanceof Telnyx.RateLimitError) {
const retryAfter = err.headers?.['retry-after'] || 1;
await new Promise(r => setTimeout(r, retryAfter * 1000));
} else if (err instanceof Telnyx.APIError) {
console.error(`API error ${err.status}: ${err.message}`);
if (err.status === 422) {
console.error('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)失败,生产环境代码中请始终做好错误处理:
javascript
try {
const telnyxBrand = await client.messaging10dlc.brand.create({
country: 'US',
displayName: 'ABC Mobile',
email: 'support@example.com',
entityType: 'PRIVATE_PROFIT',
vertical: 'TECHNOLOGY',
});
} catch (err) {
if (err instanceof Telnyx.APIConnectionError) {
console.error('网络错误 — 检查连接后重试');
} else if (err instanceof Telnyx.RateLimitError) {
const retryAfter = err.headers?.['retry-after'] || 1;
await new Promise(r => setTimeout(r, retryAfter * 1000));
} else if (err instanceof Telnyx.APIError) {
console.error(`API错误 ${err.status}: ${err.message}`);
if (err.status === 422) {
console.error('验证错误 — 检查必填字段和格式');
}
}
}常见错误码: API密钥无效, 权限不足, 资源不存在, 验证错误(请检查字段格式), 触发速率限制(请使用指数退避策略重试)。
401403404422429Important Notes
重要说明
- Pagination: List methods return an auto-paginating iterator. Use to iterate through all pages automatically.
for await (const item of result) { ... }
- 分页: 列表方法返回支持自动分页的迭代器,可使用自动遍历所有分页结果。
for await (const item of 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负载参考。
Core Tasks
核心任务
Create a brand
创建品牌
Brand registration is the entrypoint for any US A2P 10DLC campaign flow.
client.messaging10dlc.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 |
javascript
const telnyxBrand = await client.messaging10dlc.brand.create({
country: 'US',
displayName: 'ABC Mobile',
email: 'support@example.com',
entityType: 'PRIVATE_PROFIT',
vertical: 'TECHNOLOGY',
});
console.log(telnyxBrand.identityStatus);Primary response fields:
telnyxBrand.brandIdtelnyxBrand.identityStatustelnyxBrand.statustelnyxBrand.displayNametelnyxBrand.statetelnyxBrand.altBusinessId
品牌注册是所有美国A2P 10DLC活动流程的入口。
client.messaging10dlc.brand.create()POST /10dlc/brand| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| object | 是 | 品牌所属的实体类型 |
| string | 是 | 品牌的展示名、营销名称或经营用名(DBA) |
| string | 是 | ISO2标准的两位国家代码 |
| string | 是 | 品牌支持联系人的有效邮箱地址 |
| object | 是 | 品牌所属的垂直领域或行业细分 |
| string | 否 | (非营利/私营/公立实体必填)合法公司名称 |
| string | 否 | 业务联系人的名字 |
| string | 否 | 业务联系人的姓氏 |
| ... | 另有16个可选参数见references/api-details.md |
javascript
const telnyxBrand = await client.messaging10dlc.brand.create({
country: 'US',
displayName: 'ABC Mobile',
email: 'support@example.com',
entityType: 'PRIVATE_PROFIT',
vertical: 'TECHNOLOGY',
});
console.log(telnyxBrand.identityStatus);主要响应字段:
telnyxBrand.brandIdtelnyxBrand.identityStatustelnyxBrand.statustelnyxBrand.displayNametelnyxBrand.statetelnyxBrand.altBusinessId
Submit a campaign
提交活动
Campaign submission is the compliance-critical step that determines whether traffic can be provisioned.
client.messaging10dlc.campaignBuilder.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 |
javascript
const telnyxCampaignCsp = await client.messaging10dlc.campaignBuilder.submit({
brandId: 'BXXXXXX',
description: 'Two-factor authentication messages',
usecase: '2FA',
sampleMessages: ["Your verification code is {{code}}"],
});
console.log(telnyxCampaignCsp.brandId);Primary response fields:
telnyxCampaignCsp.campaignIdtelnyxCampaignCsp.brandIdtelnyxCampaignCsp.campaignStatustelnyxCampaignCsp.submissionStatustelnyxCampaignCsp.failureReasonstelnyxCampaignCsp.status
活动提交是合规核心步骤,决定了流量是否可被下发。
client.messaging10dlc.campaignBuilder.submit()POST /10dlc/campaignBuilder| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| string (UUID) | 是 | 关联该活动的品牌的字母数字标识符 |
| string | 是 | 该活动的摘要说明 |
| string | 是 | 活动使用场景 |
| boolean | 否 | 活动是否包含年龄限制的消息内容 |
| boolean | 否 | 活动订阅是否自动续费 |
| boolean | 否 | 是否涉及直接放贷或贷款安排 |
| ... | 另有29个可选参数见references/api-details.md |
javascript
const telnyxCampaignCsp = await client.messaging10dlc.campaignBuilder.submit({
brandId: 'BXXXXXX',
description: '双因素认证消息',
usecase: '2FA',
sampleMessages: ["Your verification code is {{code}}"],
});
console.log(telnyxCampaignCsp.brandId);主要响应字段:
telnyxCampaignCsp.campaignIdtelnyxCampaignCsp.brandIdtelnyxCampaignCsp.campaignStatustelnyxCampaignCsp.submissionStatustelnyxCampaignCsp.failureReasonstelnyxCampaignCsp.status
Assign a messaging profile to a campaign
为活动分配短信配置文件
Messaging profile assignment is the practical handoff from registration to send-ready messaging infrastructure.
client.messaging10dlc.phoneNumberAssignmentByProfile.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... |
javascript
const response = await client.messaging10dlc.phoneNumberAssignmentByProfile.assign({
messagingProfileId: '4001767e-ce0f-4cae-9d5f-0d5e636e7809',
campaignId: 'CXXX001',
});
console.log(response.messagingProfileId);Primary response fields:
response.messagingProfileIdresponse.campaignIdresponse.taskIdresponse.tcrCampaignId
短信配置文件分配是从注册到消息发送就绪的实际交接步骤。
client.messaging10dlc.phoneNumberAssignmentByProfile.assign()POST /10dlc/phoneNumberAssignmentByProfile| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| string (UUID) | 是 | 你想要关联到活动的短信配置文件ID |
| string (UUID) | 是 | 你想要关联到指定短信配置文件的活动ID |
| string (UUID) | 否 | 你想要关联到指定配置文件的共享活动的TCR ID |
javascript
const response = await client.messaging10dlc.phoneNumberAssignmentByProfile.assign({
messagingProfileId: '4001767e-ce0f-4cae-9d5f-0d5e636e7809',
campaignId: 'CXXX001',
});
console.log(response.messagingProfileId);主要响应字段:
response.messagingProfileIdresponse.campaignIdresponse.taskIdresponse.tcrCampaignId
Webhook Verification
Webhook验证
Telnyx signs webhooks with Ed25519. Each request includes
and headers. Always verify signatures in production:
telnyx-signature-ed25519telnyx-timestampjavascript
// In your webhook handler (e.g., Express — use raw body, not parsed JSON):
app.post('/webhooks', express.raw({ type: 'application/json' }), async (req, res) => {
try {
const event = await client.webhooks.unwrap(req.body.toString(), {
headers: req.headers,
});
// Signature valid — event is the parsed webhook payload
console.log('Received event:', event.data.event_type);
res.status(200).send('OK');
} catch (err) {
console.error('Webhook verification failed:', err.message);
res.status(400).send('Invalid signature');
}
});Telnyx使用Ed25519对webhook进行签名,每个请求都会携带和请求头,生产环境请务必验证签名:
telnyx-signature-ed25519telnyx-timestampjavascript
// 在你的webhook处理程序中(例如Express — 使用原始body,不要用解析后的JSON):
app.post('/webhooks', express.raw({ type: 'application/json' }), async (req, res) => {
try {
const event = await client.webhooks.unwrap(req.body.toString(), {
headers: req.headers,
});
// 签名有效 — event为解析后的webhook负载
console.log('Received event:', event.data.event_type);
res.status(200).send('OK');
} catch (err) {
console.error('Webhook验证失败:', err.message);
res.status(400).send('Invalid signature');
}
});Webhooks
Webhooks
These webhook payload fields are inline because they are part of the primary integration path.
以下webhook负载字段为核心集成路径的一部分,因此在此处列出。
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完成注册 |
| 枚举: TELNYX_EVENT, REGISTRATION, MNO_REVIEW, TELNYX_REVIEW, NUMBER_POOL_PROVISIONED, NUMBER_POOL_DEPROVISIONED, TCR_EVENT, VERIFIED | |
| string | 事件说明 |
| 枚举: ACCEPTED, REJECTED, DORMANT, success, failed | 活动状态 |
如果你需要此处未列出的webhook字段,编写处理程序前请先阅读webhook负载参考。
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.messaging10dlc.brand.retrieve()GET /10dlc/brand/{brandId}| Parameter | Type | Required | Description |
|---|---|---|---|
| string (UUID) | Yes |
javascript
const brand = await client.messaging10dlc.brand.retrieve('BXXX001');
console.log(brand);Primary response fields:
brand.statusbrand.statebrand.altBusinessIdbrand.altBusinessIdTypebrand.assignedCampaignsCountbrand.brandId
查看已存在的品牌注册的当前状态。
client.messaging10dlc.brand.retrieve()GET /10dlc/brand/{brandId}| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| string (UUID) | 是 |
javascript
const brand = await client.messaging10dlc.brand.retrieve('BXXX001');
console.log(brand);主要响应字段:
brand.statusbrand.statebrand.altBusinessIdbrand.altBusinessIdTypebrand.assignedCampaignsCountbrand.brandId
Qualify By Usecase
按使用场景验证资格
Fetch the current state before updating, deleting, or making control-flow decisions.
client.messaging10dlc.campaignBuilder.brand.qualifyByUsecase()GET /10dlc/campaignBuilder/brand/{brandId}/usecase/{usecase}| Parameter | Type | Required | Description |
|---|---|---|---|
| string | Yes | |
| string (UUID) | Yes |
javascript
const response = await client.messaging10dlc.campaignBuilder.brand.qualifyByUsecase('usecase', {
brandId: 'BXXX001',
});
console.log(response.annualFee);Primary response fields:
response.annualFeeresponse.maxSubUsecasesresponse.minSubUsecasesresponse.mnoMetadataresponse.monthlyFeeresponse.quarterlyFee
在更新、删除或进行控制流决策前获取当前状态。
client.messaging10dlc.campaignBuilder.brand.qualifyByUsecase()GET /10dlc/campaignBuilder/brand/{brandId}/usecase/{usecase}| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| string | 是 | |
| string (UUID) | 是 |
javascript
const response = await client.messaging10dlc.campaignBuilder.brand.qualifyByUsecase('usecase', {
brandId: 'BXXX001',
});
console.log(response.annualFee);主要响应字段:
response.annualFeeresponse.maxSubUsecasesresponse.minSubUsecasesresponse.mnoMetadataresponse.monthlyFeeresponse.quarterlyFee
Create New Phone Number Campaign
创建新的电话号码活动关联
Create or provision an additional resource when the core tasks do not cover this flow.
client.messaging10dlc.phoneNumberCampaigns.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... |
javascript
const phoneNumberCampaign = await client.messaging10dlc.phoneNumberCampaigns.create({
campaignId: '4b300178-131c-d902-d54e-72d90ba1620j',
phoneNumber: '+18005550199',
});
console.log(phoneNumberCampaign.campaignId);Primary response fields:
phoneNumberCampaign.assignmentStatusphoneNumberCampaign.brandIdphoneNumberCampaign.campaignIdphoneNumberCampaign.createdAtphoneNumberCampaign.failureReasonsphoneNumberCampaign.phoneNumber
当核心任务未覆盖该流程时,创建或预配置额外资源。
client.messaging10dlc.phoneNumberCampaigns.create()POST /10dlc/phone_number_campaigns| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| string (E.164) | 是 | 你想要关联到指定活动的电话号码 |
| string (UUID) | 是 | 你想要关联到指定电话号码的活动ID |
javascript
const phoneNumberCampaign = await client.messaging10dlc.phoneNumberCampaigns.create({
campaignId: '4b300178-131c-d902-d54e-72d90ba1620j',
phoneNumber: '+18005550199',
});
console.log(phoneNumberCampaign.campaignId);主要响应字段:
phoneNumberCampaign.assignmentStatusphoneNumberCampaign.brandIdphoneNumberCampaign.campaignIdphoneNumberCampaign.createdAtphoneNumberCampaign.failureReasonsphoneNumberCampaign.phoneNumber
Get campaign
查询活动信息
Inspect the current state of an existing campaign registration.
client.messaging10dlc.campaign.retrieve()GET /10dlc/campaign/{campaignId}| Parameter | Type | Required | Description |
|---|---|---|---|
| string (UUID) | Yes |
javascript
const telnyxCampaignCsp = await client.messaging10dlc.campaign.retrieve('CXXX001');
console.log(telnyxCampaignCsp.brandId);Primary response fields:
telnyxCampaignCsp.statustelnyxCampaignCsp.ageGatedtelnyxCampaignCsp.autoRenewaltelnyxCampaignCsp.billedDatetelnyxCampaignCsp.brandDisplayNametelnyxCampaignCsp.brandId
查看已存在的活动注册的当前状态。
client.messaging10dlc.campaign.retrieve()GET /10dlc/campaign/{campaignId}| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| string (UUID) | 是 |
javascript
const telnyxCampaignCsp = await client.messaging10dlc.campaign.retrieve('CXXX001');
console.log(telnyxCampaignCsp.brandId);主要响应字段:
telnyxCampaignCsp.statustelnyxCampaignCsp.ageGatedtelnyxCampaignCsp.autoRenewaltelnyxCampaignCsp.billedDatetelnyxCampaignCsp.brandDisplayNametelnyxCampaignCsp.brandId
List Brands
列出品牌
Inspect available resources or choose an existing resource before mutating it.
client.messaging10dlc.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 |
javascript
// Automatically fetches more pages as needed.
for await (const brandListResponse of client.messaging10dlc.brand.list()) {
console.log(brandListResponse.identityStatus);
}Primary response fields:
brandListResponse.pagebrandListResponse.recordsbrandListResponse.totalRecords
在修改资源前查看可用资源或选择已有资源。
client.messaging10dlc.brand.list()GET /10dlc/brand| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| 枚举 (assignedCampaignsCount, -assignedCampaignsCount, brandId, -brandId, createdAt, ...) | 否 | 指定结果的排序规则 |
| integer | 否 | |
| integer | 否 | 每页记录数 |
| ... | 另有6个可选参数见references/api-details.md |
javascript
// 按需自动拉取更多分页
for await (const brandListResponse of client.messaging10dlc.brand.list()) {
console.log(brandListResponse.identityStatus);
}主要响应字段:
brandListResponse.pagebrandListResponse.recordsbrandListResponse.totalRecords
Get Brand Feedback By Id
根据ID获取品牌反馈
Fetch the current state before updating, deleting, or making control-flow decisions.
client.messaging10dlc.brand.getFeedback()GET /10dlc/brand/feedback/{brandId}| Parameter | Type | Required | Description |
|---|---|---|---|
| string (UUID) | Yes |
javascript
const response = await client.messaging10dlc.brand.getFeedback('BXXX001');
console.log(response.brandId);Primary response fields:
response.brandIdresponse.category
在更新、删除或进行控制流决策前获取当前状态。
client.messaging10dlc.brand.getFeedback()GET /10dlc/brand/feedback/{brandId}| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| string (UUID) | 是 |
javascript
const response = await client.messaging10dlc.brand.getFeedback('BXXX001');
console.log(response.brandId);主要响应字段:
response.brandIdresponse.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方法和必填参数;完整的可选参数、响应结构和低频webhook负载请参考references/api-details.md。
使用下方任意操作前,请先阅读可选参数章节和响应结构章节,不要猜测缺失的字段。
| 操作 | SDK方法 | 接口地址 | 使用场景 | 必填参数 |
|---|---|---|---|---|
| 获取品牌短信OTP状态 | | | 在更新、删除或进行控制流决策前获取当前状态 | |
| 更新品牌 | | | 查看已存在的品牌注册的当前状态 | |
| 删除品牌 | | | 查看已存在的品牌注册的当前状态 | |
| 重发品牌2FA邮件 | | | 当核心任务未覆盖该流程时,创建或预配置额外资源 | |
| 列出外部审核记录 | | | 在更新、删除或进行控制流决策前获取当前状态 | |
| 申请品牌外部审核 | | | 当核心任务未覆盖该流程时,创建或预配置额外资源 | |
| 导入外部审核记录 | | | 修改现有资源无需重新创建 | |
| 重新审核品牌 | | | 修改现有资源无需重新创建 | |
| 通过品牌ID获取品牌短信OTP状态 | | | 在更新、删除或进行控制流决策前获取当前状态 | |
| 触发品牌短信OTP | | | 当核心任务未覆盖该流程时,创建或预配置额外资源 | |
| 验证品牌短信OTP | | | 修改现有资源无需重新创建 | |
| 列出活动 | | | 在修改资源前查看可用资源或选择已有资源 | 无 |
| 接受共享活动 | | | 当核心任务未覆盖该流程时,创建或预配置额外资源 | |
| 获取活动成本 | | | 在修改资源前查看可用资源或选择已有资源 | 无 |
| 更新活动 | | | 查看已存在的活动注册的当前状态 | |
| 停用活动 | | | 查看已存在的活动注册的当前状态 | |
| 提交活动申诉人工审核 | | | 当核心任务未覆盖该流程时,创建或预配置额外资源 | |
| 获取活动MNO元数据 | | | 在更新、删除或进行控制流决策前获取当前状态 | |
| 获取活动操作状态 | | | 在更新、删除或进行控制流决策前获取当前状态 | |
| 获取OSR活动属性 | | | 在更新、删除或进行控制流决策前获取当前状态 | |
| 获取共享状态 | | | 在更新、删除或进行控制流决策前获取当前状态 | |
| 列出我共享的合作伙伴活动 | | | 在修改资源前查看可用资源或选择已有资源 | 无 |
| 获取共享状态 | | | 在更新、删除或进行控制流决策前获取当前状态 | |
| 列出共享活动 | | | 在修改资源前查看可用资源或选择已有资源 | 无 |
| 获取单个共享活动 | | | 在更新、删除或进行控制流决策前获取当前状态 | |
| 更新单个共享活动 | | | 修改现有资源无需重新创建 | |
| 获取分配任务状态 | | | 在更新、删除或进行控制流决策前获取当前状态 | |
| 获取电话号码状态 | | | 在更新、删除或进行控制流决策前获取当前状态 | |
| 列出电话号码活动关联 | | | 在修改资源前查看可用资源或选择已有资源 | 无 |
| 获取单个电话号码活动关联 | | | 在更新、删除或进行控制流决策前获取当前状态 | |
| 创建新的电话号码活动关联 | | | 修改现有资源无需重新创建 | |
| 删除电话号码活动关联 | | | 移除、解绑或清理现有资源 | |
如需完整的可选参数、全量响应结构和完整的webhook负载,请查看references/api-details.md。