S-Gate API 参考

S-Gate API。

共 49 个端点,其中 18 个只读。每一个都同时是 orbit 命令行中的命令、SDK 中的方法和 MCP 服务器上的工具。

01

通用

端点权限参数CLI · MCP 工具
GET /sgate/overview
Numbers, this month's usage against your packs, and provider readiness
只读—orbit sgate overview
sgate_overview
GET /sgate/usage
Messages this month and the last twelve, against your packs
只读—orbit sgate usage
sgate_usage
02

numbers

端点权限参数CLI · MCP 工具
GET /sgate/numbers
Your numbers and whether each sends and receives messages
只读—orbit sgate numbers list
sgate_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
03

providers

端点权限参数CLI · MCP 工具
GET /sgate/providers
Providers that carry messages to phone numbers, and whether each is ready
只读—orbit sgate providers list
sgate_providers_list
04

messages

端点权限参数CLI · MCP 工具
GET /sgate/messages
Message log, newest first
只读?q string
?number string
?direction in | out
?before integer
?limit integer
orbit sgate messages list
sgate_messages_list
POST /sgate/messages
Send 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 stringorbit sgate messages send
sgate_messages_send
05

optouts

端点权限参数CLI · MCP 工具
GET /sgate/optouts
People who replied STOP to one of your numbers (and START, afterwards)
只读—orbit sgate optouts list
sgate_optouts_list
06

brands

端点权限参数CLI · MCP 工具
GET /sgate/brands
Your US 10DLC brands
只读—orbit sgate brands list
sgate_brands_list
POST /sgate/brands
Register 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 | submittedorbit sgate brands create
sgate_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 stringorbit sgate brands delete <id>
sgate_brands_delete
07

campaigns

端点权限参数CLI · MCP 工具
GET /sgate/campaigns
Your US 10DLC campaigns
只读—orbit sgate campaigns list
sgate_campaigns_list
POST /sgate/campaigns
Register 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 | submittedorbit sgate campaigns create
sgate_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 stringorbit sgate campaigns delete <id>
sgate_campaigns_delete
08

senders

端点权限参数CLI · MCP 工具
GET /sgate/senders
Your sender identities: names recipients see, and the numbers each sends from
只读—orbit sgate senders list
sgate_senders_list
POST /sgate/senders
Add a sender identity (a name goes to review)
读写请求体: name string, description string, numbers string[]orbit sgate senders create
sgate_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 stringorbit sgate senders delete <id>
sgate_senders_delete
09

templates

端点权限参数CLI · MCP 工具
GET /sgate/templates
Your message templates
只读—orbit sgate templates list
sgate_templates_list
POST /sgate/templates
Create a template (version 1)
读写请求体: name string, category transactional | marketing | otp, default_lang string, bodies object, submit booleanorbit sgate templates create
sgate_templates_create
GET /sgate/templates/{id}
One template with its versions
只读id stringorbit 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 stringorbit sgate templates delete <id>
sgate_templates_delete
POST /sgate/templates/{id}/submit
Submit the newest version for approval
读写id stringorbit sgate templates submit <id>
sgate_templates_submit
POST /sgate/templates/{id}/preview
Render a version with values, without sending
读写id string
请求体: lang string, variables object, version latest | approved
orbit sgate templates preview <id>
sgate_templates_preview
10

verifications

端点权限参数CLI · MCP 工具
GET /sgate/verifications
Recent verifications, newest first
只读?limit integerorbit sgate verifications list
sgate_verifications_list
POST /sgate/verifications
Send 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 stringorbit sgate verifications create
sgate_verifications_create
GET /sgate/verifications/{id}
One verification
只读id stringorbit sgate verifications get <id>
sgate_verifications_get
POST /sgate/verifications/{id}/check
Check 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}/resend
Send a new code (after 30 seconds, up to four times); the old one stops working
读写id stringorbit sgate verifications resend <id>
sgate_verifications_resend
POST /sgate/verifications/{id}/cancel
Cancel a pending verification
读写id stringorbit sgate verifications cancel <id>
sgate_verifications_cancel
11

consents

端点权限参数CLI · MCP 工具
GET /sgate/consents
Consent records (opt-in) for marketing
只读?q string
?status granted | revoked
?limit integer
orbit sgate consents list
sgate_consents_list
POST /sgate/consents
Record 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 stringorbit sgate consents create
sgate_consents_create
POST /sgate/consents/import
Record up to 1000 consents at once
读写请求体: records* object[]orbit sgate consents import
sgate_consents_import
DELETE /sgate/consents/{id}
Withdraw a consent (the record is kept as revoked)
读写id stringorbit sgate consents revoke <id>
sgate_consents_revoke
12

scheduled

端点权限参数CLI · MCP 工具
GET /sgate/scheduled
Messages scheduled for later, and what became of them
只读?status stringorbit sgate scheduled list
sgate_scheduled_list
DELETE /sgate/scheduled/{id}
Cancel a scheduled message
读写id stringorbit sgate scheduled cancel <id>
sgate_scheduled_cancel
13

broadcasts

端点权限参数CLI · MCP 工具
GET /sgate/broadcasts
Your broadcasts with their reports
只读—orbit sgate broadcasts list
sgate_broadcasts_list
POST /sgate/broadcasts
Create 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 objectorbit sgate broadcasts create
sgate_broadcasts_create
GET /sgate/broadcasts/{id}
One broadcast and its report
只读id stringorbit 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 stringorbit sgate broadcasts delete <id>
sgate_broadcasts_delete
GET /sgate/broadcasts/{id}/recipients
Per-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}/start
Start 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}/pause
Pause sending
读写id stringorbit sgate broadcasts pause <id>
sgate_broadcasts_pause
POST /sgate/broadcasts/{id}/resume
Resume sending
读写id stringorbit sgate broadcasts resume <id>
sgate_broadcasts_resume
POST /sgate/broadcasts/{id}/cancel
Stop for good; recipients not reached are marked skipped
读写id stringorbit sgate broadcasts cancel <id>
sgate_broadcasts_cancel
继续

相关文档

账户 API 参考

Orbit API 中 账户 的全部 10 个端点:方法与路径、所需令牌权限、参数,以及对应的命令行命令与 MCP 工具。

组织 API 参考

Orbit API 中 组织 的全部 10 个端点:方法与路径、所需令牌权限、参数,以及对应的命令行命令与 MCP 工具。

服务 API 参考

Orbit API 中 服务 的全部 15 个端点:方法与路径、所需令牌权限、参数,以及对应的命令行命令与 MCP 工具。

← 全部文档