Repository navigation
Replace Realtime SDK examples with Server SDK usage on four pages - #874
Merged
Merged
Conversation
Contributor
Manny-r31
reviewed
Oct 28, 2026
Manny-r31
left a comment
Collaborator
There was a problem hiding this comment.
Review: minor fixes
CI is green, no conflicts. One should-fix, plus a few nits.
Should fix
- Link Relay Application on first mention. It appears unlinked in the SMS overview (above the respond tab, and again further down) and in
deployment.mdx(paragraph after the sample). Use[Relay Application](/docs/platform/glossary#relay-application). The anchor exists, andcalling/whatsapp/receive-calls.mdxalready links it this way.
Nits
api-credentials.mdx: the tab titles "Python — REST client" and "TypeScript — REST client" borrow the code-block title format, but the em-dash exception covers code-block titles only. One option is a singleREST clienttab wrapping a<CodeBlocks>with the two titledCodeBlocks. Fine to keep if it's deliberate for consistency with the page.- The SMS page introduces
<YOUR_PROJECT_ID>/<YOUR_API_TOKEN>without saying where to find them, whileapi-credentials.mdxuses<Project ID>/<API token>. Consider aligning the placeholder style or adding a one-line pointer to the credentials page. - Pre-existing text you didn't touch, flag only: the api-credentials Node.js tab still says "We use the external dependency", and its Axios URL uses
<space name>(with a space). The SMS page's invalid E.164 numbers and the REST tab's to/from swap you already disclosed.
Verified
- No em dashes in new prose, no "Call Fabric", no cXML/Compatibility API mentions.
/docs/server-sdksand/docs/platform/messagingresolve. "Inbound Message Settings" and "Inbound Call Settings" match existing pages.- Pinned versions and header comments follow
mdx-capability-guides. - The SDK calls match the in-repo Server SDK reference:
RelayClient(project, token, contexts),send_message(...),message.wait/.state,on_message/on_call,call.transfer(dest),client.run(),RestClient(host=...), andvideo.rooms.list(). - Dropping "you are not required to pass the Space URL" is correct, since the REST client requires
host.
Link Relay Application to the glossary, explain the SMS sample placeholders, group the REST client samples under one Server SDKs tab, and tidy the Axios tab on the API credentials page.
Use a valid example number, put from/to in the same order as the SWML and Relay tabs, and authenticate the cURL samples with the Project ID and API token placeholders the page explains.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Removes the remaining old Relay Realtime SDK (
@signalwire/realtime-api) usage from four pages and replaces it with the current Server SDKs. Part of #600; the TTS provider pages and the BYOC page are in separate PRs, and the glossary's Realtime SDK entry stays as the definition of the legacy name.messaging/sms/overview.mdx): the four "Relay Realtime SDK (Server)" tabs become "WebSocket (Relay)" tabs with Python and TypeScript Relay client samples. Send SMS and send MMS usesend_message/sendMessageand wait for a final state. Respond and forward use anon_message/onMessagehandler on theofficetopic, with one sentence saying how texts reach that topic. Only the tab contents changed, so this merges cleanly with Add send and receive messages guide #819 (checked withgit merge-tree).platform/setup/api-credentials.mdx): the RealtimeVideo.Clientblock is replaced by the Server SDKs' REST client listing video rooms (client.video.rooms.list()). These come first as two new tabs ahead of the existing cURL and Node.js tabs. The Server SDKs have no Relay video client, so this uses the REST endpoint the page was already demonstrating (GET /api/video/rooms). I removed the sentence "you are not required to pass the Space URL when working with the SDK" because the REST client takeshost.swml/guides/basics/deployment.mdx): theVoice.Client+ rawcalling.transfersnippet becomes a Relay client handler that callscall.transfer(script)with the same inline YAML document. The prose no longer uses the editorial "we" or namesclient.execute, and its link now points to/docs/server-sdksinstead of the Python Relay reference.messaging/chat/overview.mdx): the SMS FAQ now says to pair Chat with Messaging through the Server SDKs, linking/docs/server-sdks.Verification
Installed
signalwire-sdk==3.4.1(venv) and@signalwire/sdk@2.0.5(npm) in a scratch dir outside the repo. Checked every method, parameter, and field against the installed source and type declarations:RelayClient(project, token, contexts),async with,send_message(from_number, to_number, body | media),Message.wait(timeout),.state,@client.on_messagewithmessage.from_number/to_number/body,@client.on_call,Call.transfer(dest),client.run(), andRestClient(...).video.rooms.list().sendMessage({ fromNumber, toNumber, body | media }),message.wait(seconds),onMessage,onCall,call.transfer(dest),connect/disconnect/run, andRestClient(...).video.rooms.list().Extracted every new sample. Python passes
py_compileandpyflakes. TypeScript passestsc --strict --noEmitagainst the installed@signalwire/sdk@2.0.5. The inline SWML YAML parses.Inline SWML as a Relay transfer
dest: confirmed in the platform's Relay transfer handling thatdestmay be an HTTPS URL or an inline JSON/YAML SWML document, which is what the old sample relied on.yarn fern-md-check: all MDX files valid.Links touched:
/docs/server-sdks(product root) and/docs/platform/messaging(existing). No anchors added.Prose scan: no language names or per-language method names outside code block titles and code.
Review follow-up: Relay Application links to the glossary on the SMS overview and Deploy SWML pages; the SMS overview explains its placeholders and links API credentials; the API credentials REST client samples sit under one Server SDKs tab; the Axios tab drops the editorial "we" and uses
<space-name>in its URL.Notes for reviewers
transferreference pages saydestcan be "a Relay context name or a URL pointing to a SWML script". The platform's handling routesdestthrough SWML document fetching, where a bare word is treated as a section name, not a Relay context. Worth a separate check.+15551231234) in every tab, the REST tabs sendfrom/toin the same direction as the SWML and Relay tabs, and the cURL samples authenticate with-u '<YOUR_PROJECT_ID>:<YOUR_API_TOKEN>'instead of a pre-encoded Basic auth string.Preview
Closes #879
Refs #600