infobip-sms-sdk 0.1.0

Async Rust SDK for the Infobip SMS API: send messages, manage scheduled bulks, query delivery reports and logs, fetch inbound SMS, and parse webhook payloads.
Documentation
//! Data models for every Infobip SMS endpoint.
//!
//! Every type here is `Serialize + Deserialize` and uses
//! `#[serde(rename_all = "camelCase")]` so field names match the JSON
//! wire format (`bulkId`, `messageId`, etc.). Optional fields are
//! `Option<T>` and skipped when serializing if `None`, so the JSON you
//! send stays minimal.
//!
//! # Module map
//!
//! - [`common`] — types shared across multiple endpoints (status,
//!   error, price, regional options, etc.).
//! - [`send`] — models for `POST /sms/3/messages`.
//! - [`reports`] — models for `GET /sms/3/reports`.
//! - [`logs`] — models for `GET /sms/3/logs`, including cursor-based
//!   pagination.
//! - [`inbox`] — models for `GET /sms/1/inbox/reports`.
//! - [`bulks`] — models for `/sms/1/bulks` and `/sms/1/bulks/status`.
//! - [`preview`] — models for `POST /sms/1/preview`.
//! - [`conversion`] — models for `POST /ct/1/log/end/{messageId}`.
//! - [`webhooks`] — payload shapes Infobip POSTs to your callback URLs.
//!
//! # Building requests with `..Default::default()`
//!
//! Most request types implement [`Default`], so the idiomatic pattern
//! for building them is to set the fields you care about and let the
//! rest fall back to `None`:
//!
//! ```
//! use infobip_sms::models::send::{
//!     SmsMessage, SmsMessageContent, SmsTextMessageContent, SmsToDestination,
//! };
//!
//! let _ = SmsMessage {
//!     sender: Some("InfoSMS".into()),
//!     destinations: vec![SmsToDestination {
//!         to: "41793026727".into(),
//!         ..Default::default()
//!     }],
//!     content: SmsMessageContent::Text(SmsTextMessageContent {
//!         text: "Hello!".into(),
//!         ..Default::default()
//!     }),
//!     ..Default::default()
//! };
//! ```
//!
//! # Date-time fields
//!
//! Date-time values (`sentAt`, `doneAt`, `receivedAt`, `sendAt`, …) are
//! stored as `String`. Infobip uses the format
//! `yyyy-MM-dd'T'HH:mm:ss.SSSZ` (ISO 8601 with millisecond precision and
//! a numeric offset, e.g. `2026-04-29T15:00:00.000+0000`). If you need
//! typed times, parse these into `chrono::DateTime` or
//! `time::OffsetDateTime` in your own code.

pub mod common;
pub mod send;
pub mod reports;
pub mod logs;
pub mod inbox;
pub mod bulks;
pub mod preview;
pub mod conversion;
pub mod webhooks;