Opens a long-lived Server-Sent Events (SSE) connection that pushes inbound SMS messages to your client in real time. Messages are scoped to the phone numbers owned by the authenticated API key.
Authentication
Requires a Bearer API key with the sms:read scope.
Your phone number that received the message (E.164)
body
string
Message text content
received_at
string
ISO 8601 timestamp of when the message was received
Heartbeat
A comment-only heartbeat is sent every 30 seconds to keep the connection alive:
: heartbeat
Connection behavior
Max duration: 300 seconds (5 minutes). Reconnect after the connection closes.
Reconnect: Re-open the stream (with a short backoff) after it closes. Do not use native
EventSource — it cannot send an Authorization header, and you must never put your API key in
the URL (it leaks into logs and history). Use fetch with a streamed body reader instead.
Scope filtering: Events are filtered to the user or team associated with the API key.
Consume this stream from your server, never from browser JavaScript. It needs a full API key,
which is long-lived and carries every scope the key was issued with. Anything you ship to a browser
is readable by an extension, a devtools pane, a bundled source map, or any XSS on the page, and a
leaked key is usable until you notice and revoke it. The stream also carries full phone numbers and
message bodies, so the exposure is your customers’ data, not just your credential.Connect from a backend process and relay what the browser actually needs over your own
authenticated channel (a WebSocket or your own SSE endpoint), filtered to what that user may see.
Client tokens are not an alternative here: they only ever carry
voice:webrtc, never sms:read.
Example
// Runs on your server. Native EventSource can't set headers, so use fetch + a stream reader.const res = await fetch("https://api.revdesk.com/v1/sms/stream", { headers: { Authorization: "Bearer YOUR_API_KEY" },});const reader = res.body.getReader();const decoder = new TextDecoder();let buffer = "";for (;;) { const { value, done } = await reader.read(); if (done) break; // connection closed — reconnect with a short backoff buffer += decoder.decode(value, { stream: true }); // SSE frames are separated by a blank line. const frames = buffer.split("\n\n"); buffer = frames.pop() ?? ""; for (const frame of frames) { const event = frame.match(/^event: (.+)$/m)?.[1]; const dataLine = frame.match(/^data: (.+)$/m)?.[1]; if (!dataLine) continue; // e.g. `: heartbeat` const data = JSON.parse(dataLine); if (event === "sms_received") console.log(`New SMS from ${data.from}: ${data.body}`); }}
import requestsimport jsonurl = "https://api.revdesk.com/v1/sms/stream"headers = {"Authorization": "Bearer YOUR_API_KEY"}with requests.get(url, headers=headers, stream=True) as r: for line in r.iter_lines(decode_unicode=True): if line.startswith("data: "): data = json.loads(line[6:]) print(f"Received: {data}")
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"RevDesk","colors":{"primary":"#111827","light":"#d6d6d6","dark":"#737373"},"favicon":"https://mintcdn.com/celllabs/Kgd_6AE6Yt3h6_h8/favicon.png?fit=max\u0026auto=format\u0026n=Kgd_6AE6Yt3h6_h8\u0026q=85\u0026s=923ef44db09c5e1da299b73a3b84e3ba","api":{},"navbar":{"links":[{"href":"mailto:support@revdesk.com","label":"Contact Support"}],"primary":{"type":"button","label":"Get Started","href":"https://www.revdesk.com"}},"footer":{"socials":{"x":"https://x.com/revdeskHQ","linkedin":"https://linkedin.com/company/revdeskhq"}},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"celllabs","hasAudioNarration":false,"actualSubdomain":"celllabs","customDomains":["docs.revdesk.com"],"gitSource":{"type":"github","owner":"cell-labs-inc","repo":"revdesk-history","deployBranch":"prod","contentDirectory":"apps/docs","isPrivate":true,"mountPath":"","label":""},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6afd09e90320fc3e7f156002","clientVersion":"0.0.4177","searchFilterCounts":[{"language":"default","tag":"Developers","count":130},{"language":"default","tag":"Endpoints","count":65},{"language":"default","tag":"Advanced telephony","count":48},{"language":"default","tag":"User Guide","count":41},{"language":"default","tag":"Caller trust endpoints","count":32},{"language":"default","tag":"Using RevDesk","count":17},{"language":"default","tag":"Enterprise Registration","count":14},{"language":"default","tag":"Integrations","count":13},{"language":"default","tag":"Number health endpoints","count":12},{"language":"default","tag":"Messages","count":11}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"control","enabled":true,"payload":{"type":"string","value":"control"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"global.css","content":"sidebar-group:has(sidebar-group-header [data-tag]),sidebar-group:has(sidebar-group-header .sidebar-group-tag),sidebar-group:has(sidebar-group-header .tag){opacity:0.45}"}],"page":{"pagePath":"api-reference/sms/stream","slug":"/api-reference/sms/stream","pageMetadata":{"title":"GET /v1/sms/stream","sidebarTitle":"Stream Inbound SMS","description":"Subscribe to real-time inbound SMS events via Server-Sent Events (SSE).","api":"GET https://api.revdesk.com/v1/sms/stream","href":"/api-reference/sms/stream"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Subscribe to real-time inbound SMS events via Server-Sent Events (SSE).\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,CodeGroup,Heading,Table,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!CodeGroup)_missingMdxReference(`CodeGroup`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`Opens a long-lived Server-Sent Events (SSE) connection that pushes inbound SMS messages to your client in real time. Messages are scoped to the phone numbers owned by the authenticated API key.`}),`\n`,_jsx(Heading,{level:`2`,id:`authentication`,children:`Authentication`}),`\n`,_jsxs(_components.p,{children:[`Requires a Bearer API key with the `,_jsx(_components.code,{children:`sms:read`}),` scope.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -N`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://api.revdesk.com/v1/sms/stream\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer YOUR_API_KEY\"`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`events`,children:`Events`}),`\n`,_jsx(Heading,{level:`3`,id:`connected`,children:_jsx(_components.code,{children:`connected`})}),`\n`,_jsx(_components.p,{children:`Sent immediately after the connection is established.`}),`\n`,_jsx(CodeBlock,{numberOfLines:`3`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`3`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`event: connected`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`data: {\"clientId\":\"sms-42-1716000000000-abc1234\",\"timestamp\":1716000000000}`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(Heading,{level:`3`,id:`sms_received`,children:_jsx(_components.code,{children:`sms_received`})}),`\n`,_jsx(_components.p,{children:`Sent when an inbound SMS arrives on one of your active phone numbers.`}),`\n`,_jsx(CodeBlock,{numberOfLines:`3`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`3`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`event: sms_received`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`data: {\"message_id\":\"msg_abc123\",\"from\":\"+14155551234\",\"to\":\"+14155559999\",\"body\":\"Hello!\",\"received_at\":\"2026-05-22T18:30:00.000Z\"}`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`message_id`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Unique identifier for the message`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`from`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Sender phone number (E.164)`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`to`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Your phone number that received the message (E.164)`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`body`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Message text content`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`received_at`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`ISO 8601 timestamp of when the message was received`})]})]})]}),`\n`,_jsx(Heading,{level:`3`,id:`heartbeat`,children:`Heartbeat`}),`\n`,_jsx(_components.p,{children:`A comment-only heartbeat is sent every 30 seconds to keep the connection alive:`}),`\n`,_jsx(CodeBlock,{numberOfLines:`2`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`: heartbeat`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(Heading,{level:`2`,id:`connection-behavior`,children:`Connection behavior`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Max duration:`}),` 300 seconds (5 minutes). Reconnect after the connection closes.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Reconnect:`}),` Re-open the stream (with a short backoff) after it closes. Do `,_jsx(_components.strong,{children:`not`}),` use native\n`,_jsx(_components.code,{children:`EventSource`}),` — it cannot send an `,_jsx(_components.code,{children:`Authorization`}),` header, and you must never put your API key in\nthe URL (it leaks into logs and history). Use `,_jsx(_components.code,{children:`fetch`}),` with a streamed body reader instead.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Scope filtering:`}),` Events are filtered to the user or team associated with the API key.`]}),`\n`]}),`\n`,_jsxs(Warning,{children:[_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Consume this stream from your server, never from browser JavaScript.`}),` It needs a full API key,\nwhich is long-lived and carries every scope the key was issued with. Anything you ship to a browser\nis readable by an extension, a devtools pane, a bundled source map, or any XSS on the page, and a\nleaked key is usable until you notice and revoke it. The stream also carries full phone numbers and\nmessage bodies, so the exposure is your customers’ data, not just your credential.`]}),_jsxs(_components.p,{children:[`Connect from a backend process and relay what the browser actually needs over your own\nauthenticated channel (a WebSocket or your own SSE endpoint), filtered to what that user may see.\n`,_jsx(_components.a,{href:`/api-reference/client-tokens`,children:`Client tokens`}),` are not an alternative here: they only ever carry\n`,_jsx(_components.code,{children:`voice:webrtc`}),`, never `,_jsx(_components.code,{children:`sms:read`}),`.`]})]}),`\n`,_jsx(Heading,{level:`2`,id:`example`,children:`Example`}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`Node (fetch stream)`,numberOfLines:`25`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`25`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Runs on your server. Native EventSource can't set headers, so use fetch + a stream reader.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` res`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` fetch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://api.revdesk.com/v1/sms/stream\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` headers:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Authorization:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Bearer YOUR_API_KEY\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` reader`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` res`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`body`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`getReader`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` decoder`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` TextDecoder`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`let`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` buffer`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`for`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (;;) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`value`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`done`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` reader`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`read`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`done`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`break`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`; `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// connection closed — reconnect with a short backoff`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` buffer`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` +=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` decoder`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`decode`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`value`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`stream:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` });`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // SSE frames are separated by a blank line.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` frames`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` buffer`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`split`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\n\\\\n`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` buffer`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` frames`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`pop`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`() `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`??`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` for`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` frame`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` of`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` frames`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` event`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` frame`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`match`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D16969`},children:`/`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#DCDCAA`},children:`^`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D16969`},children:`event: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D16969`},children:`.`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`+`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`)`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#DCDCAA`},children:`$`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D16969`},children:`/`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`m`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)?.[`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`];`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` dataLine`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` frame`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`match`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D16969`},children:`/`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#DCDCAA`},children:`^`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D16969`},children:`data: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D16969`},children:`.`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`+`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`)`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#DCDCAA`},children:`$`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D16969`},children:`/`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`m`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)?.[`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`];`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`!`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`dataLine`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`continue`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`; `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:\"// e.g. `: heartbeat`\"})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` data`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` JSON`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`parse`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`dataLine`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`event`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ===`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"sms_received\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`console`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`New SMS from \"}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`body`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`Python`,numberOfLines:`11`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`11`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` requests`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` json`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`url `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://api.revdesk.com/v1/sms/stream\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`headers `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Authorization\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Bearer YOUR_API_KEY\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`with`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` requests.get(url, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`headers`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`headers, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`stream`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`True`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`as`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` r:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` for`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` line `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`in`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` r.iter_lines(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`decode_unicode`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`True`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`):`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` line.startswith(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"data: \"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`):`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` data `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` json.loads(line[`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`6`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:])`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`f`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Received: `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`data`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`]})})})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"GET /v1/sms/stream","sidebarTitle":"Stream Inbound SMS","description":"Subscribe to real-time inbound SMS events via Server-Sent Events (SSE).","api":"GET https://api.revdesk.com/v1/sms/stream","href":"/api-reference/sms/stream"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Authentication","slug":"authentication","depth":2,"children":[]},{"title":"Events","slug":"events","depth":2,"children":[{"title":"connected","slug":"connected","depth":3,"children":[]},{"title":"sms_received","slug":"sms_received","depth":3,"children":[]},{"title":"Heartbeat","slug":"heartbeat","depth":3,"children":[]}]},{"title":"Connection behavior","slug":"connection-behavior","depth":2,"children":[]},{"title":"Example","slug":"example","depth":2,"children":[]}],"codeExamples":{},"endpoint":{"title":"GET /v1/sms/stream","path":"/v1/sms/stream","servers":[{"url":"https://api.revdesk.com"}],"method":"get","request":{"security":[],"parameters":{"query":{},"header":{},"cookie":{},"path":{}},"body":{}},"response":{},"deprecated":false}},"jsLinks":["/_mintlify/custom/celllabs/b5059a729a63042d/scripts/autofill-auth.js"],"subdomain":"celllabs","siteName":"RevDesk","title":"GET /v1/sms/stream - RevDesk","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-07-31T17:43:44.883Z","originalFileLocation":"api-reference/sms/stream.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Subscribe to real-time inbound SMS events via Server-Sent Events (SSE).\">\u003cmeta data-mint-head name=\"application-name\" content=\"RevDesk\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/celllabs/dMigdZPhMefYvTWm/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/celllabs/dMigdZPhMefYvTWm/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/celllabs/dMigdZPhMefYvTWm/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/celllabs/dMigdZPhMefYvTWm/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/celllabs/dMigdZPhMefYvTWm/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/celllabs/dMigdZPhMefYvTWm/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/celllabs/dMigdZPhMefYvTWm/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/celllabs/dMigdZPhMefYvTWm/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/celllabs/dMigdZPhMefYvTWm/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"GET /v1/sms/stream - RevDesk\">\u003cmeta data-mint-head property=\"og:description\" content=\"Subscribe to real-time inbound SMS events via Server-Sent Events (SSE).\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"RevDesk\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.revdesk.com/api-reference/sms/stream\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://celllabs.mintlify.site/_mintlify/api/og/v2?division=Calling\u0026amp;title=GET+%2Fv1%2Fsms%2Fstream\u0026amp;description=Subscribe+to+real-time+inbound+SMS+events+via+Server-Sent+Events+%28SSE%29.\u0026amp;theme=665b67b381179b4f7360cf64\u0026amp;signature=ce889a27c7808c62f89eee955434ecf7bc8820210268886dbc4420d50103c465\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"GET /v1/sms/stream - RevDesk\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Subscribe to real-time inbound SMS events via Server-Sent Events (SSE).\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://celllabs.mintlify.site/_mintlify/api/og/v2?division=Calling\u0026amp;title=GET+%2Fv1%2Fsms%2Fstream\u0026amp;description=Subscribe+to+real-time+inbound+SMS+events+via+Server-Sent+Events+%28SSE%29.\u0026amp;theme=665b67b381179b4f7360cf64\u0026amp;signature=ce889a27c7808c62f89eee955434ecf7bc8820210268886dbc4420d50103c465\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/celllabs/dMigdZPhMefYvTWm/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"RevDesk\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#111827\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.revdesk.com/api-reference/sms/stream\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/sms/stream.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.revdesk.com/#organization\",\"name\":\"RevDesk\",\"url\":\"https://docs.revdesk.com\"},{\"@type\":\"WebSite\",\"@id\":\"https://docs.revdesk.com#website\",\"name\":\"RevDesk\",\"url\":\"https://docs.revdesk.com\",\"publisher\":{\"@id\":\"https://docs.revdesk.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.revdesk.com/api-reference/sms/stream#webpage\",\"url\":\"https://docs.revdesk.com/api-reference/sms/stream\",\"name\":\"GET /v1/sms/stream\",\"description\":\"Subscribe to real-time inbound SMS events via Server-Sent Events (SSE).\",\"dateModified\":\"2026-07-31T17:43:44.883Z\",\"isPartOf\":{\"@id\":\"https://docs.revdesk.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.revdesk.com/api-reference/sms/stream#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.revdesk.com/api-reference/sms/stream#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Calling\",\"item\":\"https://docs.revdesk.com/api-reference/calling-paths\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"GET /v1/sms/stream\",\"item\":\"https://docs.revdesk.com/api-reference/sms/stream\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.revdesk.com/api-reference/sms/stream#apireference\",\"headline\":\"GET /v1/sms/stream\",\"name\":\"GET /v1/sms/stream\",\"description\":\"Subscribe to real-time inbound SMS events via Server-Sent Events (SSE).\",\"url\":\"https://docs.revdesk.com/api-reference/sms/stream\",\"mainEntityOfPage\":{\"@id\":\"https://docs.revdesk.com/api-reference/sms/stream#webpage\"},\"dateModified\":\"2026-07-31T17:43:44.883Z\",\"publisher\":{\"@id\":\"https://docs.revdesk.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.revdesk.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"RevDesk\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"RevDesk\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/sms/stream.md","siteName":"RevDesk","nav":{"global":null,"tabs":[{"tab":"User Guide","pages":[{"title":"User Guide","href":""}]},{"tab":"Partners","pages":[{"title":"Partners","href":"/partners"}]},{"tab":"Developers","groups":[{"group":"Start","pages":[{"title":"Build with RevDesk","sidebarTitle":"Overview","icon":"code","href":"/api-reference"},{"title":"Quickstart","sidebarTitle":"Quickstart","href":"/api-reference/quickstart"},{"title":"RevDesk MCP Server","sidebarTitle":"MCP server","icon":"robot","href":"/api-reference/mcp"},{"title":"RevDesk API Authentication \u0026 Scopes","sidebarTitle":"Authentication \u0026 scopes","href":"/api-reference/authentication"},{"title":"RevDesk SDK \u0026 CLI","sidebarTitle":"RevDesk SDK \u0026 CLI","href":"/api-reference/sdks"}]},{"group":"Build","pages":[{"title":"Build an integration","sidebarTitle":"Build an Integration","href":"/developer-guide/build-an-integration"},{"title":"RevDesk Webhooks","sidebarTitle":"RevDesk Webhooks","href":"/api-reference/webhooks"},{"title":"Sub-entities","sidebarTitle":"Sub-entities","icon":"users","href":"/api-reference/sub-entities"},{"title":"Optimize","sidebarTitle":"Overview","href":"/api-reference/optimize"}]},{"group":"Calling","pages":[{"title":"Choosing a calling path","sidebarTitle":"Calling Paths","href":"/api-reference/calling-paths"},{"title":"Bounded client tokens","sidebarTitle":"Client Tokens","href":"/api-reference/client-tokens"},{"title":"WebRTC security model","sidebarTitle":"WebRTC Security","href":"/api-reference/webrtc-security"},{"title":"Placing \u0026 Load-Testing Calls","sidebarTitle":"Load Testing","description":"Place outbound calls via the API and verify concurrent throughput across your numbers before you go live.","href":"/api-reference/load-testing"},{"title":"GET /v1/sms/stream","sidebarTitle":"Stream Inbound SMS","api":"GET https://api.revdesk.com/v1/sms/stream","href":"/api-reference/sms/stream"}]},{"group":"Reference","pages":[{"title":"Conventions","sidebarTitle":"Conventions","description":"Errors, idempotency, and pagination: the HTTP-level conventions that apply to every endpoint.","href":"/api-reference/conventions"},{"title":"Errors","sidebarTitle":"Errors","href":"/api-reference/errors"},{"title":"Versioning and deprecation","sidebarTitle":"Versioning \u0026 deprecation","href":"/api-reference/versioning-and-deprecation"}]},{"group":"Endpoints","pages":[{"group":"Account","pages":[{"title":"Current identity","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/me","href":"/api-reference/account/current-identity"},{"title":"Account snapshot","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/account","href":"/api-reference/account/account-snapshot"}]},{"group":"Contacts","pages":[{"title":"List contacts","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/contacts","href":"/api-reference/contacts/list-contacts"},{"title":"Create or update a contact","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/contacts","href":"/api-reference/contacts/create-or-update-a-contact"},{"title":"Get a contact","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/contacts/{id}","href":"/api-reference/contacts/get-a-contact"},{"title":"Update a contact","deprecated":null,"version":null,"openapi":"/openapi.json patch /v1/contacts/{id}","href":"/api-reference/contacts/update-a-contact"},{"title":"Delete a contact","deprecated":null,"version":null,"openapi":"/openapi.json delete /v1/contacts/{id}","href":"/api-reference/contacts/delete-a-contact"}]},{"group":"Messages","pages":[{"title":"Send an SMS message","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/sms/send","href":"/api-reference/sms/send-an-sms-message"},{"title":"List SMS messages","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/messages","href":"/api-reference/sms/list-sms-messages"},{"title":"Get an SMS message","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/messages/{id}","href":"/api-reference/sms/get-an-sms-message"},{"title":"Get workspace SMS auto-reply settings","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/sms/config","href":"/api-reference/sms/get-workspace-sms-auto-reply-settings"},{"title":"Update workspace SMS auto-reply settings","deprecated":null,"version":null,"openapi":"/openapi.json patch /v1/sms/config","href":"/api-reference/sms/update-workspace-sms-auto-reply-settings"},{"title":"Get a number's SMS auto-reply override","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/phone-numbers/{id}/sms-config","href":"/api-reference/sms/get-a-numbers-sms-auto-reply-override"},{"title":"Set a number's SMS auto-reply override","deprecated":null,"version":null,"openapi":"/openapi.json patch /v1/phone-numbers/{id}/sms-config","href":"/api-reference/sms/set-a-numbers-sms-auto-reply-override"}]},{"group":"Calls","pages":[{"title":"List calls","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/calls","href":"/api-reference/calls/list-calls"},{"title":"Place an outbound AI call","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/calls","href":"/api-reference/calls/place-an-outbound-ai-call"},{"title":"Bridge two phone numbers (from_number ↔ destination)","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/calls/dial","href":"/api-reference/calls/bridge-two-phone-numbers-from_number-↔-destination"},{"title":"Retrieve a single call","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/calls/{id}","href":"/api-reference/calls/retrieve-a-single-call"},{"title":"Retrieve a call transcript","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/calls/{id}/transcript","href":"/api-reference/calls/retrieve-a-call-transcript"},{"title":"Hang up a call","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/calls/{id}/hangup","href":"/api-reference/calls/hang-up-a-call"}]},{"group":"Bookings","pages":[{"title":"List appointments","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/appointments","href":"/api-reference/appointments/list-appointments"}]},{"group":"Tasks","pages":[{"title":"List tasks","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/tasks","href":"/api-reference/tasks/list-tasks"},{"title":"Create a task","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/tasks","href":"/api-reference/tasks/create-a-task"},{"title":"Retrieve a task","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/tasks/{taskId}","href":"/api-reference/tasks/retrieve-a-task"}]},{"group":"Agents","pages":[{"title":"List AI agents","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/agents","href":"/api-reference/agents/list-ai-agents"},{"title":"Get an AI agent","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/agents/{id}","href":"/api-reference/agents/get-an-ai-agent"},{"title":"Configure an AI agent","deprecated":null,"version":null,"openapi":"/openapi.json patch /v1/agents/{id}","href":"/api-reference/agents/configure-an-ai-agent"},{"title":"Start a browser call with an AI agent","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/agents/{id}/web-call","href":"/api-reference/agents/start-a-browser-call-with-an-ai-agent"}]},{"group":"Webhooks","pages":[{"title":"List webhook subscriptions","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/webhook_subscriptions","href":"/api-reference/webhooks/list-webhook-subscriptions"},{"title":"Create a webhook subscription","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/webhook_subscriptions","href":"/api-reference/webhooks/create-a-webhook-subscription"},{"title":"Delete a webhook subscription","deprecated":null,"version":null,"openapi":"/openapi.json delete /v1/webhook_subscriptions/{id}","href":"/api-reference/webhooks/delete-a-webhook-subscription"}]},{"group":"Phone Numbers","pages":[{"title":"List owned phone numbers","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/phone-numbers","href":"/api-reference/phone-numbers/list-owned-phone-numbers"},{"title":"Purchase a new phone number","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/phone-numbers","href":"/api-reference/phone-numbers/purchase-a-new-phone-number"},{"title":"Retrieve a phone number","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/phone-numbers/{id}","href":"/api-reference/phone-numbers/retrieve-a-phone-number"},{"title":"Update a phone number's settings","deprecated":null,"version":null,"openapi":"/openapi.json patch /v1/phone-numbers/{id}","href":"/api-reference/phone-numbers/update-a-phone-numbers-settings"},{"title":"Release a phone number","deprecated":null,"version":null,"openapi":"/openapi.json delete /v1/phone-numbers/{id}","href":"/api-reference/phone-numbers/release-a-phone-number"},{"title":"Check live CNAM status","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/phone-numbers/{id}/cnam-status","href":"/api-reference/phone-numbers/check-live-cnam-status"},{"title":"Search available phone numbers","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/phone-numbers/search","href":"/api-reference/phone-numbers/search-available-phone-numbers"}]},{"group":"Caller IDs","pages":[{"title":"List caller IDs","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/caller-ids","href":"/api-reference/caller-ids/list-caller-ids"},{"title":"Start caller ID verification","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/caller-ids","href":"/api-reference/caller-ids/start-caller-id-verification"},{"title":"Update CNAM display name","deprecated":null,"version":null,"openapi":"/openapi.json patch /v1/caller-ids/{id}","href":"/api-reference/caller-ids/update-cnam-display-name"},{"title":"Revoke a caller ID","deprecated":null,"version":null,"openapi":"/openapi.json delete /v1/caller-ids/{id}","href":"/api-reference/caller-ids/revoke-a-caller-id"},{"title":"Submit verification code","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/caller-ids/{id}/verify","href":"/api-reference/caller-ids/submit-verification-code"}]},{"group":"Calling tokens","pages":[{"title":"Mint a bounded client token","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/client-tokens","href":"/api-reference/webrtc/mint-a-bounded-client-token"},{"title":"Issue a scoped WebRTC calling token","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/webrtc-token","href":"/api-reference/webrtc/issue-a-scoped-webrtc-calling-token"},{"title":"Issue a room-join token for private browser calling","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/room-token","href":"/api-reference/webrtc/issue-a-room-join-token-for-private-browser-calling"}]},{"group":"Number Registration","pages":[{"title":"List number registrations","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/number-registrations","href":"/api-reference/number-registration/list-number-registrations"},{"title":"Get a number registration","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/number-registrations/{id}","href":"/api-reference/number-registration/get-a-number-registration"}]},{"group":"Usage","pages":[{"title":"Current-month usage rollup","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/usage","href":"/api-reference/usage/current-month-usage-rollup"},{"title":"Per-phone usage","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/usage/{phoneId}","href":"/api-reference/usage/per-phone-usage"}]},{"group":"Sub-entities","pages":[{"title":"List sub-entities under the caller's umbrella organization","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/sub-entities","href":"/api-reference/sub-entities/list-sub-entities-under-the-callers-umbrella-organization"},{"title":"Create a sub-entity under the caller's umbrella organization","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/sub-entities","href":"/api-reference/sub-entities/create-a-sub-entity-under-the-callers-umbrella-organization"},{"title":"Retrieve a sub-entity","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/sub-entities/{id}","href":"/api-reference/sub-entities/retrieve-a-sub-entity"},{"title":"Update a sub-entity","deprecated":null,"version":null,"openapi":"/openapi.json patch /v1/sub-entities/{id}","href":"/api-reference/sub-entities/update-a-sub-entity"}]},{"group":"Optimize","pages":[{"title":"List website tests","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/optimize/tests","href":"/api-reference/optimize/list-website-tests"},{"title":"Create a website test","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/optimize/tests","href":"/api-reference/optimize/create-a-website-test"},{"title":"Get a website test","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/optimize/tests/{id}","href":"/api-reference/optimize/get-a-website-test"},{"title":"Update a website test","deprecated":null,"version":null,"openapi":"/openapi.json patch /v1/optimize/tests/{id}","href":"/api-reference/optimize/update-a-website-test"},{"title":"Archive a website test","deprecated":null,"version":null,"openapi":"/openapi.json delete /v1/optimize/tests/{id}","href":"/api-reference/optimize/archive-a-website-test"},{"title":"Ship a website test","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/optimize/tests/{id}/ship","href":"/api-reference/optimize/ship-a-website-test"},{"title":"Get website test results","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/optimize/tests/{id}/results","href":"/api-reference/optimize/get-website-test-results"},{"title":"List conversions for a website test","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/optimize/conversions","href":"/api-reference/optimize/list-conversions-for-a-website-test"},{"title":"Record a conversion","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/optimize/conversions","href":"/api-reference/optimize/record-a-conversion"},{"title":"List site properties","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/optimize/properties","href":"/api-reference/optimize/list-site-properties"},{"title":"Get the site tag","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/optimize/snippet","href":"/api-reference/optimize/get-the-site-tag"}]}]},{"group":"Advanced telephony","pages":[{"title":"Caller trust and number reputation","sidebarTitle":"Overview","href":"/concepts/caller-trust"},{"title":"Registration Requirements","sidebarTitle":"Requirements","href":"/api-reference/enterprise-registration"},{"title":"Branded Calling","sidebarTitle":"Branded Calling","href":"/api-reference/branded-calling"},{"title":"Number Health and Spam Test sessions","sidebarTitle":"Overview \u0026 workflow","href":"/api-reference/number-health"},{"group":"Caller trust endpoints","pages":[{"group":"Enterprise Registration","pages":[{"title":"Get the caller's enterprise registration","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/caller-trust/enterprise","href":"/api-reference/enterprise-registration/get-the-callers-enterprise-registration"},{"title":"Create or update the caller's enterprise registration draft","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/caller-trust/enterprise","href":"/api-reference/enterprise-registration/create-or-update-the-callers-enterprise-registration-draft"},{"title":"Delete the caller's enterprise registration","deprecated":null,"version":null,"openapi":"/openapi.json delete /v1/caller-trust/enterprise","href":"/api-reference/enterprise-registration/delete-the-callers-enterprise-registration"},{"title":"Submit enterprise to the carrier","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/caller-trust/enterprise/submit","href":"/api-reference/enterprise-registration/submit-enterprise-to-the-carrier"},{"title":"Sign LOA + submit enterprise to carrier","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/caller-trust/enterprise/sign-and-submit","href":"/api-reference/enterprise-registration/sign-loa-+-submit-enterprise-to-carrier"},{"title":"Generate LOA PDF for hand-signing","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/caller-trust/enterprise/generate-loa","href":"/api-reference/enterprise-registration/generate-loa-pdf-for-hand-signing"},{"title":"Re-sign the LOA for an enterprise","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/caller-trust/enterprise/resign","href":"/api-reference/enterprise-registration/re-sign-the-loa-for-an-enterprise"},{"group":"By ID","pages":[{"title":"Get an enterprise registration by ID","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/caller-trust/enterprise/{id}","href":"/api-reference/enterprise-registration/get-an-enterprise-registration-by-id"},{"title":"Update a DRAFT enterprise registration","deprecated":null,"version":null,"openapi":"/openapi.json patch /v1/caller-trust/enterprise/{id}","href":"/api-reference/enterprise-registration/update-a-draft-enterprise-registration"},{"title":"Delete an enterprise registration by ID","deprecated":null,"version":null,"openapi":"/openapi.json delete /v1/caller-trust/enterprise/{id}","href":"/api-reference/enterprise-registration/delete-an-enterprise-registration-by-id"},{"title":"Submit enterprise to the carrier (by ID)","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/caller-trust/enterprise/{id}/submit","href":"/api-reference/enterprise-registration/submit-enterprise-to-the-carrier-by-id"},{"title":"Sign LOA + submit enterprise to carrier (by ID)","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/caller-trust/enterprise/{id}/sign-and-submit","href":"/api-reference/enterprise-registration/sign-loa-+-submit-enterprise-to-carrier-by-id"},{"title":"Generate LOA PDF for hand-signing (by ID)","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/caller-trust/enterprise/{id}/generate-loa","href":"/api-reference/enterprise-registration/generate-loa-pdf-for-hand-signing-by-id"},{"title":"Re-sign the LOA for an enterprise (by ID)","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/caller-trust/enterprise/{id}/resign","href":"/api-reference/enterprise-registration/re-sign-the-loa-for-an-enterprise-by-id"}]}]},{"group":"Branded Calling","pages":[{"title":"Retrieve the caller's Display Identity Record (brand)","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/caller-trust/brand","href":"/api-reference/branded-calling/retrieve-the-callers-display-identity-record-brand"},{"title":"Save (or update) the Display Identity Record draft","deprecated":null,"version":null,"openapi":"/openapi.json put /v1/caller-trust/brand","href":"/api-reference/branded-calling/save-or-update-the-display-identity-record-draft"},{"title":"Submit the brand profile for vetting","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/caller-trust/brand/submit","href":"/api-reference/branded-calling/submit-the-brand-profile-for-vetting"}]},{"group":"Registration Profile","pages":[{"title":"Get the workspace's Free Caller Registry registration profile","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/caller-trust/registration-profile","href":"/api-reference/number-registration/get-the-workspaces-free-caller-registry-registration-profile"},{"title":"Set the workspace's Free Caller Registry registration profile","deprecated":null,"version":null,"openapi":"/openapi.json put /v1/caller-trust/registration-profile","href":"/api-reference/number-registration/set-the-workspaces-free-caller-registry-registration-profile"}]},{"group":"Reputation","pages":[{"title":"Get Number Reputation enrollment settings","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/caller-trust/reputation","href":"/api-reference/reputation/get-number-reputation-enrollment-settings"},{"title":"Enable Number Reputation monitoring","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/caller-trust/reputation","href":"/api-reference/reputation/enable-number-reputation-monitoring"},{"title":"Update reputation check frequency","deprecated":null,"version":null,"openapi":"/openapi.json patch /v1/caller-trust/reputation","href":"/api-reference/reputation/update-reputation-check-frequency"},{"title":"Disable Number Reputation monitoring","deprecated":null,"version":null,"openapi":"/openapi.json delete /v1/caller-trust/reputation","href":"/api-reference/reputation/disable-number-reputation-monitoring"},{"title":"List reputation scores for every enrolled number","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/caller-trust/reputation/numbers","href":"/api-reference/reputation/list-reputation-scores-for-every-enrolled-number"},{"title":"Enroll phone numbers in reputation monitoring","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/caller-trust/reputation/numbers","href":"/api-reference/reputation/enroll-phone-numbers-in-reputation-monitoring"},{"title":"Get reputation scores for a phone number","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/caller-trust/reputation/numbers/{phone}","href":"/api-reference/reputation/get-reputation-scores-for-a-phone-number"},{"title":"Disenroll a phone number from reputation monitoring","deprecated":null,"version":null,"openapi":"/openapi.json delete /v1/caller-trust/reputation/numbers/{phone}","href":"/api-reference/reputation/disenroll-a-phone-number-from-reputation-monitoring"},{"title":"List remediation requests","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/caller-trust/reputation/remediations","href":"/api-reference/reputation/list-remediation-requests"},{"title":"Submit numbers for spam-label remediation","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/caller-trust/reputation/remediations","href":"/api-reference/reputation/submit-numbers-for-spam-label-remediation"},{"title":"Get a remediation request","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/caller-trust/reputation/remediations/{id}","href":"/api-reference/reputation/get-a-remediation-request"}]},{"group":"Documents","pages":[{"title":"Upload a document (e.g. signed LOA)","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/caller-trust/documents","href":"/api-reference/documents/upload-a-document-eg-signed-loa"},{"title":"Get document status","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/caller-trust/documents/{id}","href":"/api-reference/documents/get-document-status"}]}]},{"group":"Number health endpoints","pages":[{"title":"Get the canonical Number Health evidence policy","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/number-health/policy","href":"/api-reference/number-health/get-the-canonical-number-health-evidence-policy"},{"title":"List authoritative number-health evidence","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/number-health/numbers","href":"/api-reference/number-health/list-authoritative-number-health-evidence"},{"title":"List Number Sets","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/number-health/sets","href":"/api-reference/number-health/list-number-sets"},{"title":"Create a Number Set","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/number-health/sets","href":"/api-reference/number-health/create-a-number-set"},{"title":"Update a Number Set and its member roles","deprecated":null,"version":null,"openapi":"/openapi.json patch /v1/number-health/sets/{id}","href":"/api-reference/number-health/update-a-number-set-and-its-member-roles"},{"title":"Resolve a Number Set caller ID","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/number-health/sets/{id}/resolve","href":"/api-reference/number-health/resolve-a-number-set-caller-id"},{"title":"Start a resumable Number Health test session","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/number-health/sessions","href":"/api-reference/number-health/start-a-resumable-number-health-test-session"},{"title":"Resume a Number Health test session","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/number-health/sessions/{id}","href":"/api-reference/number-health/resume-a-number-health-test-session"},{"title":"Pause, resume, or close a Number Health session","deprecated":null,"version":null,"openapi":"/openapi.json patch /v1/number-health/sessions/{id}","href":"/api-reference/number-health/pause-resume-or-close-a-number-health-session"},{"title":"Read carrier-confirmed inbound test progress","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/number-health/sessions/{id}/inbound","href":"/api-reference/number-health/read-carrier-confirmed-inbound-test-progress"},{"title":"Attach a real call to a Number Health session","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/number-health/sessions/{id}/attempts","href":"/api-reference/number-health/attach-a-real-call-to-a-number-health-session"},{"title":"Record or revise a carrier/handset observation","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/number-health/attempts/{id}/observation","href":"/api-reference/number-health/record-or-revise-a-carrierhandset-observation"}]}]}]},{"tab":"Policies","pages":[{"title":"Policies","href":"/policies/privacy-policy"}]}]},"basePath":"","title":"GET /v1/sms/stream - RevDesk","deploymentId":"dpl_HhUetB7eHHDAmK9T1Teip38TgFx9","buildId":"dpl_HhUetB7eHHDAmK9T1Teip38TgFx9","dynamics":["c2aa737661","2b790eda92","b0f84f53ff"],"chunks":["OpenApiReferenceProvider-jJHA3WSo.js","utils-DbZn3Mjn.js","cloneDeep-CnBnaSyy.js","_Uint8Array-CMQtTgBR.js","isObject-FP1Yky1u.js","utils-Bl2DvzOJ.js","addUniqueKeysToSchema-BwOLo9p1.js","snippetPresets-BBiPpKa-.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","conditional-requirements-CFM0id0Q.js","ApiExamples-C0px4Tml.js","isEqual-zAyttAAO.js","usePlaygroundInputsStore-Dell6dGw.js","shallow-0VKqkSqN.js","getApiPlaygroundDisplay-CP_ctPEB.js","CodeSnippet-5L35ic0s.js","CodeSnippets-DOXbNhJw.js","Page-DRLI_2Ue.js","getPastedJson-VhzT9m2P.js","icon-CD8_AtCO.js","MethodPill-DGgOMftG.js","DuplicateIcon-DZ6A_EtN.js","createIcon-DUl4oM5f.js","DynamicMarkdown-BGHukeRM.js","SectionHeading-ChrEUs8u.js","axios-vUo_bRtp.js"]}