Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问许可证需确认审计通过

sinch-numbers-apisinch numbers API 搜索

Agent Skill

用于辅助 API 设计、接口文档、请求响应结构和服务集成说明。它适合让 Agent 梳理 endpoint、生成 OpenAPI 草稿、检查字段命名、整理错误码或辅助前后端联调。使用时需要确认真实业务语义、鉴权方式、分页和错误处理规则;涉及生成接口文档时,应避免凭空补字段,最好从现有代码、schema 或接口样例中提取事实。

总安装

1,607

周安装

65

GitHub Stars

7

下载量

504
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:sinch-numbers-api(sinch numbers API 搜索)
来源仓库:https://github.com/sinch/skills
仓库路径:skills/sinch-numbers-api
安装命令:
npx skills add https://github.com/sinch/skills --skill sinch-numbers-api
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/sinch/skills --skill sinch-numbers-api

简介

用于辅助 API 设计、接口文档和请求响应结构梳理。

  • 适合在 Codex、Claude、Cursor、Gemini CLI 中生成 OpenAPI 草稿或检查字段命名。
  • 使用时需确认业务语义、鉴权方式和错误处理规则,避免凭空补字段。
  • 建议从现有代码、schema 或接口样例中提取事实,确保信息准确。
  • 安装前请核实权限范围和维护状态,避免触发不必要的网络或文件操作。

SKILL.md

Sinch Numbers API

The Numbers API lets you search, activate, manage, and release phone numbers — the prerequisite for SMS, Voice, and Conversation APIs.

Instructions

Step 1: Choose approach

  • SDK project? Default to SDK if @sinch/sdk-core (Node), sinch (Python), or com.sinch.sdk (Java) is present.
  • Direct HTTP? Use curl/fetch with Basic auth.

For SDK code, read the correct reference before generating any code:

For direct HTTP calls, see Numbers API Reference.

Step 2: Authenticate

See sinch-authentication for full setup.

Step 3: Verify connectivity

curl -X GET \
  "https://numbers.api.sinch.com/v1/projects/$SINCH_PROJECT_ID/activeNumbers?regionCode=US&type=LOCAL&pageSize=10" \
  -H "Authorization: Bearer $SINCH_ACCESS_TOKEN" \
  -H "Content-Type: application/json"

A 200 response confirms credentials and project access.

Key Concepts

  • Active Number — A phone number currently rented and owned by your project. Managed via /activeNumbers.
  • Available Number — A phone number available for rent in a given region and type. Searched via /availableNumbers.
  • Number TypeLOCAL, MOBILE, or TOLL_FREE. Required when searching or listing numbers.
  • Region Code — ISO 3166-1 alpha-2 country code (e.g., US, GB, SE). Required for search and list operations.
  • SMS Configuration — Settings for SMS on a number: servicePlanId, campaignId (US 10DLC only), scheduledProvisioning status.
  • Voice Configuration — Discriminated union on type: RTC (requires appId), EST (requires trunkId), FAX (requires serviceId).
  • Callback Configuration — Project-level HMAC secret for signature verification on number lifecycle webhooks. Does NOT set a callback URL.
  • Scheduled Provisioning — Async provisioning status for SMS/voice config. Status values: WAITING, IN_PROGRESS, FAILED.

Workflows

Search and rent a number

  1. GET /availableRegions — discover valid regionCode values
  2. GET /availableNumbers?regionCode={code}&type={type} — search (both params required)
  3. Pick a number → POST /availableNumbers/{phoneNumber}:rent with config body
  4. GET /activeNumbers/{phoneNumber} — confirm activation

Use POST /availableNumbers:rentAny to skip step 3 (US LOCAL numbers only).

Safe retries for billable operations

Before retrying any potentially billable action (for example :rent, :rentAny, or :release) after an incomplete/uncertain response:

  1. Check current state first using a read endpoint (GET /activeNumbers/{phoneNumber} or GET /activeNumbers with filters)
  2. Retry only if the verification shows the prior action did not succeed
  3. If state is ambiguous, prefer listing active numbers and matching on phoneNumber before issuing another billable request

Update number configuration

  1. GET /activeNumbers/{phoneNumber} — check current config
  2. PATCH /activeNumbers/{phoneNumber} — set displayName, smsConfiguration, or voiceConfiguration
  3. To unlink, send empty string "" in servicePlanId or campaignId

Release a number

POST /activeNumbers/{phoneNumber}:release

Fetch all numbers to JSON

Run node scripts/get_numbers.cjs --output numbers.json (uses SINCH_PROJECT_ID, SINCH_KEY_ID, SINCH_KEY_SECRET env vars). Supports --region and --type filters.

Emergency addresses

Use the emergency address endpoints on active numbers: GET, provision, deprovision, validate. See API reference.

Number orders (KYC-regulated regions)

Use the numberOrders endpoints: lookupNumberRequirementscreateNumberOrder → upload registration/attachments → submit. See API reference.

Imported numbers

A separate API at https://imported.numbers.api.sinch.com handles importing non-Sinch numbers (DCA) and hosting orders. See API reference.

Gotchas

  • Param names differ between endpoints: GET /activeNumbers uses capability (singular) and pageSize. GET /availableNumbers uses capabilities (plural) and size (single page, no pagination).
  • type defaults to MOBILE — omitting it returns only MOBILE numbers, not all types.
  • Always set pageSize explicitly on GET /activeNumbers — no documented default.
  • rentAny is US LOCAL only — use :rent for other types/regions.
  • Do not blindly retry billable actions — if output is incomplete, verify state via GET /activeNumbers/{phoneNumber} (or list + filter) before retrying :rent, :rentAny, or :release.
  • Never pass both config objects unnecessarily — sending empty voiceConfiguration when you only need SMS will error.
  • Unlink before relinking — a number must be detached from its current service/campaign before attaching to a new one.
  • campaignId is US-only — required for 10DLC, irrelevant elsewhere.
  • scheduledProvisioning/scheduledVoiceProvisioning are objects (with status, lastUpdatedTime, errorCodes), not strings. Status values: PROVISIONING_STATUS_UNSPECIFIED, WAITING, IN_PROGRESS, FAILED.
  • voiceConfiguration is a discriminated union on type: RTCappId, ESTtrunkId, FAXserviceId.
  • Callback config (PATCH /callbackConfiguration) sets only hmacSecret for HMAC-SHA1 signature verification — it does not set a callback URL.
  • Callback IP allowlist: 54.76.19.159, 54.78.194.39, 54.155.83.128.

Links

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

36.52%
按下载量换算184

Claude

31.68%
按下载量换算160

Cursor

19.02%
按下载量换算96

Gemini CLI

10.69%
按下载量换算54

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills