Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Create and manage messaging profiles with number pools, sticky sender, and geomatch features. Configure short codes for high-volume messaging. This skill provides Python SDK examples.
.claude/skills/team-telnyx-telnyx-messaging-profiles-python/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-02 | ✗→✓ | ▲ Improved | 74% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 111% | 0% |
| case-01 | ✗→✓ | ▲ Improved | 79% | 0% |
| case-05 | ✗→✓ | ▲ Improved | 212% | 0% |
| case-06 | ✗→✓ | ▲ Improved | 191% | 0% |
<!-- Auto-generated from Telnyx OpenAPI specs. Do not edit. -->
bashpip install telnyx
pythonimport os from telnyx import Telnyx client = Telnyx( api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted )
All examples below assume client is already initialized as shown above.
All API calls can fail with network errors, rate limits (429), validation errors (422), or authentication errors (401). Always handle errors in production code:
pythonimport telnyx try: result = client.messages.send(to="+13125550001", from_="+13125550002", text="Hello") except telnyx.APIConnectionError: print("Network error — check connectivity and retry") except telnyx.RateLimitError: # 429: rate limited — wait and retry with exponential backoff import time time.sleep(1) # Check Retry-After header for actual delay except telnyx.APIStatusError as e: print(f"API error {e.status_code}: {e.message}") if e.status_code == 422: print("Validation error — check required fields and formats")
Common error codes: 401 invalid API key, 403 insufficient permissions, 404 resource not found, 422 validation error (check field formats), 429 rate limited (retry with exponential backoff).
for item in page_result: to iterate through all pages automatically.GET /messaging_profiles
pythonpage = client.messaging_profiles.list() page = page.data[0] print(page.id)
Returns: ai_assistant_id (string | null), alpha_sender (string | null), created_at (date-time), daily_spend_limit (string), daily_spend_limit_enabled (boolean), enabled (boolean), health_webhook_url (url), id (uuid), mms_fall_back_to_sms (boolean), mms_transcoding (boolean), mobile_only (boolean), name (string), number_pool_settings (object | null), organization_id (string), record_type (enum: messaging_profile), redaction_enabled (boolean), redaction_level (integer), resource_group_id (string | null), smart_encoding (boolean), updated_at (date-time), url_shortener_settings (object | null), v1_secret (string), webhook_api_version (enum: 1, 2, 2010-04-01), webhook_failover_url (url), webhook_url (url), whitelisted_destinations (arraystring])
POST /messaging_profiles — Required: name, whitelisted_destinations
Optional: ai_assistant_id (string | null), alpha_sender (string | null), daily_spend_limit (string), daily_spend_limit_enabled (boolean), enabled (boolean), health_webhook_url (url), mms_fall_back_to_sms (boolean), mms_transcoding (boolean), mobile_only (boolean), number_pool_settings (object | null), resource_group_id (string | null), smart_encoding (boolean), url_shortener_settings (object | null), webhook_api_version (enum: 1, 2, 2010-04-01), webhook_failover_url (url), webhook_url (url)
pythonmessaging_profile = client.messaging_profiles.create( name="My name", whitelisted_destinations=["US"], ) print(messaging_profile.data)
Returns: ai_assistant_id (string | null), alpha_sender (string | null), created_at (date-time), daily_spend_limit (string), daily_spend_limit_enabled (boolean), enabled (boolean), health_webhook_url (url), id (uuid), mms_fall_back_to_sms (boolean), mms_transcoding (boolean), mobile_only (boolean), name (string), number_pool_settings (object | null), organization_id (string), record_type (enum: messaging_profile), redaction_enabled (boolean), redaction_level (integer), resource_group_id (string | null), smart_encoding (boolean), updated_at (date-time), url_shortener_settings (object | null), v1_secret (string), webhook_api_version (enum: 1, 2, 2010-04-01), webhook_failover_url (url), webhook_url (url), whitelisted_destinations (arraystring])
GET /messaging_profiles/{id}
pythonmessaging_profile = client.messaging_profiles.retrieve( "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", ) print(messaging_profile.data)
Returns: ai_assistant_id (string | null), alpha_sender (string | null), created_at (date-time), daily_spend_limit (string), daily_spend_limit_enabled (boolean), enabled (boolean), health_webhook_url (url), id (uuid), mms_fall_back_to_sms (boolean), mms_transcoding (boolean), mobile_only (boolean), name (string), number_pool_settings (object | null), organization_id (string), record_type (enum: messaging_profile), redaction_enabled (boolean), redaction_level (integer), resource_group_id (string | null), smart_encoding (boolean), updated_at (date-time), url_shortener_settings (object | null), v1_secret (string), webhook_api_version (enum: 1, 2, 2010-04-01), webhook_failover_url (url), webhook_url (url), whitelisted_destinations (arraystring])
PATCH /messaging_profiles/{id}
Optional: ai_assistant_id (string | null), alpha_sender (string | null), created_at (date-time), daily_spend_limit (string), daily_spend_limit_enabled (boolean), enabled (boolean), id (uuid), mms_fall_back_to_sms (boolean), mms_transcoding (boolean), mobile_only (boolean), name (string), number_pool_settings (object | null), record_type (enum: messaging_profile), smart_encoding (boolean), updated_at (date-time), url_shortener_settings (object | null), v1_secret (string), webhook_api_version (enum: 1, 2, 2010-04-01), webhook_failover_url (url), webhook_url (url), whitelisted_destinations (arraystring])
pythonmessaging_profile = client.messaging_profiles.update( messaging_profile_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", ) print(messaging_profile.data)
Returns: ai_assistant_id (string | null), alpha_sender (string | null), created_at (date-time), daily_spend_limit (string), daily_spend_limit_enabled (boolean), enabled (boolean), health_webhook_url (url), id (uuid), mms_fall_back_to_sms (boolean), mms_transcoding (boolean), mobile_only (boolean), name (string), number_pool_settings (object | null), organization_id (string), record_type (enum: messaging_profile), redaction_enabled (boolean), redaction_level (integer), resource_group_id (string | null), smart_encoding (boolean), updated_at (date-time), url_shortener_settings (object | null), v1_secret (string), webhook_api_version (enum: 1, 2, 2010-04-01), webhook_failover_url (url), webhook_url (url), whitelisted_destinations (arraystring])
DELETE /messaging_profiles/{id}
pythonmessaging_profile = client.messaging_profiles.delete( "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", ) print(messaging_profile.data)
Returns: ai_assistant_id (string | null), alpha_sender (string | null), created_at (date-time), daily_spend_limit (string), daily_spend_limit_enabled (boolean), enabled (boolean), health_webhook_url (url), id (uuid), mms_fall_back_to_sms (boolean), mms_transcoding (boolean), mobile_only (boolean), name (string), number_pool_settings (object | null), organization_id (string), record_type (enum: messaging_profile), redaction_enabled (boolean), redaction_level (integer), resource_group_id (string | null), smart_encoding (boolean), updated_at (date-time), url_shortener_settings (object | null), v1_secret (string), webhook_api_version (enum: 1, 2, 2010-04-01), webhook_failover_url (url), webhook_url (url), whitelisted_destinations (arraystring])
GET /messaging_profiles/{id}/phone_numbers
pythonpage = client.messaging_profiles.list_phone_numbers( messaging_profile_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", ) page = page.data[0] print(page.id)
Returns: country_code (string), created_at (date-time), eligible_messaging_products (arraystring]), features (object), health (object), id (string), messaging_product (string), messaging_profile_id (string | null), organization_id (string), phone_number (string), record_type (enum: messaging_phone_number, messaging_settings), tags (arraystring]), traffic_type (string), type (enum: long-code, toll-free, short-code, longcode, tollfree, shortcode), updated_at (date-time)
GET /messaging_profiles/{id}/short_codes
pythonpage = client.messaging_profiles.list_short_codes( messaging_profile_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", ) page = page.data[0] print(page.messaging_profile_id)
Returns: country_code (string), created_at (date-time), id (uuid), messaging_profile_id (string | null), record_type (enum: short_code), short_code (string), tags (array), updated_at (date-time)
GET /short_codes
pythonpage = client.short_codes.list() page = page.data[0] print(page.messaging_profile_id)
Returns: country_code (string), created_at (date-time), id (uuid), messaging_profile_id (string | null), record_type (enum: short_code), short_code (string), tags (array), updated_at (date-time)
GET /short_codes/{id}
pythonshort_code = client.short_codes.retrieve( "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", ) print(short_code.data)
Returns: country_code (string), created_at (date-time), id (uuid), messaging_profile_id (string | null), record_type (enum: short_code), short_code (string), tags (array), updated_at (date-time)
Update the settings for a specific short code. To unbind a short code from a profile, set the messaging_profile_id to null or an empty string. To add or update tags, include the tags field as an array of strings.
PATCH /short_codes/{id} — Required: messaging_profile_id
Optional: tags (array)
pythonshort_code = client.short_codes.update( id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", messaging_profile_id="abc85f64-5717-4562-b3fc-2c9600000000", ) print(short_code.data)
Returns: country_code (string), created_at (date-time), id (uuid), messaging_profile_id (string | null), record_type (enum: short_code), short_code (string), tags (array), updated_at (date-time)
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-02 | fail→pass | 16,262 | 11,170 | -31% | 1 | 1 | 0% | 3,445 | 6,011 | +74% | 0 | 0 | — |
case-03 | fail→pass | 12,331 | 7,994 | -35% | 1 | 1 | 0% | 2,512 | 5,293 | +111% | 0 | 0 | — |
case-01 | fail→pass | 12,148 | 6,475 | -47% | 1 | 1 | 0% | 2,728 | 4,886 | +79% | 0 | 0 | — |
case-04 | pass→pass | 5,807 | 2,124 | -63% | 1 | 1 | 0% | 1,065 | 3,960 | +272% | 0 | 0 | — |
case-05 | fail→pass | 7,612 | 4,616 | -39% | 1 | 1 | 0% | 1,455 | 4,538 | +212% | 0 | 0 | — |
case-06 | fail→pass | 6,967 | 2,793 | -60% | 1 | 1 | 0% | 1,425 | 4,144 | +191% | 0 | 0 | — |
case-07 | fail→pass | 6,697 | 3,511 | -48% | 1 | 1 | 0% | 1,348 | 4,366 | +224% | 0 | 0 | — |
case-08 | fail→pass | 5,743 | 6,537 | +14% | 1 | 1 | 0% | 1,072 | 4,849 | +352% | 0 | 0 | — |
case-09 | fail→pass | 4,665 | 2,537 | -46% | 1 | 1 | 0% | 936 | 4,067 | +335% | 0 | 0 | — |
case-10 | fail→pass | 6,284 | 4,065 | -35% | 1 | 1 | 0% | 1,347 | 4,444 | +230% | 0 | 0 | — |
case-11 | pass→pass | 4,701 | 2,755 | -41% | 1 | 1 | 0% | 811 | 4,074 | +402% | 0 | 0 | — |
case-12 | pass→pass | 11,581 | 6,090 | -47% | 1 | 1 | 0% | 2,323 | 4,804 | +107% | 0 | 0 | — |
case-13 | fail→pass | 8,369 | 3,874 | -54% | 1 | 1 | 0% | 1,685 | 4,295 | +155% | 0 | 0 | — |
case-14 | pass→pass | 5,624 | 3,189 | -43% | 1 | 1 | 0% | 1,132 | 4,210 | +272% | 0 | 0 | — |
case-15 | pass→pass | 5,529 | 3,888 | -30% | 1 | 1 | 0% | 1,053 | 4,339 | +312% | 0 | 0 | — |
case-16 | fail→pass | 12,300 | 3,996 | -68% | 1 | 1 | 0% | 2,382 | 4,384 | +84% | 0 | 0 | — |
case-17 | fail→pass | 6,369 | 3,503 | -45% | 1 | 1 | 0% | 1,174 | 4,248 | +262% | 0 | 0 | — |
case-18 | fail→pass | 6,915 | 2,825 | -59% | 1 | 1 | 0% | 1,278 | 4,045 | +217% | 0 | 0 | — |
case-19 | pass→pass | 5,045 | 3,830 | -24% | 1 | 1 | 0% | 1,025 | 4,368 | +326% | 0 | 0 | — |
case-20 | fail→pass | 4,626 | 3,113 | -33% | 1 | 1 | 0% | 898 | 4,246 | +373% | 0 | 0 | — |
case-21 | pass→pass | 9,567 | 6,143 | -36% | 1 | 1 | 0% | 1,789 | 4,777 | +167% | 0 | 0 | — |
case-22 | pass→pass | 5,179 | 6,091 | +18% | 1 | 1 | 0% | 962 | 4,791 | +398% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +64 percentage points is the difference between those two pass rates over the 22 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.