账户 API 参考
Orbit API 中 账户 的全部 10 个端点:方法与路径、所需令牌权限、参数,以及对应的命令行命令与 MCP 工具。
共 49 个端点,其中 18 个只读。每一个都同时是 orbit 命令行中的命令、SDK 中的方法和 MCP 服务器上的工具。
| 端点 | 权限 | 参数 | CLI · MCP 工具 |
|---|---|---|---|
GET /sgate/overviewNumbers, this month's usage against your packs, and provider readiness | 只读 | — | orbit sgate overviewsgate_overview |
GET /sgate/usageMessages this month and the last twelve, against your packs | 只读 | — | orbit sgate usagesgate_usage |
| 端点 | 权限 | 参数 | CLI · MCP 工具 |
|---|---|---|---|
GET /sgate/numbersYour numbers and whether each sends and receives messages | 只读 | — | orbit sgate numbers listsgate_numbers_list |
PATCH /sgate/numbers/{number}Turn messaging on or off for a number; set its provider, 10DLC campaign and help reply | 读写 | number string请求体: enabled boolean, provider string, campaign_id string, help_text string | orbit sgate numbers patch <number>sgate_numbers_patch |
| 端点 | 权限 | 参数 | CLI · MCP 工具 |
|---|---|---|---|
GET /sgate/providersProviders that carry messages to phone numbers, and whether each is ready | 只读 | — | orbit sgate providers listsgate_providers_list |
| 端点 | 权限 | 参数 | CLI · MCP 工具 |
|---|---|---|---|
GET /sgate/messagesMessage log, newest first | 只读 | ?q string?number string?direction in | out?before integer?limit integer | orbit sgate messages listsgate_messages_list |
POST /sgate/messagesSend a message from one of your numbers or a sender, as text or from a template, now or later (send_at) | 读写 | 请求体: from string, sender_id string, to* string[], body string, template_id string, variables object, lang string, category transactional | marketing, send_at string, client_ref string | orbit sgate messages sendsgate_messages_send |
| 端点 | 权限 | 参数 | CLI · MCP 工具 |
|---|---|---|---|
GET /sgate/optoutsPeople who replied STOP to one of your numbers (and START, afterwards) | 只读 | — | orbit sgate optouts listsgate_optouts_list |
| 端点 | 权限 | 参数 | CLI · MCP 工具 |
|---|---|---|---|
GET /sgate/brandsYour US 10DLC brands | 只读 | — | orbit sgate brands listsgate_brands_list |
POST /sgate/brandsRegister a brand (entered as a draft) | 读写 | 请求体: legal_name string, display_name string, entity_type private | public | nonprofit | government | sole_proprietor, tax_id string, country string, vertical string, website string, contact_email string, status draft | submitted | orbit sgate brands createsgate_brands_create |
PATCH /sgate/brands/{id}Change a brand, or submit it for review | 读写 | id string请求体: legal_name string, display_name string, entity_type private | public | nonprofit | government | sole_proprietor, tax_id string, country string, vertical string, website string, contact_email string, status draft | submitted | orbit sgate brands patch <id>sgate_brands_patch |
DELETE /sgate/brands/{id}Delete a brand without campaigns | 读写 | id string | orbit sgate brands delete <id>sgate_brands_delete |
| 端点 | 权限 | 参数 | CLI · MCP 工具 |
|---|---|---|---|
GET /sgate/campaignsYour US 10DLC campaigns | 只读 | — | orbit sgate campaigns listsgate_campaigns_list |
POST /sgate/campaignsRegister a campaign under one of your brands (entered as a draft) | 读写 | 请求体: brand_id string, use_case mixed | account_notification | customer_care | delivery_notification | 2fa | marketing | low_volume | charity | polling, description string, message_flow string, samples string[], status draft | submitted | orbit sgate campaigns createsgate_campaigns_create |
PATCH /sgate/campaigns/{id}Change a campaign, or submit it for review | 读写 | id string请求体: brand_id string, use_case mixed | account_notification | customer_care | delivery_notification | 2fa | marketing | low_volume | charity | polling, description string, message_flow string, samples string[], status draft | submitted | orbit sgate campaigns patch <id>sgate_campaigns_patch |
DELETE /sgate/campaigns/{id}Delete a campaign; numbers sending under it are detached | 读写 | id string | orbit sgate campaigns delete <id>sgate_campaigns_delete |
| 端点 | 权限 | 参数 | CLI · MCP 工具 |
|---|---|---|---|
GET /sgate/sendersYour sender identities: names recipients see, and the numbers each sends from | 只读 | — | orbit sgate senders listsgate_senders_list |
POST /sgate/sendersAdd a sender identity (a name goes to review) | 读写 | 请求体: name string, description string, numbers string[] | orbit sgate senders createsgate_senders_create |
PATCH /sgate/senders/{id}Change a sender; a new name goes to review again | 读写 | id string请求体: name string, description string, numbers string[] | orbit sgate senders patch <id>sgate_senders_patch |
DELETE /sgate/senders/{id}Delete a sender | 读写 | id string | orbit sgate senders delete <id>sgate_senders_delete |
| 端点 | 权限 | 参数 | CLI · MCP 工具 |
|---|---|---|---|
GET /sgate/templatesYour message templates | 只读 | — | orbit sgate templates listsgate_templates_list |
POST /sgate/templatesCreate a template (version 1) | 读写 | 请求体: name string, category transactional | marketing | otp, default_lang string, bodies object, submit boolean | orbit sgate templates createsgate_templates_create |
GET /sgate/templates/{id}One template with its versions | 只读 | id string | orbit sgate templates get <id>sgate_templates_get |
PATCH /sgate/templates/{id}Change a template; new text makes a new version | 读写 | id string请求体: name string, category transactional | marketing | otp, default_lang string, bodies object, submit boolean | orbit sgate templates patch <id>sgate_templates_patch |
DELETE /sgate/templates/{id}Delete a template | 读写 | id string | orbit sgate templates delete <id>sgate_templates_delete |
POST /sgate/templates/{id}/submitSubmit the newest version for approval | 读写 | id string | orbit sgate templates submit <id>sgate_templates_submit |
POST /sgate/templates/{id}/previewRender a version with values, without sending | 读写 | id string请求体: lang string, variables object, version latest | approved | orbit sgate templates preview <id>sgate_templates_preview |
| 端点 | 权限 | 参数 | CLI · MCP 工具 |
|---|---|---|---|
GET /sgate/verificationsRecent verifications, newest first | 只读 | ?limit integer | orbit sgate verifications listsgate_verifications_list |
POST /sgate/verificationsSend a one-time code to a YunZheng number. Events: sgate.verification.approved | failed | expired | canceled | 读写 | 请求体: to* string, sender_id string, from string, code_length integer, ttl_s integer, max_attempts integer, lang string, template_id string, variables object, client_ref string | orbit sgate verifications createsgate_verifications_create |
GET /sgate/verifications/{id}One verification | 只读 | id string | orbit sgate verifications get <id>sgate_verifications_get |
POST /sgate/verifications/{id}/checkCheck the code the person entered; every check uses an attempt | 读写 | id string请求体: code* string | orbit sgate verifications check <id>sgate_verifications_check |
POST /sgate/verifications/{id}/resendSend a new code (after 30 seconds, up to four times); the old one stops working | 读写 | id string | orbit sgate verifications resend <id>sgate_verifications_resend |
POST /sgate/verifications/{id}/cancelCancel a pending verification | 读写 | id string | orbit sgate verifications cancel <id>sgate_verifications_cancel |
| 端点 | 权限 | 参数 | CLI · MCP 工具 |
|---|---|---|---|
GET /sgate/consentsConsent records (opt-in) for marketing | 只读 | ?q string?status granted | revoked?limit integer | orbit sgate consents listsgate_consents_list |
POST /sgate/consentsRecord that a person agreed to receive marketing | 读写 | 请求体: recipient* string, sender_id string, source web_form | checkout | keyword | paper | import | api | other, proof* string, granted_at string | orbit sgate consents createsgate_consents_create |
POST /sgate/consents/importRecord up to 1000 consents at once | 读写 | 请求体: records* object[] | orbit sgate consents importsgate_consents_import |
DELETE /sgate/consents/{id}Withdraw a consent (the record is kept as revoked) | 读写 | id string | orbit sgate consents revoke <id>sgate_consents_revoke |
| 端点 | 权限 | 参数 | CLI · MCP 工具 |
|---|---|---|---|
GET /sgate/scheduledMessages scheduled for later, and what became of them | 只读 | ?status string | orbit sgate scheduled listsgate_scheduled_list |
DELETE /sgate/scheduled/{id}Cancel a scheduled message | 读写 | id string | orbit sgate scheduled cancel <id>sgate_scheduled_cancel |
| 端点 | 权限 | 参数 | CLI · MCP 工具 |
|---|---|---|---|
GET /sgate/broadcastsYour broadcasts with their reports | 只读 | — | orbit sgate broadcasts listsgate_broadcasts_list |
POST /sgate/broadcastsCreate a broadcast (a draft) to a list of YunZheng numbers | 读写 | 请求体: name string, category transactional | marketing, sender_id string, from string, template_id string, lang string, body string, rate_per_min integer, recipients object | orbit sgate broadcasts createsgate_broadcasts_create |
GET /sgate/broadcasts/{id}One broadcast and its report | 只读 | id string | orbit sgate broadcasts get <id>sgate_broadcasts_get |
PATCH /sgate/broadcasts/{id}Change a draft broadcast | 读写 | id string请求体: name string, category transactional | marketing, sender_id string, from string, template_id string, lang string, body string, rate_per_min integer, recipients object | orbit sgate broadcasts patch <id>sgate_broadcasts_patch |
DELETE /sgate/broadcasts/{id}Delete a broadcast that is not sending | 读写 | id string | orbit sgate broadcasts delete <id>sgate_broadcasts_delete |
GET /sgate/broadcasts/{id}/recipientsPer-recipient results | 只读 | id string?status pending | sent | delivered | failed | opted_out | no_consent | skipped?limit integer?offset integer | orbit sgate broadcasts recipients <id>sgate_broadcasts_recipients |
POST /sgate/broadcasts/{id}/startStart now or at start_at. Event when finished: sgate.broadcast.completed | 读写 | id string请求体: start_at string | orbit sgate broadcasts start <id>sgate_broadcasts_start |
POST /sgate/broadcasts/{id}/pausePause sending | 读写 | id string | orbit sgate broadcasts pause <id>sgate_broadcasts_pause |
POST /sgate/broadcasts/{id}/resumeResume sending | 读写 | id string | orbit sgate broadcasts resume <id>sgate_broadcasts_resume |
POST /sgate/broadcasts/{id}/cancelStop for good; recipients not reached are marked skipped | 读写 | id string | orbit sgate broadcasts cancel <id>sgate_broadcasts_cancel |