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
9 changes: 9 additions & 0 deletions .changeset/sms-e164-recipient.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
"@senderkit/sdk": patch
"@senderkit/cli": patch
---

Document that SMS recipients must be an E.164 phone number, matching the hosted API's validation. The API now rejects a non-E.164 SMS `to` with `400 invalid_recipient` (for both template and raw sends) instead of accepting it and failing later at dispatch.

- The `senderkit_send_raw` `to` field description now spells out the per-channel recipient formats — including the E.164 requirement for `sms` — bringing it in line with `senderkit_send`, which already documented it. This flows through to the `senderkit send-raw` CLI help.
- The SDK README's SMS example now notes the E.164 requirement and the `400 invalid_recipient` response.
2 changes: 1 addition & 1 deletion packages/sdk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ await senderkit.sendRaw({
});
```

SMS, push, and web-push work the same way — switch the `channel` and the `content` shape:
SMS, push, and web-push work the same way — switch the `channel` and the `content` shape. SMS recipients must be an [E.164](https://en.wikipedia.org/wiki/E.164) phone number (e.g. `+15555550123`); anything else is rejected with `400 invalid_recipient`.

```ts
await senderkit.sendRaw({
Expand Down
4 changes: 3 additions & 1 deletion packages/sdk/src/mcp-schemas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,9 @@ export const sendRawInput = {
to: z
.string()
.describe(
"Recipient address. For web-push, the JSON-encoded browser PushSubscription (endpoint + keys).",
"Recipient address for the chosen channel: an email address (email), an " +
"E.164 phone number such as +15551234567 (sms), a device token (push), or " +
"the JSON-encoded browser PushSubscription — endpoint + keys — (web-push).",
),
// email
subject: z.string().optional().describe("Email subject (email)."),
Expand Down
28 changes: 14 additions & 14 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions pnpm-workspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ allowBuilds:
overrides:
postcss: ">=8.5.18 <9"
esbuild: ">=0.28.1"
hono: ">=4.12.27 <5"
hono: ">=4.12.34 <5"
"@hono/node-server": ">=2.0.5 <3"
js-yaml: ">=4.3.0 <5"
fast-uri: ">=3.1.4 <4"
fast-uri: ">=3.1.5 <4"
sharp: ">=0.35.0 <0.36"
body-parser: ">=2.3.0 <3"
read-yaml-file: "^2.1.0"