Skip to content

bridgexapi-dev/bridgexapi-direct-api-python-examples

Repository files navigation

BridgeXAPI Direct API Python Examples

Direct HTTP workflows for BridgeXAPI messaging infrastructure.

No SDK. No abstraction.


Overview

This repository contains executable Python scripts that interact directly with BridgeXAPI.

Each script maps 1:1 to a real API surface.

What is exposed:

  • route selection (route_id)
  • pricing before submission
  • delivery tracking (bx_message_id)
  • routing behavior across multiple paths

This is infrastructure usage, not a wrapped client.


First step (required)

Before sending anything, inspect available routes:

python route-pricing/routes.py

Routes are not universal.

Availability and pricing depend on:

  • account configuration
  • destination prefix
  • active inventory

Setup

pip install -r requirements.txt
copy .env.example .env
notepad .env

Required:

  • BRIDGEXAPI_API_KEY
  • BRIDGEXAPI_TEST_NUMBER

Start

python send-one-message/send_one.py

Explore

python route-pricing/routes.py
python estimate-before-send/estimate.py
python route-comparison/compare_routes.py
python send-from-csv/send_from_csv.py

Example output

Route comparison:

[Route 1] ACCEPTED
order_id      : 22521
bx_message_id : BX-22521-7b8bc6311ec9a95a
cost          : 0.088

[Route 4] REJECTED
reason        : No pricing available for destination

Delivery lookup:

{
  "bx_message_id": "BX-22519-94fc918774ccf6d8",
  "status": "DELIVERED",
  "route_id": 2
}

Structure

  • send-one-message/ → single submission
  • estimate-before-send/ → cost calculation
  • delivery-lookup/ → delivery state
  • route-pricing/ → route + pricing surfaces
  • route-comparison/ → multi-route execution
  • send-from-csv/ → batch sending

Notes

  • routing is explicit (route_id)
  • pricing is route-dependent
  • delivery is tracked per message (bx_message_id)
  • vendor message IDs are not exposed

Docs: https://docs.bridgexapi.io Main: https://bridgexapi.io

About

Python SMS API examples using direct HTTP requests (no SDK). Control routing, inspect pricing before sending and track delivery with BridgeXAPI.

Topics

Resources

License

Stars

Watchers

Forks

Contributors

Languages