Skip to content

API Reference

Complete API documentation for Twilic SDKs, integration packages, and tooling. Use this section when you need exact function signatures, types, and options — not just conceptual overviews.

Packages

JavaScript / TypeScript

PackageDescription
@twilic/coreMain entry: init, encode, decode, createSessionEncoder
@twilic/core/advancedBatch, schema, transport-JSON, direct encoding, AdvancedSessionEncoder

Web integrations

PackageDescription
OverviewAll HTTP client and server packages
@twilic/honoHono middleware and response helpers
@twilic/fetchfetch wrapper and response parsing
@twilic/expressExpress middleware
@twilic/fastifyFastify plugin and reply decorator
@twilic/axiosAxios instance with interceptors

Native SDKs

LanguageReference
Rusttwilic-rust — reference implementation
Pythontwilic-python
Gotwilic-go
Javatwilic-java
Ctwilic-c

Other language SDKs follow the same four-function surface (encode, decode, encode_batch, create_session_encoder). See SDKs overview for install instructions per language.

Shared concepts

TopicPage
Value types and SchemaValue & Schema
SessionEncoder and optionsSession Encoder
Errors and decode limitsErrors & Limits

Choosing an entrypoint

text
One-shot encode/decode?
→ encode() / decode() from @twilic/core (or language equivalent)

Batch of same-shape records?
→ encodeBatch() from @twilic/core/advanced
→ encode_batch() in Rust / Python / Go

Schema-aware (Bound profile)?
→ encodeWithSchema() from @twilic/core/advanced

Long-lived stream with incremental updates?
→ createSessionEncoder() + encodePatch()

HTTP API?
→ Integration package + stateless Dynamic or Batch only

Debugging wire bytes?
→ Twilic CLI decode, or decodeToTransportJson() (advanced)

Released under the CC-BY-4.0 License.