Skip to content

Scope RCS sends over Relay to plain text - #987

Open
Devon-White wants to merge 1 commit into
mainfrom
devon/messaging/rcs-relay-text-only
Open

Devon-White wants to merge 1 commit into
mainfrom
devon/messaging/rcs-relay-text-only

Conversation

@Devon-White

Copy link
Copy Markdown
Collaborator

Closes #961

Summary

  • Send RCS messages no longer says the Relay SDK sends RCS "the same way" as REST. That implied rich content works over Relay. The sentence now says the Relay client in the Server SDKs can send plain-text RCS (agent ID as the sender, plus a body), that it doesn't accept content, that RCS rejects media, and that rich content and media need the REST API.
  • Sibling RCS pages (overview, onboarding, receive-messages) and the RCS mentions in send-and-receive-messages make no claim about sending rich content over Relay. No change needed.

Source anchors

Server SDKs (public, main):

  • signalwire-python signalwire/relay/client.py send_message (around line 576): takes to_number, from_number, context, body, media, tags, region. There's no content parameter. media is passed through to messaging.send unchanged.
  • signalwire-typescript src/relay/RelayClient.ts sendMessage (around line 778): same options and the same pass-through of media. There's no content.

Platform (verified in internal source; behavior only):

  • The Relay gateway forwards messaging.send params to the messaging backend unchanged.
  • The backend's Relay message contract accepts a UUID sender, and resolves the sender in this order: phone number, short code, WhatsApp number, RCS agent. An RCS agent ID in from_number routes the message over RCS. The Relay path and the REST create-message endpoint share one set of RCS rules. Backend tests cover an RCS agent ID as the Relay sender. This shipped on 2026-11-04.
  • On the RCS branch, a non-empty media is rejected ("is not supported for RCS messages"), the same check REST applies.

Notes for reviewers

  • The platform already accepts content on the Relay path. The SDKs are the only gap, tracked in Relay send_message cannot send RCS rich content (content) signalwire-python#198 and Relay sendMessage cannot send RCS rich content (content) signalwire-typescript#250. When they ship, the sentence can say rich content works over Relay too.
  • The issue asked to confirm with the messaging team that a Relay send accepts an RCS agent ID as the sender. I confirmed it from source and the backend's own tests, not from a live send. Flagging it in case someone wants to run a live send before merging.
  • Over Relay, a rejected send comes back as a 400 result listing field messages, without the REST error code strings such as rcs_media_not_supported. The page's error codes are REST-specific. I didn't add this distinction to the page.

Verification

  • yarn fern-md-check passes.
  • Links checked by hand: /docs/server-sdks/guides/relay-client matches slug: guides/relay-client, and #reply-with-swml matches ## Reply with SWML in receive-messages.mdx.

Preview: /docs/platform/messaging/rcs/send-messages

The Relay client in the Server SDKs takes only body and media, so it can't
send rich RCS content, and RCS rejects media.
@Devon-White Devon-White self-assigned this Nov 23, 2026
@github-actions

Copy link
Copy Markdown
Contributor

@Manny-r31

Copy link
Copy Markdown
Collaborator

Thanks Devon. The technical scoping is right, and dropping "the same way" fixes a real overclaim. I checked the Server SDK packages and the referenced source code. In both SDKs the Relay client sends body, media, tags, and region and has no content option. The platform does take an RCS agent ID as the Relay sender, and it applies the same RCS rules to Relay sends as to REST, so a Relay send with media is rejected. A few wording and consistency fixes before merge.

1. Frame the Relay scope by what it does. fern/products/platform/pages/messaging/rcs/send-messages.mdx lines 18-20, "It doesn't accept content, and RCS rejects media, so rich content and media need the REST API." We describe what a surface does rather than what it lacks. Suggested:

The Relay client in the Server SDKs sends plain-text RCS. Pass your agent's ID as the sender and the text as body. To send rich content or media, use the REST API with content.

This also drops "RCS rejects media". Read next to line 30, which tells readers to send media as a content of type media, it suggests RCS can't carry media at all.

2. Say that the messaging rules still apply over Relay. The old sentence said "the rules and errors on this page apply". The new one drops that, so nothing tells a Relay reader that the rules in ## Messaging rules cover them too. In the referenced source code, the US-recipient and agent-status rules apply to a Relay send exactly as they do to REST. Add one sentence, for example "The messaging rules below apply to Relay sends too." Your PR notes say a rejected Relay send comes back without the codes in the ## Verify the send table. If that's right, leave the table scoped to REST as it reads now and don't extend it to Relay.

3. Split the paragraph. Lines 18-21 hold two unrelated jobs, sending over Relay and replying from SWML. The PR rewrites this paragraph, so it's a good time to give the "Reply with SWML" sentence its own line. The #reply-with-swml anchor and the /docs/server-sdks/guides/relay-client slug both check out.

4. Follow-up: the SDK reference now disagrees with this page. This PR doesn't introduce the mismatch, but the new link sends readers straight into it. The send_message / sendMessage reference pages describe only SMS and MMS and say the sender must be an E.164 phone number:

  • fern/products/server-sdks/pages/reference/python/relay/client/send-message.mdx lines 4, 10, and 28-30
  • fern/products/server-sdks/pages/reference/typescript/relay/client/send-message.mdx, same text

The "SMS/MMS Messaging" section of fern/products/server-sdks/pages/guides/make-and-receive-calls/overview.mdx, around line 636, says the same. A small follow-up PR could say on both language pages that from_number / fromNumber also takes an RCS agent ID for a plain-text RCS send, and link back here. Fine as a separate PR.

5. PR description. The repo is public. The "Platform (verified in internal source; behavior only)" block describes how internal services are built and pass requests between them, along with internal test coverage, an internal ship date, and an internal error string. Please edit the description to keep the conclusions, such as "a Relay send accepts an RCS agent ID as the sender, and the REST RCS rules apply to it", and drop the internals. The public SDK anchors and the linked SDK issues are fine to keep.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RCS page implies the Relay SDK can send rich content; it can only send text

2 participants