CtrlK
BlogDocsLog inGet started
Tessl Logo

sinch/skills

Official Sinch API skills for AI coding agents — SMS, Voice, Verification, Numbers, Mailgun email, and more.

69

Quality

87%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide

SecuritybySnyk

Low

Low-risk findings worth noting

Overview
Quality
Evals
Security
Files

python.mdskills/sinch-numbers-api/references/

Summary — not the spec. This file orients you and links to the authoritative developers.sinch.com doc; it may lag, omit fields, or simplify nesting. Do not copy field names, nesting, encodings, or enums from here into shipped code without confirming them in the linked doc. See "Source of Truth" in this skill's SKILL.md.

Python — Numbers SDK Reference

pip install sinch (v2.0.0+)

SDK uses snake_case attributes mapping to camelCase JSON (e.g., phone_numberphoneNumber). Response models are Pydantic instances with typed fields.

Initialization

import os
from sinch import SinchClient

sinch_client = SinchClient(
    project_id=os.environ["SINCH_PROJECT_ID"],
    key_id=os.environ["SINCH_KEY_ID"],
    key_secret=os.environ["SINCH_KEY_SECRET"]
)

Available Numbers

Search

response = sinch_client.numbers.search_for_available_numbers(
    region_code="US",
    number_type="LOCAL",
)
for number in response.iterator():
    print(number.phone_number)

Check availability

result = sinch_client.numbers.check_availability(
    phone_number="+12025550134"
)

Rent a specific number

rented = sinch_client.numbers.rent(
    phone_number="+12025550134",
    sms_configuration={"service_plan_id": "YOUR_SERVICE_PLAN_ID"}
)

Rent any matching number

rented = sinch_client.numbers.rent_any(
    region_code="US",
    number_type="LOCAL",
    sms_configuration={"service_plan_id": "YOUR_SERVICE_PLAN_ID"}
)

Active Numbers

List

response = sinch_client.numbers.list(
    region_code="US",
    number_type="LOCAL",
)

Paginate

all_numbers = []
response = sinch_client.numbers.list(
    region_code="US",
    number_type="LOCAL",
)
for number in response.iterator():
    all_numbers.append(number)

Or page-by-page:

page = sinch_client.numbers.list(region_code="US", number_type="LOCAL")
while True:
    print(page)
    if not page.has_next_page:
        break
    page = page.next_page()

Get

number = sinch_client.numbers.get(phone_number="+12025550134")

Update

sinch_client.numbers.update(
    phone_number="+12025550134",
    display_name="Updated Name",
    sms_configuration={"service_plan_id": "NEW_SERVICE_PLAN_ID"}
)

Release

sinch_client.numbers.release(phone_number="+12025550134")

Event Destinations Configuration

# Get current config
config = sinch_client.numbers.event_destinations.get()

# Update HMAC secret
sinch_client.numbers.event_destinations.update(hmac_secret="YOUR_HMAC_SECRET")

skills

CHANGELOG.md

README.md

tile.json