Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion developer-tools/sdks/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ TypeScript, Python, Go, PHP, Ruby, and Rust clients also accept [REST OAuth toke
| Go | `sendmux.ai/go/v3` | `sending`, `mailbox`, `management`, and `sdk` subpackages |
| PHP | `qubrics/sdk` | `qubrics/sending`, `qubrics/mailbox`, `qubrics/management` |
| Ruby | `qubrics-sdk` | `qubrics-sending`, `qubrics-mailbox`, `qubrics-management` |
| Rust | `sendmux` | `sending`, `mailbox`, and `management` modules inside the `sendmux` crate |
| Rust | `qubrics` | `sending`, `mailbox`, and `management` modules inside the `qubrics` crate |

The Python and Ruby guides list the published surface versions and their matching imports. Check [package names and imports](/developer-tools/sdks/versioning-support#package-names-and-imports) before upgrading an existing installation.

Expand Down
58 changes: 29 additions & 29 deletions developer-tools/sdks/rust.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ description: "Install and configure the Qubrics Rust SDK crate."
keywords:
[
"Rust SDK",
"sendmux crate",
"sendmux::sending",
"sendmux::mailbox",
"sendmux::management",
"qubrics crate",
"qubrics::sending",
"qubrics::mailbox",
"qubrics::management",
"Qubrics SDKs",
]
---
Expand All @@ -31,17 +31,17 @@ Use the Rust SDK when your application needs clients for the Sending, Mailbox, o
The Rust SDK is one crate with three surface modules.

```bash
cargo add sendmux
cargo add qubrics@1.0.0
```

## OAuth access tokens

Use `new_with_access_token` for a bare token or `new_with_token_provider` for an asynchronous provider.

```rust
use sendmux::mailbox::MailboxClient;
use qubrics::mailbox::MailboxClient;

fn oauth_client() -> sendmux::Result<MailboxClient> {
fn oauth_client() -> qubrics::Result<MailboxClient> {
MailboxClient::new_with_token_provider(|| async {
Ok(std::env::var("QUBRICS_ACCESS_TOKEN")
.expect("QUBRICS_ACCESS_TOKEN is required"))
Expand All @@ -53,14 +53,14 @@ The provider runs before each request. Your application owns secure token storag

## Create a client

Import the surface client from the `sendmux` crate.
Import the surface client from the `qubrics` crate.

<CodeGroup>

```rust Sending
use sendmux::sending::SendingClient;
use qubrics::sending::SendingClient;

fn sending_client() -> sendmux::Result<SendingClient> {
fn sending_client() -> qubrics::Result<SendingClient> {
SendingClient::new(
std::env::var("QUBRICS_MAILBOX_API_KEY")
.expect("QUBRICS_MAILBOX_API_KEY is required"),
Expand All @@ -69,9 +69,9 @@ fn sending_client() -> sendmux::Result<SendingClient> {
```

```rust Mailbox
use sendmux::mailbox::MailboxClient;
use qubrics::mailbox::MailboxClient;

fn mailbox_client() -> sendmux::Result<MailboxClient> {
fn mailbox_client() -> qubrics::Result<MailboxClient> {
MailboxClient::new(
std::env::var("QUBRICS_MAILBOX_API_KEY")
.expect("QUBRICS_MAILBOX_API_KEY is required"),
Expand All @@ -80,9 +80,9 @@ fn mailbox_client() -> sendmux::Result<MailboxClient> {
```

```rust Management
use sendmux::management::ManagementClient;
use qubrics::management::ManagementClient;

fn management_client() -> sendmux::Result<ManagementClient> {
fn management_client() -> qubrics::Result<ManagementClient> {
ManagementClient::new(
std::env::var("QUBRICS_ROOT_API_KEY")
.expect("QUBRICS_ROOT_API_KEY is required"),
Expand All @@ -95,9 +95,9 @@ fn management_client() -> sendmux::Result<ManagementClient> {
Call this async function from your application to send a message.

```rust
use sendmux::sending::{Address, EmailSendRequest, SendingClient};
use qubrics::sending::{Address, EmailSendRequest, SendingClient};

pub async fn send_welcome() -> sendmux::Result<()> {
pub async fn send_welcome() -> qubrics::Result<()> {
let client = SendingClient::new(
std::env::var("QUBRICS_MAILBOX_API_KEY")
.expect("QUBRICS_MAILBOX_API_KEY is required"),
Expand Down Expand Up @@ -125,15 +125,15 @@ pub async fn send_welcome() -> sendmux::Result<()> {

| Surface | Module | Client or helper | API key |
| --- | --- | --- | --- |
| Sending | `sendmux::sending` | `SendingClient`, `sendmux::sending` | `smx_mbx_` or owner-approved `smx_agent_` with `email.send` |
| Mailbox | `sendmux::mailbox` | `MailboxClient`, `sendmux::mailbox` | `smx_mbx_` or scoped `smx_agent_` |
| Management | `sendmux::management` | `ManagementClient`, `sendmux::management` | `smx_root_` |
| Sending | `qubrics::sending` | `SendingClient`, `qubrics::sending` | `smx_mbx_` or owner-approved `smx_agent_` with `email.send` |
| Mailbox | `qubrics::mailbox` | `MailboxClient`, `qubrics::mailbox` | `smx_mbx_` or scoped `smx_agent_` |
| Management | `qubrics::management` | `ManagementClient`, `qubrics::management` | `smx_root_` |

<Note>
`sending`, `mailbox`, and `management` are modules inside the `sendmux` crate. They are not separate installable crates.
`sending`, `mailbox`, and `management` are modules inside the `qubrics` crate. They are not separate installable crates.
</Note>

Sending uses `https://smtp.sendmux.ai/api/v1` by default. Mailbox and Management use `https://app.sendmux.ai/api/v1`.
Sending uses `https://smtp.qubrics.com/api/v1` by default. Mailbox and Management use `https://app.qubrics.com/api/v1`.

## Shared API behaviour

Expand All @@ -149,14 +149,14 @@ Mailbox and Management list helpers return paginated data as JSON. Read `paginat

### Retries and rate limits

The crate sends each request once. When `sendmux::Error::Api` reports `retryable` as `true`, follow the API retry guidance before sending the request again.
The crate sends each request once. When `qubrics::Error::Api` reports `retryable` as `true`, follow the API retry guidance before sending the request again.

### Idempotency and ETags

Use `RequestOptions` when an operation accepts optional header values.

```rust
use sendmux::core::RequestOptions;
use qubrics::core::RequestOptions;

let send_options = RequestOptions::new().idempotency_key("order-123");
let update_options = RequestOptions::new().if_match(etag);
Expand All @@ -168,23 +168,23 @@ Use `Idempotency-Key` for retry-safe mutating requests. Use `If-Match` and `If-N

### Errors

SDK methods return `sendmux::Result<Response<T>>`. API failures map to `sendmux::Error::Api` with the status, machine-readable code, retryable flag, raw response body, and request ID when available.
SDK methods return `qubrics::Result<Response<T>>`. API failures map to `qubrics::Error::Api` with the status, machine-readable code, retryable flag, raw response body, and request ID when available.

```rust
use sendmux::sending::{EmailSendRequest, SendingClient};
use qubrics::sending::{EmailSendRequest, SendingClient};

pub async fn send_and_report(
client: &SendingClient,
request: &EmailSendRequest,
) -> sendmux::Result<()> {
) -> qubrics::Result<()> {
match client.send_email(request).await {
Ok(response) => {
println!("request id: {}", response.request_id());
Ok(())
}
Err(sendmux::Error::Api(error)) => {
Err(qubrics::Error::Api(error)) => {
eprintln!("{} {:?}", error.message, error.request_id);
Err(sendmux::Error::Api(error))
Err(qubrics::Error::Api(error))
}
Err(error) => Err(error),
}
Expand All @@ -203,7 +203,7 @@ Keep the request ID when contacting support.
Check compatibility, support, and upgrade guidance.
</Card>
<Card title="Management API" icon="chart-line" href="/api/introduction">
Review the Management API contract used by `sendmux::management`.
Review the Management API contract used by `qubrics::management`.
</Card>
<Card title="API keys" icon="key" href="/account/api-keys">
Create and scope the credentials used by SDK clients.
Expand Down
3 changes: 2 additions & 1 deletion developer-tools/sdks/versioning-support.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ SDK packages track the public Qubrics API contracts. A package update can be lim

## Versioning model

- SDK packages can use different major versions. The Rust crate is pre-1.0 on `0.x` and can introduce breaking changes between minor versions.
- SDK packages can use different major versions.
- Patch versions can differ between packages.
- Generated clients are built from the same public API contracts used by the API reference.
- API contract changes update the relevant SDK output in the same package release.
Expand Down Expand Up @@ -46,6 +46,7 @@ Keep the package version and import path together. Installing an old-name distri
| RubyGems | `sendmux-mailbox` | `3.0.0` | `qubrics/mailbox` |
| RubyGems | `qubrics-management` | `3.0.0` | `qubrics/management` |
| RubyGems | `sendmux-management` | `3.0.0` | `qubrics/management` |
| crates.io | `qubrics` | `1.0.0` | `qubrics::sending`, `qubrics::mailbox`, `qubrics::management` |

Use the language guides for client examples. Each release covers one package. Check the version and namespace for every language, umbrella package or related developer tool you use.

Expand Down
90 changes: 90 additions & 0 deletions evidence/rebrand-qubrics-docs75-rust-facts-20261120.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
# Public Rust crate facts

Scope: docs#75 Rust-held facts, based on origin/main `2c505652`.
Three existing SDK pages change. Navigation, authentication constraints,
compatibility identifiers and unrelated package facts remain intact.
Merge/publication requires a separate Ops approval; rollback is revert the
resulting merge (mainline parent 1) and republish through the native path.

## Owning evidence

SDK MAIN `.claude/tasks/rebrand-qubrics-sdk344/rust-public-20261120.md`
qualifies public, unyanked `qubrics` 1.0.0. Ops independently confirmed its
crates.io API checksum. The retained downloaded archive is 25,962 bytes:

`707d4cd9e5fe26dbe4a6f53077c1553c15a9b778e44d0540e11925e5b1e4176b`.

The archive is SDK MAIN
`.claude/artifacts/rebrand-qubrics-sdk344/rust-public-20261120/qubrics-1.0.0.crate`.
Its SHA256 was rechecked for this slice and matches exactly. The producer's
fresh registry-only Rust 1.82 consumer test passed 1/1, zero ignored, and
its executable smoke passed. No authenticated API smoke is claimed.
A redundant docs-side crates.io curl returned 403; it supplies no release
evidence. This slice relies on the qualified producer/Ops receipt and the
exact public archive, without repeating an install or publication.

Archive facts inspected directly:

- `Cargo.toml:13-16`: Rust 1.82, name `qubrics`, version 1.0.0.
- `src/lib.rs:3-17`: public surface modules and shared Result/Error exports.
- `src/lib.rs:20-32`: Sending, Mailbox and Management convenience helpers.
- `src/sending.rs:6`, `src/mailbox.rs:7`, `src/management.rs:7`: default
`smtp.qubrics.com/api/v1` and `app.qubrics.com/api/v1` URLs.
- The three surface constructors and asynchronous token-provider signatures,
plus `src/core.rs:146-165` request options, match the guide's examples.

Canonical: spec A3/A17 requires Qubrics naming/default hosts while keeping
accepted compatibility identifiers. The public crate supplies the actual
namespace and version. No unpublished `sendmux` pointer, calendar feature
or rebrand announcement is introduced.

## Placement and copy

Guides > Developer tools > SDKs > Rust, SDK overview, versioning/support.
Keep placement, grouping and order. Change the crate/install/import tokens
and default hosts, add the released version row, remove the disproven
pre-1.0 qualification. Every `smx_*` occurrence is preserved.

Independent copy critique: every applicable rubric line passes, no rewrite.
Humanize ran once on the retained versioning sentence: seven words, zero
em dashes, semicolons, curly quotes, banned vocabulary or framing patterns.
Exact technical-token corrections are polish-exempt. Protected headings,
links, code structure, prerequisites and verified facts are preserved.

## Verification

- `git diff --check`, confidentiality and external-link checks: exit 0.
- `mint broken-links`: exit 0, no broken links.
- `mint validate`: exit 0, build and validation passed.
- Real Chrome local preview: all three pages returned 200. At
07:57:44–07:58:23Z, Rust rendered all nine expected install/module/host/key
tokens with zero legacy strings; overview rendered the Qubrics Rust row;
versioning rendered the exact crates.io/version/module row and no `0.x`
or pre-1.0 claim. No console errors; preview Socket.io warning only.
- Read-only preservation comparison: Rust guide equals the exact approved
token map; compatibility-prefix occurrences match the base across all
three pages. No new tests for static token corrections; full tooling
tests remain CI-owned. Existing Rust expectations require the released
crate/version/module tokens, with the rest of that coverage intact.
- Independent standards and spec reviews: zero findings on each axis.

Raw logs, screenshot and support-check receipt: docs MAIN
`.claude/artifacts/rebrand-qubrics-docs75/rust-facts-20261120/`.
T-47269 read-only check 07:54:18Z returned 200, same handled reply ID;
no support send, Re-verify or provider change.

Status: local candidate verified; PR/CI and separate merge/publication gate
remain. No whole-goal completion claimed.

CI root cause: run `44699097681` fails only the existing Rust docs test at
`tests/docs-accuracy.test.mjs:47`, which still requires `/cargo add sendmux/`
and the old namespaces/pre-1.0 statement. A focused local invocation
`node --test --test-name-pattern='documents the Rust SDK' tests/docs-accuracy.test.mjs`
reproduces the exact `ERR_ASSERTION` before the fix. The verified public
archive disproves every obsolete expected token. Update those assertions
to the exact public install/version/module facts; preserve the remaining
checks. No assertion is removed or loosened. Raw red receipt:
`stale-rust-test-red.log` alongside the complete CI failure log.
The same focused invocation then passes 1/1 with zero skipped after the
correction (`stale-rust-test-green.log`). No shipped MDX changed after its
successful preview/validation, so those receipts still apply.
14 changes: 7 additions & 7 deletions tests/docs-accuracy.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -44,29 +44,29 @@ test("documents the Rust SDK as one crate with three API modules", async () => {
]);

assert.match(rust, /title: "Rust SDK"/);
assert.match(rust, /cargo add sendmux/);
assert.match(rust, /cargo add qubrics@1\.0\.0/);
assert.match(rust, /Rust 1\.82 or newer/);
assert.match(rust, /sendmux::sending/);
assert.match(rust, /sendmux::mailbox/);
assert.match(rust, /sendmux::management/);
assert.match(rust, /qubrics::sending/);
assert.match(rust, /qubrics::mailbox/);
assert.match(rust, /qubrics::management/);
assert.match(rust, /Sending has typed request and response models/);
assert.match(
rust,
/Mailbox and Management expose typed surface clients with raw JSON helpers/,
);
assert.match(rust, /EmailSendRequest::new/);
assert.match(rust, /response\.request_id\(\)/);
assert.match(rust, /sendmux::Error::Api/);
assert.match(rust, /qubrics::Error::Api/);
assert.match(rust, /error\.request_id/);

assert.match(index, /"Rust"/);
assert.match(
index,
/\| Rust \| `sendmux` \| `sending`, `mailbox`, and `management` modules inside the `sendmux` crate \|/,
/\| Rust \| `qubrics` \| `sending`, `mailbox`, and `management` modules inside the `qubrics` crate \|/,
);
assert.match(
versioning,
/Rust crate is pre-1\.0 on `0\.x` and can introduce breaking changes between minor versions/,
/\| crates\.io \| `qubrics` \| `1\.0\.0` \| `qubrics::sending`, `qubrics::mailbox`, `qubrics::management` \|/,
);

const sdkGroup = docsConfig.navigation.tabs
Expand Down