ffrelay-api

Crates.ioffrelay-api
lib.rsffrelay-api
version0.0.4
created_at2026-01-03 20:07:35.708709+00
updated_at2026-01-07 21:48:15.285669+00
descriptionRust API client library for Firefox Relay email forwarding service
homepagehttps://github.com/uintptr/ffrelay
repositoryhttps://github.com/uintptr/ffrelay
max_upload_size
id2020731
size73,681
(uintptr)

documentation

https://docs.rs/ffrelay-api

README

ffrelay-api

Rust API client library for Firefox Relay, Mozilla's email forwarding service that helps protect your privacy.

Features

  • Create random or custom domain email aliases
  • List all your email relays
  • Delete email relays
  • Retrieve profile information
  • Support for both standard relays and domain relays

Installation

Add this to your Cargo.toml:

[dependencies]
ffrelay-api = "0.0.2"

Usage

use ffrelay_api::api::FFRelayApi;
use ffrelay_api::types::FirefoxEmailRelayRequest;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    // Initialize the API client with your Firefox Relay token
    let api = FFRelayApi::new("your-api-token-here");

    // Create a new random email relay
    let request = FirefoxEmailRelayRequest::builder()
        .description("My new relay")
        .build();
    let email = api.create(request).await?;
    println!("Created relay: {}", email);

    // List all relays
    let relays = api.list().await?;
    for relay in relays {
        println!("{}: {}", relay.id, relay.full_address);
    }

    // Delete a relay
    api.delete(relay_id).await?;

    Ok(())
}

Getting Your API Token

  1. Go to Firefox Relay
  2. Sign in with your Firefox Account
  3. Navigate to the API settings to generate your token

License

Licensed under either of:

at your option.

Commit count: 13

cargo fmt