Rust SDK
The pushizo crate on crates.io — Rust 1.71+, ureq; models and services generated from OpenAPI, retries, idempotency, pagination, webhook signature verification.
Source: sdk/rust, public repository pushizo-rust. The models (pushizo::models) and resource services (pushizo::resources) are generated from api/openapi.yaml and cover the same endpoints as the other server SDKs; authentication, retries, idempotency, pagination, multipart, and webhook signature verification are hand-written.
Installation
cargo add pushizoUsage
use std::collections::HashMap;
use pushizo::models::{CreateNotificationDto, CreateNotificationDtoTarget};
use pushizo::{Client, RequestOptions};
fn main() -> pushizo::Result<()> {
let client = Client::builder(std::env::var("PUSHIZO_API_KEY").unwrap_or_default())
.app_id("app_…")
.build()?;
let mut target = CreateNotificationDtoTarget::default();
target.include_aliases = Some(HashMap::from([("external_id".into(), vec!["user-42".into()])]));
let body = CreateNotificationDto {
target,
contents: Some(HashMap::from([("en".into(), "Your order shipped".into())])),
..Default::default()
};
let res = client
.notifications()
.with_options(RequestOptions::new().idempotency_key("order-1001"))
.create(&body)?;
println!("{} {}", res.id, res.status);
// Cursor pagination: all pages as a single iterator
for segment in client.segments().list_all(None) {
println!("{}", segment?.name);
}
Ok(())
}Behavior
- App scope:
ClientBuilder::app_idis the default; per service, usewith_options(RequestOptions::new().app_id(…)). - Retries: 429 on every method; 5xx and network errors on GET/PUT/DELETE, and on POST/PATCH only when an
Idempotency-Keyis set.Retry-Afteris honored. - Errors:
pushizo::Error(status,code,message,request_id) andkind()(NotFound,RateLimited…). The API key is never written to error messages orDebugoutput. - Webhooks:
construct_webhook_events(raw_body, Some(signature_header), &[secret], &Default::default()). - Authentication:
identity_hash(sdk_secret, external_id)and ES256identity_token(&IdentityTokenOptions { … }).
Detailed guide: pushizo-rust README.
Ruby SDK
pushizo (RubyGems) — Ruby 3.0+, Net::HTTP; generated models and resource methods, retries, idempotency, Enumerator pagination, webhook signature verification.
API overview
Pushizo public REST API — base URL, authentication and scopes, request/response conventions, error envelope, rate limits, pagination, idempotency, webhook signatures, versioning, data residency, SDKs, MCP, OpenAPI and Postman.