From a42e2664491942ce9728f12723d2b7b224e59ad9 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 9 Aug 2026 21:09:39 +0000 Subject: [PATCH] docs: note the scheduled_at future/30-day window MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Document on the TemplateSend/RawSend scheduled_at fields (and the README send example) that the timestamp must be in the future and at most 30 days ahead, matching the hosted API's validation — a past or too-distant value is rejected with 400. Keeps the Python SDK's guidance in parity with the TypeScript SDK. Co-Authored-By: Claude Opus 4.8 (1M context) Claude-Session: https://claude.ai/code/session_01XCeS6cafCLddV6dakQCKC9 --- README.md | 2 +- src/senderkit/models.py | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 0f983ff..1227128 100644 --- a/README.md +++ b/README.md @@ -126,7 +126,7 @@ sk.send( cc=["ops@example.com"], # email only from_="hello@acme.com", # email only — From address override (bare address) from_name="Acme Support", # email only — From display name → "Acme Support " - scheduled_at=datetime(2026, 1, 1, 9, 0, tzinfo=timezone.utc), # datetime or ISO-8601 string + scheduled_at=datetime(2026, 1, 1, 9, 0, tzinfo=timezone.utc), # datetime or ISO-8601 string; future & ≤ 30 days ahead idempotency_key="order-1234-shipped", # optional; see Idempotency below ) ``` diff --git a/src/senderkit/models.py b/src/senderkit/models.py index 1d63a10..e480155 100644 --- a/src/senderkit/models.py +++ b/src/senderkit/models.py @@ -107,6 +107,8 @@ class TemplateSend: version: Optional[int] = None channel: Optional[ChannelLike] = None metadata: Optional[Metadata] = None + #: Defer delivery. Must be in the future and at most 30 days ahead; the API + #: rejects a past or too-distant timestamp with ``400``. Omit to send now. scheduled_at: Optional[ScheduledAt] = None cc: Optional[List[str]] = None bcc: Optional[List[str]] = None @@ -134,6 +136,8 @@ class RawSend: interpolate: Optional[bool] = None vars: Optional[Vars] = None metadata: Optional[Metadata] = None + #: Defer delivery. Must be in the future and at most 30 days ahead; the API + #: rejects a past or too-distant timestamp with ``400``. Omit to send now. scheduled_at: Optional[ScheduledAt] = None idempotency_key: Optional[str] = None