{"id":50513039,"url":"https://github.com/lettermint/lettermint-rust","last_synced_at":"2026-06-02T21:33:03.438Z","repository":{"id":357213213,"uuid":"1235933451","full_name":"lettermint/lettermint-rust","owner":"lettermint","description":null,"archived":false,"fork":false,"pushed_at":"2026-05-11T19:52:27.000Z","size":60,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-11T21:37:33.387Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lettermint.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-11T19:48:42.000Z","updated_at":"2026-05-11T19:52:25.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/lettermint/lettermint-rust","commit_stats":null,"previous_names":["lettermint/lettermint-rust"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/lettermint/lettermint-rust","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lettermint%2Flettermint-rust","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lettermint%2Flettermint-rust/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lettermint%2Flettermint-rust/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lettermint%2Flettermint-rust/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lettermint","download_url":"https://codeload.github.com/lettermint/lettermint-rust/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lettermint%2Flettermint-rust/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33838216,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-02T02:00:07.132Z","response_time":109,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-06-02T21:33:01.547Z","updated_at":"2026-06-02T21:33:03.425Z","avatar_url":"https://github.com/lettermint.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Lettermint Rust SDK\n\n[![Crates.io Version](https://img.shields.io/crates/v/lettermint?style=flat-square)](https://crates.io/crates/lettermint)\n[![Crates.io Downloads](https://img.shields.io/crates/d/lettermint?style=flat-square)](https://crates.io/crates/lettermint)\n[![docs.rs](https://img.shields.io/docsrs/lettermint?style=flat-square)](https://docs.rs/lettermint)\n[![GitHub Tests](https://img.shields.io/github/actions/workflow/status/lettermint/lettermint-rust/ci.yml?branch=main\u0026label=tests\u0026style=flat-square)](https://github.com/lettermint/lettermint-rust/actions?query=workflow%3ACI+branch%3Amain)\n[![Dependency Status](https://deps.rs/crate/lettermint/latest/status.svg)](https://deps.rs/crate/lettermint)\n[![License](https://img.shields.io/github/license/lettermint/lettermint-rust?style=flat-square)](https://github.com/lettermint/lettermint-rust/blob/main/LICENSE)\n[![Join our Discord server](https://img.shields.io/discord/1305510095588819035?logo=discord\u0026logoColor=eee\u0026label=Discord\u0026labelColor=464ce5\u0026color=0D0E28\u0026cacheSeconds=43200)](https://lettermint.co/r/discord)\n\nOfficial Rust SDK for the Lettermint sending and team APIs.\n\n## Requirements\n\n- Current stable Rust. The crate's `rust-version` tracks the current supported stable minor release.\n- Tokio or another async runtime compatible with `reqwest`\n\n## Installation\n\n```toml\n[dependencies]\nlettermint = \"0.1\"\ntokio = { version = \"1\", features = [\"macros\", \"rt-multi-thread\"] }\n```\n\n## Send Email\n\n```rust\nuse lettermint::Lettermint;\n\n#[tokio::main]\nasync fn main() -\u003e lettermint::Result\u003c()\u003e {\n    let email = Lettermint::email(std::env::var(\"LETTERMINT_TOKEN\").unwrap())?;\n\n    let response = email\n        .email()\n        .from(\"sender@example.com\")\n        .to(\"recipient@example.com\")\n        .subject(\"Hello from Rust\")\n        .html(\"\u003cp\u003eHello from Lettermint.\u003c/p\u003e\")\n        .idempotency_key(\"welcome-123\")\n        .send()\n        .await?;\n\n    println!(\"{}\", response.message_id);\n    Ok(())\n}\n```\n\nThe fluent email builder owns its payload. Each call to `email.email()` starts with a fresh payload, so attachments, headers, metadata, and recipients do not leak between sends.\n\n## Direct API Payloads\n\n```rust\nuse lettermint::{types, Lettermint};\n\n#[tokio::main]\nasync fn main() -\u003e lettermint::Result\u003c()\u003e {\n    let email = Lettermint::email(std::env::var(\"LETTERMINT_TOKEN\").unwrap())?;\n\n    let payload = types::SendMailRequest {\n        from: \"sender@example.com\".into(),\n        to: vec![\"recipient@example.com\".into()],\n        subject: \"Typed payload\".into(),\n        text: Some(\"Hello from Lettermint.\".into()),\n        ..Default::default()\n    };\n\n    email.send(\u0026payload).await?;\n    Ok(())\n}\n```\n\n## Team API\n\n```rust\nuse lettermint::Lettermint;\n\n#[tokio::main]\nasync fn main() -\u003e lettermint::Result\u003c()\u003e {\n    let api = Lettermint::api(std::env::var(\"LETTERMINT_TEAM_TOKEN\").unwrap())?;\n    let domains = api.domains().list(\u0026[(\"page[size]\", \"10\")]).await?;\n\n    for domain in domains.data {\n        println!(\"{}\", domain.domain);\n    }\n\n    Ok(())\n}\n```\n\n`Lettermint::email(...)` authenticates with `X-Lettermint-Token` for sending endpoints. `Lettermint::api(...)` authenticates with `Authorization: Bearer ...` for team endpoints.\n\n## Webhooks\n\n```rust\nuse lettermint::Webhook;\n\nfn handle(payload: \u0026str, signature: \u0026str, delivery: i64) -\u003e lettermint::Result\u003cserde_json::Value\u003e {\n    Webhook::new(std::env::var(\"LETTERMINT_WEBHOOK_SECRET\").unwrap())\n        .verify(payload, signature, Some(delivery))\n}\n```\n\nWebhook verification checks the `t=...` timestamp, validates the `v1=...` HMAC-SHA256 signature in constant time, cross-checks the optional delivery timestamp, and enforces a 5 minute tolerance by default.\n\n## Development\n\n```bash\ncargo fmt --all -- --check\ncargo clippy --all-targets --all-features -- -D warnings\ncargo test --all-features --locked\n```\n\nGenerated DTOs live in `src/types.rs`. Regenerate them from the repository root with:\n\n```bash\npython3 sdk-generator/rust/generate-types.py\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flettermint%2Flettermint-rust","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flettermint%2Flettermint-rust","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flettermint%2Flettermint-rust/lists"}