Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Manage port-out requests when numbers are being ported away from Telnyx. List, view, and update port-out status. This skill provides Python SDK examples.
.claude/skills/team-telnyx-telnyx-porting-out-python/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 69% | 0% |
| case-02 | ✗→✓ | ▲ Improved | 36% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 114% | 0% |
| case-04 | ✗→✓ | ▲ Improved | 247% | 0% |
| case-05 | ✗→✓ | ▲ Improved | 157% | 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.Returns the portout requests according to filters
GET /portouts
pythonpage = client.portouts.list() page = page.data[0] print(page.id)
Returns: already_ported (boolean), authorized_name (string), carrier_name (string), city (string), created_at (string), current_carrier (string), end_user_name (string), foc_date (string), host_messaging (boolean), id (string), inserted_at (string), lsr (arraystring]), phone_numbers (arraystring]), pon (string), reason (string | null), record_type (string), rejection_code (integer), requested_foc_date (string), service_address (string), spid (string), state (string), status (enum: pending, authorized, ported, rejected, rejected-pending, canceled), support_key (string), updated_at (string), user_id (uuid), vendor (uuid), zip (string)
Returns a list of all port-out events.
GET /portouts/events
pythonpage = client.portouts.events.list() page = page.data[0] print(page)
Returns: available_notification_methods (arraystring]), created_at (date-time), event_type (enum: portout.status_changed, portout.foc_date_changed, portout.new_comment), id (uuid), payload (object), payload_status (enum: created, completed), portout_id (uuid), record_type (string), updated_at (date-time)
Show a specific port-out event.
GET /portouts/events/{id}
pythonevent = client.portouts.events.retrieve( "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", ) print(event.data)
Returns: available_notification_methods (arraystring]), created_at (date-time), event_type (enum: portout.status_changed, portout.foc_date_changed, portout.new_comment), id (uuid), payload (object), payload_status (enum: created, completed), portout_id (uuid), record_type (string), updated_at (date-time)
Republish a specific port-out event.
POST /portouts/events/{id}/republish
pythonclient.portouts.events.republish( "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", )
Given a port-out ID, list rejection codes that are eligible for that port-out
GET /portouts/rejections/{portout_id}
pythonresponse = client.portouts.list_rejection_codes( portout_id="329d6658-8f93-405d-862f-648776e8afd7", ) print(response.data)
Returns: code (integer), description (string), reason_required (boolean)
List the reports generated about port-out operations.
GET /portouts/reports
pythonpage = client.portouts.reports.list() page = page.data[0] print(page.id)
Returns: created_at (date-time), document_id (uuid), id (uuid), params (object), record_type (string), report_type (enum: export_portouts_csv), status (enum: pending, completed), updated_at (date-time)
Generate reports about port-out operations.
POST /portouts/reports
pythonreport = client.portouts.reports.create( params={ "filters": {} }, report_type="export_portouts_csv", ) print(report.data)
Returns: created_at (date-time), document_id (uuid), id (uuid), params (object), record_type (string), report_type (enum: export_portouts_csv), status (enum: pending, completed), updated_at (date-time)
Retrieve a specific report generated.
GET /portouts/reports/{id}
pythonreport = client.portouts.reports.retrieve( "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", ) print(report.data)
Returns: created_at (date-time), document_id (uuid), id (uuid), params (object), record_type (string), report_type (enum: export_portouts_csv), status (enum: pending, completed), updated_at (date-time)
Returns the portout request based on the ID provided
GET /portouts/{id}
pythonportout = client.portouts.retrieve( "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", ) print(portout.data)
Returns: already_ported (boolean), authorized_name (string), carrier_name (string), city (string), created_at (string), current_carrier (string), end_user_name (string), foc_date (string), host_messaging (boolean), id (string), inserted_at (string), lsr (arraystring]), phone_numbers (arraystring]), pon (string), reason (string | null), record_type (string), rejection_code (integer), requested_foc_date (string), service_address (string), spid (string), state (string), status (enum: pending, authorized, ported, rejected, rejected-pending, canceled), support_key (string), updated_at (string), user_id (uuid), vendor (uuid), zip (string)
Returns a list of comments for a portout request.
GET /portouts/{id}/comments
pythoncomments = client.portouts.comments.list( "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", ) print(comments.data)
Returns: body (string), created_at (string), id (string), portout_id (string), record_type (string), user_id (string)
Creates a comment on a portout request.
POST /portouts/{id}/comments
Optional: body (string)
pythoncomment = client.portouts.comments.create( id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", ) print(comment.data)
Returns: body (string), created_at (string), id (string), portout_id (string), record_type (string), user_id (string)
List every supporting documents for a portout request.
GET /portouts/{id}/supporting_documents
pythonsupporting_documents = client.portouts.supporting_documents.list( "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", ) print(supporting_documents.data)
Returns: created_at (string), document_id (uuid), id (uuid), portout_id (uuid), record_type (string), type (enum: loa, invoice), updated_at (string)
Creates a list of supporting documents on a portout request.
POST /portouts/{id}/supporting_documents
Optional: documents (arrayobject])
pythonsupporting_document = client.portouts.supporting_documents.create( id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", ) print(supporting_document.data)
Returns: created_at (string), document_id (uuid), id (uuid), portout_id (uuid), record_type (string), type (enum: loa, invoice), updated_at (string)
Authorize or reject portout request
PATCH /portouts/{id}/{status} — Required: reason
Optional: host_messaging (boolean)
pythonresponse = client.portouts.update_status( status="authorized", id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", reason="I do not recognize this transaction", ) print(response.data)
Returns: already_ported (boolean), authorized_name (string), carrier_name (string), city (string), created_at (string), current_carrier (string), end_user_name (string), foc_date (string), host_messaging (boolean), id (string), inserted_at (string), lsr (arraystring]), phone_numbers (arraystring]), pon (string), reason (string | null), record_type (string), rejection_code (integer), requested_foc_date (string), service_address (string), spid (string), state (string), status (enum: pending, authorized, ported, rejected, rejected-pending, canceled), support_key (string), updated_at (string), user_id (uuid), vendor (uuid), zip (string)
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→pass | 15,454 | 9,160 | -41% | 1 | 1 | 0% | 3,073 | 5,181 | +69% | 0 | 0 | — |
case-02 | fail→pass | 18,326 | 10,681 | -42% | 1 | 1 | 0% | 3,895 | 5,300 | +36% | 0 | 0 | — |
case-03 | fail→pass | 10,844 | 8,084 | -25% | 1 | 1 | 0% | 2,318 | 4,954 | +114% | 0 | 0 | — |
case-04 | fail→pass | 5,724 | 3,843 | -33% | 1 | 1 | 0% | 1,097 | 3,809 | +247% | 0 | 0 | — |
case-05 | fail→pass | 6,683 | 3,288 | -51% | 1 | 1 | 0% | 1,451 | 3,736 | +157% | 0 | 0 | — |
case-06 | fail→pass | 7,382 | 3,065 | -58% | 1 | 1 | 0% | 1,512 | 3,674 | +143% | 0 | 0 | — |
case-07 | fail→pass | 11,788 | 2,810 | -76% | 1 | 1 | 0% | 2,632 | 3,640 | +38% | 0 | 0 | — |
case-08 | fail→pass | 9,775 | 2,134 | -78% | 1 | 1 | 0% | 2,050 | 3,532 | +72% | 0 | 0 | — |
case-09 | fail→pass | 14,029 | 3,521 | -75% | 1 | 1 | 0% | 3,020 | 3,837 | +27% | 0 | 0 | — |
case-10 | fail→pass | 9,310 | 4,576 | -51% | 1 | 1 | 0% | 1,865 | 4,007 | +115% | 0 | 0 | — |
case-11 | fail→pass | 7,943 | 3,082 | -61% | 1 | 1 | 0% | 1,577 | 3,715 | +136% | 0 | 0 | — |
case-12 | fail→pass | 8,994 | 4,446 | -51% | 1 | 1 | 0% | 1,739 | 4,059 | +133% | 0 | 0 | — |
case-13 | fail→pass | 42,858 | 2,171 | -95% | 1 | 1 | 0% | 1,474 | 3,482 | +136% | 0 | 0 | — |
case-14 | fail→pass | 7,056 | 1,908 | -73% | 1 | 1 | 0% | 1,545 | 3,450 | +123% | 0 | 0 | — |
case-15 | fail→pass | 10,244 | 2,368 | -77% | 1 | 1 | 0% | 1,867 | 3,484 | +87% | 0 | 0 | — |
case-16 | pass→pass | 12,369 | 6,036 | -51% | 1 | 1 | 0% | 2,477 | 4,232 | +71% | 0 | 0 | — |
case-17 | fail→pass | 12,821 | 3,767 | -71% | 1 | 1 | 0% | 2,678 | 3,824 | +43% | 0 | 0 | — |
case-18 | pass→pass | 10,423 | 2,961 | -72% | 1 | 1 | 0% | 1,936 | 3,613 | +87% | 0 | 0 | — |
case-19 | fail→pass | 12,532 | 4,497 | -64% | 1 | 1 | 0% | 2,334 | 3,920 | +68% | 0 | 0 | — |
case-20 | fail→pass | 11,596 | 5,901 | -49% | 1 | 1 | 0% | 2,197 | 4,104 | +87% | 0 | 0 | — |
case-21 | pass→pass | 4,946 | 3,154 | -36% | 1 | 1 | 0% | 948 | 3,643 | +284% | 0 | 0 | — |
case-22 | pass→pass | 7,507 | 6,421 | -14% | 1 | 1 | 0% | 1,518 | 4,319 | +185% | 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 +82 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.