Open-source client libraries for the ReachFlow public API (REST v1).
| Language | Folder | Package | Registry |
|---|---|---|---|
| TypeScript / Node.js | reachflow-node/ |
@reachflow/sdk |
npm |
| Python | reachflow-python/ |
reachflow |
PyPI |
Integration guides: docs/guide-sdk-official-en.md (EN) · docs/guide-sdk-officiels.md (FR)
Pass environment: 'sandbox' or environment: 'live' — no base URL required.
environment |
API host | Default |
|---|---|---|
sandbox |
sandbox-api.reachflow.me |
yes |
live |
api.reachflow.me |
The SDK appends /api/v1 automatically.
npm install @reachflow/sdkimport { ReachFlow } from '@reachflow/sdk';
const client = new ReachFlow({
apiKey: process.env.REACHFLOW_API_KEY!,
environment: 'sandbox', // or 'live'
});
const { messageId } = await client.messages.send({
providerId: 'your-provider-uuid',
to: '22996123456',
message: 'Hello!',
});
const status = await client.messages.waitForTerminal(messageId);
console.log(status.status);pip install reachflowfrom reachflow import ReachFlow
with ReachFlow(api_key="rfl_live_…", environment="live") as client:
result = client.messages.send(
provider_id="your-provider-uuid",
to="22996123456",
message="Hello!",
)
status = client.messages.wait_for_terminal(result["messageId"])
print(status["status"])All /api/v1/* requests use the X-API-Key header (rfl_live_… or rfl_test_…).
Create keys in the ReachFlow dashboard: Settings → API → API Keys.
Frozen spec: spec/openapi.json
Regenerate after an API update in the ReachFlow monorepo:
cd ../reachflow/apps/api
npm run build --workspace=@reachflow/api
node --input-type=module -e "
import { PUBLIC_OPENAPI_SPEC } from './dist/modules/public-api/public-openapi.document.js';
import { writeFileSync } from 'fs';
writeFileSync('../../SDK/spec/openapi.json', JSON.stringify(PUBLIC_OPENAPI_SPEC, null, 2) + '\n');
"cp scripts/.env.sandbox.example scripts/.env.sandbox
# Edit: REACHFLOW_ENV, REACHFLOW_API_KEY, REACHFLOW_TEST_TO (optional)# Node
cd reachflow-node && npm run build && cd ..
npm run smoke
npm run smoke:send
# Python
cd reachflow-python && python3 -m venv .venv && .venv/bin/pip install -e .
.venv/bin/python ../scripts/smoke-sandbox.py --send| Variable | Description |
|---|---|
REACHFLOW_ENV |
sandbox or live (default: sandbox) |
REACHFLOW_API_KEY |
Required |
REACHFLOW_TEST_TO |
Phone number for --send / --otp
|
REACHFLOW_PROVIDER_ID |
Optional provider UUID |
Legacy: REACHFLOW_API_URL is still read and mapped to sandbox / live.
chmod +x scripts/publish-release.sh
./scripts/publish-release.sh --status # local vs npm/PyPI, next version
./scripts/publish-release.sh --set-version 0.2.0 # realign local files only
./scripts/publish-release.sh --dry-run all # verify only
./scripts/publish-release.sh all # patch auto (ex. 0.2.0 → 0.2.1)
./scripts/publish-release.sh all --bump minor # minor only when needed (→ 0.3.0)
./scripts/publish-release.sh node
./scripts/publish-release.sh pythonThe script reads npm and PyPI before bumping (base = max of local + published versions) and refuses to republish a version that already exists on a registry.
| Registry | Setup |
|---|---|
| npm |
npm login or export NPM_TOKEN=…
|
| PyPI |
~/.pypirc or TWINE_USERNAME=__token__ + TWINE_PASSWORD=pypi-…
|
Package metadata (GitHub links, homepage) is editable in reachflow-node/package.json and reachflow-python/pyproject.toml — changes appear on the next published version.
# Node
cd reachflow-node && npm install && npm test
# Python
cd reachflow-python && python3 -m venv .venv && .venv/bin/pip install -e ".[dev]" && .venv/bin/pytest- SDKs use semver, independent of the ReachFlow product.
-
0.2.x→ REST API v1 (/api/v1). -
Breaking change in 0.2.0:
baseUrl/base_urlreplaced byenvironment: 'sandbox' | 'live'.
MIT — see each sub-project.