Expand description
§braze
Unofficial Rust SDK for Braze APIs.
use braze::Client;
let client = Client::builder()
.api_key(std::env::var("BRAZE_API_KEY")?)
.base_url("https://rest.iad-01.braze.com")
.build()?;Per-API examples are in the module docs.
The REST API key and the instance’s REST endpoint (base_url) are under
Settings → APIs and Identifiers in the Braze dashboard. The SDK takes
both as values; where they come from is up to the application. The SDK
doesn’t retry; see Error::is_retryable and Error::retry_after.
§Cargo features
None are enabled by default. generated is always compiled in full.
export,messaging— one per API.trace—#[tracing::instrument]on public async methods.
braze = { version = "0.3", features = ["export", "messaging"] }Re-exports§
pub use chrono;pub use secrecy;pub use braze_generated as generated;
Modules§
- export
export - Export endpoints (
/users/export/*). - header
- Re-export, so callers use the same
reqwestversion asBuilder::default_headersand.header()/.headers(). HTTP header types - messaging
messaging - Messaging endpoints (
/messages/send,/campaigns/trigger/send, etc.).
Structs§
- Builder
- Fluent constructor for
Client. - Client
- Braze API client for one workspace. Cheap to clone.
- Credentials
- Authentication for one Braze workspace.
- Request
Builder exportormessaging - A request to one Braze endpoint, dispatched with
send. Endpoint methods return it under a per-endpoint alias.
Enums§
- Error
- All errors surfaced by the SDK.
Type Aliases§
- Result
- Shorthand
Resultreturned by SDK methods.