Skip to main content

vicifast

The VICIfast API for Python 3.8 and later: buy and manage phone numbers, place back-orders, read calls, recordings and transcripts, follow your wallet, and check the webhooks we send you. Built on the standard library only, with no dependencies.

pip install vicifast

Use

import os
from vicifast import Vicifast

vf = Vicifast(api_key=os.environ["VICIFAST_API_KEY"])

print(vf.get_balance()["data"]["balance_cents"])

found = vf.search_numbers(area_code="305", limit=5)
order = vf.purchase_numbers({"numbers": [found["data"][0]["number"]]})

Make keys under API → Keys in the dashboard. A vf_test_… key works against the sandbox: the same calls, with nothing charged and no real numbers touched. Use one while you build.

Each operation in the reference is a method named after its operationId in snake*case. Path parameters come first, positionally, then the request body. Query parameters are keyword arguments. A parameter whose name is a Python keyword takes a trailing underscore: vf.list_calls(from*="2026-10-01").

Pages

A list answers one page at a time. paginate walks every page for you:

for number in vf.paginate("listNumbers", status="active"):
    print(number["number"], number["routing"])

The calls export is CSV, one file per page:

with open("calls.csv", "w") as out:
    for i, csv in enumerate(vf.export_call_files(window="30d")):
        out.write(csv if i == 0 else csv.split("\n", 1)[1])

Errors and retries

Anything other than a success raises VicifastError. It carries the HTTP status, a code to branch on (insufficient_funds, rate_limited, …), a message, the offending param when there is one, and a request_id to quote to support.

A request that is safe to repeat is retried up to max_retries times (default 2) on 408, 429 and 5xx, and when the connection fails. A 429 waits for Retry-After. Reads are always safe to repeat. Calls that spend or move money (a purchase, a release, a back-order, a transcript) are safe too, because each one is sent with an Idempotency-Key: the same key on every retry, so a retried purchase still buys once. The client makes the key for you, or you can pass your own as idempotency_key=.

Webhooks

Check every request against the endpoint's signing secret before trusting it. Pass the body exactly as it arrived:

from flask import Flask, abort, request
from vicifast import parse_event

app = Flask(__name__)

@app.post("/vicifast")
def vicifast():
    try:
        event = parse_event(request.get_data(), request.headers.get("X-VICIfast-Signature"), os.environ["VICIFAST_WEBHOOK_SECRET"])
    except ValueError:
        abort(400)
    if event["type"] == "call.inbound.completed":
        ...
    return "", 200

verify_signature(body, header, secret) gives you the same check as a boolean. A request signed more than five minutes ago is refused.

Licensed MIT. This package is generated from vicifast.com/api-docs/openapi.json.

Metadata

Release files for vicifast 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for vicifast 0.1.0
File Size Uploaded
vicifast-0.1.0.tar.gz 13.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for vicifast 0.1.0
File Interpreter ABI Platform
vicifast-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 23.9 kB

Release files / vicifast-0.1.0.tar.gz

Download URL vicifast-0.1.0.tar.gz
Size 13.3 kB
Tags Source
SHA-256 checksum
How to use checksums
2501cef105df23a41695eeece39499a4aafaf5baadba1699a9001f5e5c5cd99b
BLAKE2b-256 checksum
How to use checksums
7f59432d26fbba5645ae4d46564e64445e74435b84f7ab8f4ef3174de7fb4675
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.13

Release files / vicifast-0.1.0-py3-none-any.whl

Download URL vicifast-0.1.0-py3-none-any.whl
Size 10.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
30b52cd1670f53f2da1c330579263e6a3e58d042bf3d213d747bae19f58a1631
BLAKE2b-256 checksum
How to use checksums
ea27463ad47e49ade494fc273c88e51b78941d8263dbdeb855b69a5a277ab0cb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.13

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page