{"id":214402,"date":"2026-10-29T16:18:15","date_gmt":"2026-10-29T16:18:15","guid":{"rendered":"https:\/\/sinch.com\/blog\/migrar-da-api-de-sms-xms-para-a-conversation-api\/"},"modified":"2026-11-17T11:02:29","modified_gmt":"2026-11-17T11:02:29","slug":"migrar-da-api-de-sms-xms-para-a-conversation-api","status":"publish","type":"blog","link":"https:\/\/sinch.com\/pt\/blog\/migrar-da-api-de-sms-xms-para-a-conversation-api\/","title":{"rendered":"Migrar da API de SMS da Sinch para a Conversation API"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">If your code posts to <code>https:\/\/us.sms.api.sinch.com\/xms\/v1\/{service_plan_id}\/batches<\/code>, or calls <code>sms.batches.send<\/code> in a Sinch SDK, it uses the standalone Sinch SMS API, sometimes called XMS. The SMS API reached end-of-sale on April 15, 2026. Integrations already built on it keep working, but <a href=\"https:\/\/github.com\/sinch\/sinch-sdk-node#readme\">new integrations should use the Sinch Conversation API<\/a>, even on an account that has used the SMS API before. The <a href=\"https:\/\/developers.sinch.com\/docs\/conversation\/\">Conversation API<\/a> sends the same SMS through the same service plan and number, and the same request shape covers RCS, WhatsApp, and the other channels. This post maps an SMS API integration to the Conversation API piece by piece, with requests I ran against both APIs on the same service plan. If you&#8217;re starting from scratch instead, <a href=\"https:\/\/sinch.com\/pt\/blog\/enviar-sms-conversation-api-curl-nodejs-python\/\">Send SMS with the Sinch Conversation API in curl, Node.js, and Python<\/a> is the shorter path.<\/p>\n\r\n    <nav data-content-type=\"longform\" class=\"toc-block longform-spacings px-5 py-6 px-md-6 px-lg-7 py-md-7 bg-light fs-sm rounded-lg\" aria-labelledby=\"toc-title-4998\"><p class=\"h5 m-0\" id=\"toc-title-4998\">\u00cdndice<\/p><div class=\"d-flex mt-3\"><div class=\"w-auto fw-bold text-accent d-flex me-2\">01<\/div><div class=\"d-flex flex-column\"><a class=\"fw-bold scrollme link-body-color text-accent\" href=\"#youll-need\">You&#8217;ll need<\/a><\/div><\/div><div class=\"d-flex mt-3\"><div class=\"w-auto fw-bold text-accent d-flex me-2\">02<\/div><div class=\"d-flex flex-column\"><a class=\"fw-bold scrollme link-body-color text-accent\" href=\"#link-your-service-plan-to-a-conversation-api-app\">Link your service plan to a Conversation API app<\/a><\/div><\/div><div class=\"d-flex mt-3\"><div class=\"w-auto fw-bold text-accent d-flex me-2\">03<\/div><div class=\"d-flex flex-column\"><a class=\"fw-bold scrollme link-body-color text-accent\" href=\"#send-one-message\">Send one message<\/a><\/div><\/div><div class=\"d-flex mt-3\"><div class=\"w-auto fw-bold text-accent d-flex me-2\">04<\/div><div class=\"d-flex flex-column\"><a class=\"fw-bold scrollme link-body-color text-accent\" href=\"#field-by-field\">Field by field<\/a><\/div><\/div><div class=\"d-flex mt-3\"><div class=\"w-auto fw-bold text-accent d-flex me-2\">05<\/div><div class=\"d-flex flex-column\"><a class=\"fw-bold scrollme link-body-color text-accent\" href=\"#send-to-many-recipients\">Send to many recipients<\/a><\/div><\/div><div class=\"d-flex mt-3\"><div class=\"w-auto fw-bold text-accent d-flex me-2\">06<\/div><div class=\"d-flex flex-column\"><a class=\"fw-bold scrollme link-body-color text-accent\" href=\"#delivery-reports\">Delivery Reports<\/a><\/div><\/div><div class=\"d-flex mt-3\"><div class=\"w-auto fw-bold text-accent d-flex me-2\">07<\/div><div class=\"d-flex flex-column\"><a class=\"fw-bold scrollme link-body-color text-accent\" href=\"#inbound-messages\">Inbound messages<\/a><\/div><\/div><div class=\"d-flex mt-3\"><div class=\"w-auto fw-bold text-accent d-flex me-2\">08<\/div><div class=\"d-flex flex-column\"><a class=\"fw-bold scrollme link-body-color text-accent\" href=\"#move-one-flow-at-a-time\">Move one flow at a time<\/a><a class=\"scrollme link-body-color\" href=\"#start-with-outbound-notifications\">Start with outbound notifications<\/a><a class=\"scrollme link-body-color\" href=\"#give-sms-api-sends-their-own-callback_url-while-you-move\">Give SMS API sends their own callback_url while you move<\/a><a class=\"scrollme link-body-color\" href=\"#keep-client_reference-values-in-message_metadata\">Keep client_reference values in message_metadata<\/a><a class=\"scrollme link-body-color\" href=\"#send-to-phone-numbers-with-identified_by\">Send to phone numbers with identified_by<\/a><\/div><\/div><div class=\"d-flex mt-3\"><div class=\"w-auto fw-bold text-accent d-flex me-2\">09<\/div><div class=\"d-flex flex-column\"><a class=\"fw-bold scrollme link-body-color text-accent\" href=\"#troubleshooting\">Troubleshooting<\/a><\/div><\/div><div class=\"d-flex mt-3\"><div class=\"w-auto fw-bold text-accent d-flex me-2\">10<\/div><div class=\"d-flex flex-column\"><a class=\"fw-bold scrollme link-body-color text-accent\" href=\"#next-steps\">Next steps<\/a><\/div><\/div><div class=\"d-flex mt-3\"><div class=\"w-auto fw-bold text-accent d-flex me-2\">11<\/div><div class=\"d-flex flex-column\"><a class=\"fw-bold scrollme link-body-color text-accent\" href=\"#additional-resources\">Additional resources<\/a><\/div><\/div><\/nav>\n<h2 class=\"wp-block-heading\">You&#8217;ll need<\/h2>\n\n<ul class=\"wp-block-list\">\n<li>Your existing SMS API service plan and the numbers on it<\/li>\n\n\n\n<li>Access to the Conversation API in the <a href=\"https:\/\/dashboard.sinch.com\">Sinch dashboard<\/a> (open <strong>Conversation API<\/strong> in the left menu and click <strong>GET ACCESS<\/strong> if you haven&#8217;t)<\/li>\n\n\n\n<li><code>curl<\/code> and <code>jq<\/code> for the shell examples, or Node.js 20 or later with <code>@sinch\/sdk-core<\/code> for the Node.js examples<\/li>\n<\/ul>\n\n<h2 class=\"wp-block-heading\">Link your service plan to a Conversation API app<\/h2>\n\n<p class=\"wp-block-paragraph\">You don&#8217;t need a new number. The Conversation API sends SMS through an <strong>app<\/strong>, and the app&#8217;s SMS channel points at an SMS service plan. Point it at the one you already have.<\/p>\n    <div data-content-type=\"longform\"  class=\"callout text-body-color px-5 py-6 px-md-6 px-lg-7 py-md-7 longform-spacings rounded-lg bg-sand\" data-theme=\"light\">\r\n\r\n        <div class=\"content-body\"> <p class=\"mb-0\">Linking changes where the service plan&#8217;s callbacks go. The plan&#8217;s callback URLs have to be removed before you can link it. After that, inbound messages go to the app&#8217;s Conversation API webhook, and Delivery Reports for batches you still send through the SMS API reach you only if the batch sets its own <code>callback_url<\/code>. Set up the app&#8217;s webhook first, and try it on a test service plan before production if you have one.<\/p><\/div>\r\n    <\/div>\r\n\n<p class=\"wp-block-paragraph\">The steps:<\/p>\n\n<ol class=\"wp-block-list\">\n<li>Go to <strong>Conversation API<\/strong>, then <strong>Apps<\/strong>, and create an app in the same region as your service plan. The Conversation API runs in the US, EU, and Brazil. If your service plan is in another SMS API region, such as Australia or Canada, ask your Sinch account manager which Conversation API region to use before you start.<\/li>\n\n\n\n<li>In the app, click <strong>SET UP CHANNEL<\/strong> on the <strong>SMS<\/strong> row and pick your existing service plan. If the plan has callback URLs set, the dashboard won&#8217;t link it until you remove them under <strong>SMS<\/strong>, <strong>Service APIs<\/strong>, <strong>Callback URLs<\/strong>. That includes the <strong>Incoming URL<\/strong> override, not only the <strong>Default URL<\/strong>. Set up the app&#8217;s webhook before you do that (see <a href=\"#delivery-reports\">Delivery Reports<\/a>), because the plan stops sending callbacks to your old endpoint from that point.<\/li>\n\n\n\n<li>Go to <strong>Settings<\/strong>, then <strong>Access Keys<\/strong>, and create an access key. Copy the key ID and secret. The secret is shown once.<\/li>\n<\/ol>\n\n<p class=\"wp-block-paragraph\">Copy the app ID from the app and the project ID from <strong>Settings<\/strong>, <strong>Project Settings<\/strong>. Those replace the service plan ID and API token in your code:<\/p>\n\n<figure tabindex=\"0\" class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>SMS API<\/th><th>Conversation API<\/th><\/tr><\/thead><tbody><tr><td><code>https:\/\/{region}.sms.api.sinch.com<\/code><\/td><td><code>https:\/\/{region}.conversation.api.sinch.com<\/code><\/td><\/tr><tr><td>Service plan ID in the path<\/td><td>Project ID in the path, app ID in the body<\/td><\/tr><tr><td>API token as a bearer token<\/td><td>Access key (key ID and secret) exchanged for an OAuth 2.0 token<\/td><\/tr><\/tbody><\/table><\/figure>\n\n<p class=\"wp-block-paragraph\">The token comes from one request, and it lasts about an hour:<\/p>\n    <div data-content-type=\"longform\" class=\"code-snippet longform-spacings rounded-lg overflow-hidden shadow \" data-count=\"1\">\r\n        <ul class=\"nav nav-buttons code-snippet__tabs longform-except position-relative d-flex gap-2 flex-wrap p-3\" role=\"tablist\">\r\n\r\n                            \r\n                    \r\n                        <li class=\"nav-item\" role=\"presentation\">\r\n                            <button class=\"nav-link active\" data-bs-toggle=\"tab\" data-bs-target=\"#block-d727aef0fae0ad212f55a40f5250eabd_code_0\" type=\"button\" role=\"tab\" aria-controls=\"block-d727aef0fae0ad212f55a40f5250eabd_code_0\" aria-selected=\"true\">\r\n                                Shell                            <\/button>\r\n                        <\/li>\r\n\r\n                    \r\n                            \r\n        <\/ul>\r\n        <div class=\"code-snippet__tab-content tab-content\">\r\n\r\n                            \r\n                    <div class=\"tab-pane show active\" id=\"block-d727aef0fae0ad212f55a40f5250eabd_code_0\" role=\"tabpanel\" aria-labelledby=\"block-d727aef0fae0ad212f55a40f5250eabd_code_0\">\r\n                        <div class=\"code-snippet__code-wrapper\">\r\n                            <div class=\"nav nav-buttons code-snippet__copy-wrapper\">\r\n                                <button type=\"button\" class=\"nav-link code-snippet__copy\" data-clipboard-target=\"#block-d727aef0fae0ad212f55a40f5250eabd_code_0_content\" data-clipboard-label=\"Copiar para a \u00e1rea de transfer\u00eancia\" data-clipboard-success-label=\"Copiado!\" data-clipboard-error-label=\"N\u00e3o foi poss\u00edvel copiar\" data-tooltip=\"Copiar para a \u00e1rea de transfer\u00eancia\" data-tooltip-placement=\"left\" role=\"tooltip\" aria-label=\"Copiar para a \u00e1rea de transfer\u00eancia\">\r\n                                    <svg class=\"code-snippet__copy-icon code-snippet__copy-icon--default\" width=\"24\" height=\"24\" aria-hidden=\"true\" data-url=\"https:\/\/sinch.com\/wp-content\/plugins\/sinch-core\/assets\/icons\/sinch\/file-stack.svg\"><\/svg>\r\n                                    <svg class=\"code-snippet__copy-icon code-snippet__copy-icon--success\" width=\"24\" height=\"24\" aria-hidden=\"true\" data-url=\"https:\/\/sinch.com\/wp-content\/plugins\/sinch-core\/assets\/icons\/sinch\/badge-check.svg\"><\/svg>\r\n                                <\/button>\r\n                            <\/div>\r\n                                                        <pre class=\"w-100 h-100 m-0 line-numbers language-shell\" tabindex=\"0\">\r\n                                <code id=\"block-d727aef0fae0ad212f55a40f5250eabd_code_0_content\" class=\"language-shell\">\r\n\r\n                                    export SINCH_ACCESS_TOKEN=$(curl --silent --show-error --fail-with-body \\\r\n  https:\/\/auth.sinch.com\/oauth2\/token \\\r\n  --user &quot;$SINCH_KEY_ID:$SINCH_KEY_SECRET&quot; \\\r\n  --data grant_type=client_credentials | jq -r .access_token)\r\n                                <\/code>\r\n                            <\/pre>\r\n                        <\/div>\r\n                    <\/div>\r\n                                    <\/div>\r\n    <\/div>\r\n\n<p class=\"wp-block-paragraph\">The SDKs request and refresh the token for you.<\/p>\n\n<h2 class=\"wp-block-heading\">Send one message<\/h2>\n\n<p class=\"wp-block-paragraph\">Here&#8217;s a typical SMS API call: One recipient, a Delivery Report per recipient, and a reference to match the report to an order.<\/p>\n    <div data-content-type=\"longform\" class=\"code-snippet longform-spacings rounded-lg overflow-hidden shadow \" data-count=\"1\">\r\n        <ul class=\"nav nav-buttons code-snippet__tabs longform-except position-relative d-flex gap-2 flex-wrap p-3\" role=\"tablist\">\r\n\r\n                            \r\n                    \r\n                        <li class=\"nav-item\" role=\"presentation\">\r\n                            <button class=\"nav-link active\" data-bs-toggle=\"tab\" data-bs-target=\"#block-c04da5b6923b4157c3ae0d7205902a00_code_0\" type=\"button\" role=\"tab\" aria-controls=\"block-c04da5b6923b4157c3ae0d7205902a00_code_0\" aria-selected=\"true\">\r\n                                Shell                            <\/button>\r\n                        <\/li>\r\n\r\n                    \r\n                            \r\n        <\/ul>\r\n        <div class=\"code-snippet__tab-content tab-content\">\r\n\r\n                            \r\n                    <div class=\"tab-pane show active\" id=\"block-c04da5b6923b4157c3ae0d7205902a00_code_0\" role=\"tabpanel\" aria-labelledby=\"block-c04da5b6923b4157c3ae0d7205902a00_code_0\">\r\n                        <div class=\"code-snippet__code-wrapper\">\r\n                            <div class=\"nav nav-buttons code-snippet__copy-wrapper\">\r\n                                <button type=\"button\" class=\"nav-link code-snippet__copy\" data-clipboard-target=\"#block-c04da5b6923b4157c3ae0d7205902a00_code_0_content\" data-clipboard-label=\"Copiar para a \u00e1rea de transfer\u00eancia\" data-clipboard-success-label=\"Copiado!\" data-clipboard-error-label=\"N\u00e3o foi poss\u00edvel copiar\" data-tooltip=\"Copiar para a \u00e1rea de transfer\u00eancia\" data-tooltip-placement=\"left\" role=\"tooltip\" aria-label=\"Copiar para a \u00e1rea de transfer\u00eancia\">\r\n                                    <svg class=\"code-snippet__copy-icon code-snippet__copy-icon--default\" width=\"24\" height=\"24\" aria-hidden=\"true\" data-url=\"https:\/\/sinch.com\/wp-content\/plugins\/sinch-core\/assets\/icons\/sinch\/file-stack.svg\"><\/svg>\r\n                                    <svg class=\"code-snippet__copy-icon code-snippet__copy-icon--success\" width=\"24\" height=\"24\" aria-hidden=\"true\" data-url=\"https:\/\/sinch.com\/wp-content\/plugins\/sinch-core\/assets\/icons\/sinch\/badge-check.svg\"><\/svg>\r\n                                <\/button>\r\n                            <\/div>\r\n                                                        <pre class=\"w-100 h-100 m-0 line-numbers language-shell\" tabindex=\"0\">\r\n                                <code id=\"block-c04da5b6923b4157c3ae0d7205902a00_code_0_content\" class=\"language-shell\">\r\n\r\n                                    curl --silent --show-error --fail-with-body \\\r\n  &quot;https:\/\/us.sms.api.sinch.com\/xms\/v1\/$SINCH_SERVICE_PLAN_ID\/batches&quot; \\\r\n  --header &quot;Authorization: Bearer $SINCH_API_TOKEN&quot; \\\r\n  --header &quot;Content-Type: application\/json&quot; \\\r\n  --data &#039;{\r\n    &quot;from&quot;: &quot;+12025550123&quot;,\r\n    &quot;to&quot;: [&quot;+15551234567&quot;],\r\n    &quot;body&quot;: &quot;Your order has shipped&quot;,\r\n    &quot;delivery_report&quot;: &quot;per_recipient&quot;,\r\n    &quot;client_reference&quot;: &quot;order-1042&quot;\r\n  }&#039;\r\n                                <\/code>\r\n                            <\/pre>\r\n                        <\/div>\r\n                    <\/div>\r\n                                    <\/div>\r\n    <\/div>\r\n    <div data-content-type=\"longform\" class=\"code-snippet longform-spacings rounded-lg overflow-hidden shadow \" data-count=\"1\">\r\n        <ul class=\"nav nav-buttons code-snippet__tabs longform-except position-relative d-flex gap-2 flex-wrap p-3\" role=\"tablist\">\r\n\r\n                            \r\n                    \r\n                        <li class=\"nav-item\" role=\"presentation\">\r\n                            <button class=\"nav-link active\" data-bs-toggle=\"tab\" data-bs-target=\"#block-beae305a27abbe64132f951c927eefed_code_0\" type=\"button\" role=\"tab\" aria-controls=\"block-beae305a27abbe64132f951c927eefed_code_0\" aria-selected=\"true\">\r\n                                Shell                            <\/button>\r\n                        <\/li>\r\n\r\n                    \r\n                            \r\n        <\/ul>\r\n        <div class=\"code-snippet__tab-content tab-content\">\r\n\r\n                            \r\n                    <div class=\"tab-pane show active\" id=\"block-beae305a27abbe64132f951c927eefed_code_0\" role=\"tabpanel\" aria-labelledby=\"block-beae305a27abbe64132f951c927eefed_code_0\">\r\n                        <div class=\"code-snippet__code-wrapper\">\r\n                            <div class=\"nav nav-buttons code-snippet__copy-wrapper\">\r\n                                <button type=\"button\" class=\"nav-link code-snippet__copy\" data-clipboard-target=\"#block-beae305a27abbe64132f951c927eefed_code_0_content\" data-clipboard-label=\"Copiar para a \u00e1rea de transfer\u00eancia\" data-clipboard-success-label=\"Copiado!\" data-clipboard-error-label=\"N\u00e3o foi poss\u00edvel copiar\" data-tooltip=\"Copiar para a \u00e1rea de transfer\u00eancia\" data-tooltip-placement=\"left\" role=\"tooltip\" aria-label=\"Copiar para a \u00e1rea de transfer\u00eancia\">\r\n                                    <svg class=\"code-snippet__copy-icon code-snippet__copy-icon--default\" width=\"24\" height=\"24\" aria-hidden=\"true\" data-url=\"https:\/\/sinch.com\/wp-content\/plugins\/sinch-core\/assets\/icons\/sinch\/file-stack.svg\"><\/svg>\r\n                                    <svg class=\"code-snippet__copy-icon code-snippet__copy-icon--success\" width=\"24\" height=\"24\" aria-hidden=\"true\" data-url=\"https:\/\/sinch.com\/wp-content\/plugins\/sinch-core\/assets\/icons\/sinch\/badge-check.svg\"><\/svg>\r\n                                <\/button>\r\n                            <\/div>\r\n                                                        <pre class=\"w-100 h-100 m-0 line-numbers language-shell\" tabindex=\"0\">\r\n                                <code id=\"block-beae305a27abbe64132f951c927eefed_code_0_content\" class=\"language-shell\">\r\n\r\n                                    {&quot;body&quot;:&quot;Your order has shipped&quot;,&quot;canceled&quot;:false,&quot;client_reference&quot;:&quot;order-1042&quot;,&quot;created_at&quot;:&quot;2026-10-28T11:57:15.529Z&quot;,&quot;delivery_report&quot;:&quot;per_recipient&quot;,&quot;expire_at&quot;:&quot;2026-10-31T11:57:15.529Z&quot;,&quot;flash_message&quot;:false,&quot;from&quot;:&quot;46765106280&quot;,&quot;id&quot;:&quot;01M615Y8W9CRFH0SVQBS9KVK7F&quot;,&quot;modified_at&quot;:&quot;2026-10-28T11:57:15.529Z&quot;,&quot;to&quot;:[&quot;46706855785&quot;],&quot;type&quot;:&quot;mt_text&quot;}\r\n                                <\/code>\r\n                            <\/pre>\r\n                        <\/div>\r\n                    <\/div>\r\n                                    <\/div>\r\n    <\/div>\r\n\n<p class=\"wp-block-paragraph\">The same message with the Conversation API:<\/p>\n    <div data-content-type=\"longform\" class=\"code-snippet longform-spacings rounded-lg overflow-hidden shadow \" data-count=\"1\">\r\n        <ul class=\"nav nav-buttons code-snippet__tabs longform-except position-relative d-flex gap-2 flex-wrap p-3\" role=\"tablist\">\r\n\r\n                            \r\n                    \r\n                        <li class=\"nav-item\" role=\"presentation\">\r\n                            <button class=\"nav-link active\" data-bs-toggle=\"tab\" data-bs-target=\"#block-168e0575b693934779f47f30a8b4b729_code_0\" type=\"button\" role=\"tab\" aria-controls=\"block-168e0575b693934779f47f30a8b4b729_code_0\" aria-selected=\"true\">\r\n                                Shell                            <\/button>\r\n                        <\/li>\r\n\r\n                    \r\n                            \r\n        <\/ul>\r\n        <div class=\"code-snippet__tab-content tab-content\">\r\n\r\n                            \r\n                    <div class=\"tab-pane show active\" id=\"block-168e0575b693934779f47f30a8b4b729_code_0\" role=\"tabpanel\" aria-labelledby=\"block-168e0575b693934779f47f30a8b4b729_code_0\">\r\n                        <div class=\"code-snippet__code-wrapper\">\r\n                            <div class=\"nav nav-buttons code-snippet__copy-wrapper\">\r\n                                <button type=\"button\" class=\"nav-link code-snippet__copy\" data-clipboard-target=\"#block-168e0575b693934779f47f30a8b4b729_code_0_content\" data-clipboard-label=\"Copiar para a \u00e1rea de transfer\u00eancia\" data-clipboard-success-label=\"Copiado!\" data-clipboard-error-label=\"N\u00e3o foi poss\u00edvel copiar\" data-tooltip=\"Copiar para a \u00e1rea de transfer\u00eancia\" data-tooltip-placement=\"left\" role=\"tooltip\" aria-label=\"Copiar para a \u00e1rea de transfer\u00eancia\">\r\n                                    <svg class=\"code-snippet__copy-icon code-snippet__copy-icon--default\" width=\"24\" height=\"24\" aria-hidden=\"true\" data-url=\"https:\/\/sinch.com\/wp-content\/plugins\/sinch-core\/assets\/icons\/sinch\/file-stack.svg\"><\/svg>\r\n                                    <svg class=\"code-snippet__copy-icon code-snippet__copy-icon--success\" width=\"24\" height=\"24\" aria-hidden=\"true\" data-url=\"https:\/\/sinch.com\/wp-content\/plugins\/sinch-core\/assets\/icons\/sinch\/badge-check.svg\"><\/svg>\r\n                                <\/button>\r\n                            <\/div>\r\n                                                        <pre class=\"w-100 h-100 m-0 line-numbers language-shell\" tabindex=\"0\">\r\n                                <code id=\"block-168e0575b693934779f47f30a8b4b729_code_0_content\" class=\"language-shell\">\r\n\r\n                                    curl --silent --show-error --fail-with-body \\\r\n  &quot;https:\/\/us.conversation.api.sinch.com\/v1\/projects\/$SINCH_PROJECT_ID\/messages:send&quot; \\\r\n  --header &quot;Authorization: Bearer $SINCH_ACCESS_TOKEN&quot; \\\r\n  --header &quot;Content-Type: application\/json&quot; \\\r\n  --data &#039;{\r\n    &quot;app_id&quot;: &quot;YOUR_APP_ID&quot;,\r\n    &quot;recipient&quot;: {\r\n      &quot;identified_by&quot;: {\r\n        &quot;channel_identities&quot;: [{ &quot;channel&quot;: &quot;SMS&quot;, &quot;identity&quot;: &quot;+15551234567&quot; }]\r\n      }\r\n    },\r\n    &quot;message&quot;: { &quot;text_message&quot;: { &quot;text&quot;: &quot;Your order has shipped&quot; } },\r\n    &quot;channel_properties&quot;: { &quot;SMS_SENDER&quot;: &quot;+12025550123&quot; },\r\n    &quot;message_metadata&quot;: &quot;order-1042&quot;\r\n  }&#039;\r\n                                <\/code>\r\n                            <\/pre>\r\n                        <\/div>\r\n                    <\/div>\r\n                                    <\/div>\r\n    <\/div>\r\n    <div data-content-type=\"longform\" class=\"code-snippet longform-spacings rounded-lg overflow-hidden shadow \" data-count=\"1\">\r\n        <ul class=\"nav nav-buttons code-snippet__tabs longform-except position-relative d-flex gap-2 flex-wrap p-3\" role=\"tablist\">\r\n\r\n                            \r\n                    \r\n                        <li class=\"nav-item\" role=\"presentation\">\r\n                            <button class=\"nav-link active\" data-bs-toggle=\"tab\" data-bs-target=\"#block-618e419951a6fe39dc894d10f2669850_code_0\" type=\"button\" role=\"tab\" aria-controls=\"block-618e419951a6fe39dc894d10f2669850_code_0\" aria-selected=\"true\">\r\n                                Shell                            <\/button>\r\n                        <\/li>\r\n\r\n                    \r\n                            \r\n        <\/ul>\r\n        <div class=\"code-snippet__tab-content tab-content\">\r\n\r\n                            \r\n                    <div class=\"tab-pane show active\" id=\"block-618e419951a6fe39dc894d10f2669850_code_0\" role=\"tabpanel\" aria-labelledby=\"block-618e419951a6fe39dc894d10f2669850_code_0\">\r\n                        <div class=\"code-snippet__code-wrapper\">\r\n                            <div class=\"nav nav-buttons code-snippet__copy-wrapper\">\r\n                                <button type=\"button\" class=\"nav-link code-snippet__copy\" data-clipboard-target=\"#block-618e419951a6fe39dc894d10f2669850_code_0_content\" data-clipboard-label=\"Copiar para a \u00e1rea de transfer\u00eancia\" data-clipboard-success-label=\"Copiado!\" data-clipboard-error-label=\"N\u00e3o foi poss\u00edvel copiar\" data-tooltip=\"Copiar para a \u00e1rea de transfer\u00eancia\" data-tooltip-placement=\"left\" role=\"tooltip\" aria-label=\"Copiar para a \u00e1rea de transfer\u00eancia\">\r\n                                    <svg class=\"code-snippet__copy-icon code-snippet__copy-icon--default\" width=\"24\" height=\"24\" aria-hidden=\"true\" data-url=\"https:\/\/sinch.com\/wp-content\/plugins\/sinch-core\/assets\/icons\/sinch\/file-stack.svg\"><\/svg>\r\n                                    <svg class=\"code-snippet__copy-icon code-snippet__copy-icon--success\" width=\"24\" height=\"24\" aria-hidden=\"true\" data-url=\"https:\/\/sinch.com\/wp-content\/plugins\/sinch-core\/assets\/icons\/sinch\/badge-check.svg\"><\/svg>\r\n                                <\/button>\r\n                            <\/div>\r\n                                                        <pre class=\"w-100 h-100 m-0 line-numbers language-shell\" tabindex=\"0\">\r\n                                <code id=\"block-618e419951a6fe39dc894d10f2669850_code_0_content\" class=\"language-shell\">\r\n\r\n                                    {&quot;message_id&quot;:&quot;01M613S632MAAMWRVFEHPQ4YMA&quot;,&quot;accepted_time&quot;:&quot;2026-10-28T11:19:31.682Z&quot;}\r\n                                <\/code>\r\n                            <\/pre>\r\n                        <\/div>\r\n                    <\/div>\r\n                                    <\/div>\r\n    <\/div>\r\n\n<p class=\"wp-block-paragraph\">Four things changed. <code>from<\/code> became the <code>SMS_SENDER<\/code> channel property. <code>to<\/code> became a single <code>recipient<\/code>, with the channel named next to the number. <code>client_reference<\/code> became <code>message_metadata<\/code>, which comes back in the Delivery Report. <code>delivery_report<\/code> is gone from the request: Delivery Reports come from a webhook on the app, covered below.<\/p>\n\n<p class=\"wp-block-paragraph\">The response changed, too. The SMS API returns a batch with an <code>id<\/code>. The Conversation API returns a <code>message_id<\/code> for the one message, and that&#8217;s the ID Delivery Reports refer to.<\/p>\n\n<p class=\"wp-block-paragraph\">In Node.js, the change is in the client options and the method. Before, with the SMS API:<\/p>\n    <div data-content-type=\"longform\" class=\"code-snippet longform-spacings rounded-lg overflow-hidden shadow \" data-count=\"1\">\r\n        <ul class=\"nav nav-buttons code-snippet__tabs longform-except position-relative d-flex gap-2 flex-wrap p-3\" role=\"tablist\">\r\n\r\n                            \r\n                    \r\n                        <li class=\"nav-item\" role=\"presentation\">\r\n                            <button class=\"nav-link active\" data-bs-toggle=\"tab\" data-bs-target=\"#block-04e7edbe43c5b9c60b48b89544427b67_code_0\" type=\"button\" role=\"tab\" aria-controls=\"block-04e7edbe43c5b9c60b48b89544427b67_code_0\" aria-selected=\"true\">\r\n                                Javascript                            <\/button>\r\n                        <\/li>\r\n\r\n                    \r\n                            \r\n        <\/ul>\r\n        <div class=\"code-snippet__tab-content tab-content\">\r\n\r\n                            \r\n                    <div class=\"tab-pane show active\" id=\"block-04e7edbe43c5b9c60b48b89544427b67_code_0\" role=\"tabpanel\" aria-labelledby=\"block-04e7edbe43c5b9c60b48b89544427b67_code_0\">\r\n                        <div class=\"code-snippet__code-wrapper\">\r\n                            <div class=\"nav nav-buttons code-snippet__copy-wrapper\">\r\n                                <button type=\"button\" class=\"nav-link code-snippet__copy\" data-clipboard-target=\"#block-04e7edbe43c5b9c60b48b89544427b67_code_0_content\" data-clipboard-label=\"Copiar para a \u00e1rea de transfer\u00eancia\" data-clipboard-success-label=\"Copiado!\" data-clipboard-error-label=\"N\u00e3o foi poss\u00edvel copiar\" data-tooltip=\"Copiar para a \u00e1rea de transfer\u00eancia\" data-tooltip-placement=\"left\" role=\"tooltip\" aria-label=\"Copiar para a \u00e1rea de transfer\u00eancia\">\r\n                                    <svg class=\"code-snippet__copy-icon code-snippet__copy-icon--default\" width=\"24\" height=\"24\" aria-hidden=\"true\" data-url=\"https:\/\/sinch.com\/wp-content\/plugins\/sinch-core\/assets\/icons\/sinch\/file-stack.svg\"><\/svg>\r\n                                    <svg class=\"code-snippet__copy-icon code-snippet__copy-icon--success\" width=\"24\" height=\"24\" aria-hidden=\"true\" data-url=\"https:\/\/sinch.com\/wp-content\/plugins\/sinch-core\/assets\/icons\/sinch\/badge-check.svg\"><\/svg>\r\n                                <\/button>\r\n                            <\/div>\r\n                                                        <pre class=\"w-100 h-100 m-0 line-numbers language-Javascript\" tabindex=\"0\">\r\n                                <code id=\"block-04e7edbe43c5b9c60b48b89544427b67_code_0_content\" class=\"language-Javascript\">\r\n\r\n                                    import { SinchClient } from &quot;@sinch\/sdk-core&quot;;\r\n\r\n\/\/ Before: the standalone SMS API, authenticated with a service plan ID and API token.\r\nconst sinchClient = new SinchClient({\r\n  servicePlanId: process.env.SINCH_SERVICE_PLAN_ID ?? &quot;&quot;,\r\n  apiToken: process.env.SINCH_API_TOKEN ?? &quot;&quot;,\r\n  smsRegion: &quot;us&quot;,\r\n});\r\n\r\nconst batch = await sinchClient.sms.batches.sendTextMessage({\r\n  sendSMSRequestBody: {\r\n    from: &quot;+12025550123&quot;,\r\n    to: [&quot;+15551234567&quot;],\r\n    body: &quot;Your order has shipped&quot;,\r\n    delivery_report: &quot;per_recipient&quot;,\r\n    client_reference: &quot;order-1042&quot;,\r\n  },\r\n});\r\n\r\nconsole.log(`Sent batch ${batch.id}`);\r\n                                <\/code>\r\n                            <\/pre>\r\n                        <\/div>\r\n                    <\/div>\r\n                                    <\/div>\r\n    <\/div>\r\n\n<p class=\"wp-block-paragraph\">After, with the Conversation API:<\/p>\n    <div data-content-type=\"longform\" class=\"code-snippet longform-spacings rounded-lg overflow-hidden shadow \" data-count=\"1\">\r\n        <ul class=\"nav nav-buttons code-snippet__tabs longform-except position-relative d-flex gap-2 flex-wrap p-3\" role=\"tablist\">\r\n\r\n                            \r\n                    \r\n                        <li class=\"nav-item\" role=\"presentation\">\r\n                            <button class=\"nav-link active\" data-bs-toggle=\"tab\" data-bs-target=\"#block-220a645fc91225ef50fe2f29de64e9fa_code_0\" type=\"button\" role=\"tab\" aria-controls=\"block-220a645fc91225ef50fe2f29de64e9fa_code_0\" aria-selected=\"true\">\r\n                                Javascript                            <\/button>\r\n                        <\/li>\r\n\r\n                    \r\n                            \r\n        <\/ul>\r\n        <div class=\"code-snippet__tab-content tab-content\">\r\n\r\n                            \r\n                    <div class=\"tab-pane show active\" id=\"block-220a645fc91225ef50fe2f29de64e9fa_code_0\" role=\"tabpanel\" aria-labelledby=\"block-220a645fc91225ef50fe2f29de64e9fa_code_0\">\r\n                        <div class=\"code-snippet__code-wrapper\">\r\n                            <div class=\"nav nav-buttons code-snippet__copy-wrapper\">\r\n                                <button type=\"button\" class=\"nav-link code-snippet__copy\" data-clipboard-target=\"#block-220a645fc91225ef50fe2f29de64e9fa_code_0_content\" data-clipboard-label=\"Copiar para a \u00e1rea de transfer\u00eancia\" data-clipboard-success-label=\"Copiado!\" data-clipboard-error-label=\"N\u00e3o foi poss\u00edvel copiar\" data-tooltip=\"Copiar para a \u00e1rea de transfer\u00eancia\" data-tooltip-placement=\"left\" role=\"tooltip\" aria-label=\"Copiar para a \u00e1rea de transfer\u00eancia\">\r\n                                    <svg class=\"code-snippet__copy-icon code-snippet__copy-icon--default\" width=\"24\" height=\"24\" aria-hidden=\"true\" data-url=\"https:\/\/sinch.com\/wp-content\/plugins\/sinch-core\/assets\/icons\/sinch\/file-stack.svg\"><\/svg>\r\n                                    <svg class=\"code-snippet__copy-icon code-snippet__copy-icon--success\" width=\"24\" height=\"24\" aria-hidden=\"true\" data-url=\"https:\/\/sinch.com\/wp-content\/plugins\/sinch-core\/assets\/icons\/sinch\/badge-check.svg\"><\/svg>\r\n                                <\/button>\r\n                            <\/div>\r\n                                                        <pre class=\"w-100 h-100 m-0 line-numbers language-Javascript\" tabindex=\"0\">\r\n                                <code id=\"block-220a645fc91225ef50fe2f29de64e9fa_code_0_content\" class=\"language-Javascript\">\r\n\r\n                                    import { SinchClient } from &quot;@sinch\/sdk-core&quot;;\r\n\r\n\/\/ After: the Conversation API, authenticated with a project ID and access key.\r\nconst sinchClient = new SinchClient({\r\n  projectId: process.env.SINCH_PROJECT_ID ?? &quot;&quot;,\r\n  keyId: process.env.SINCH_KEY_ID ?? &quot;&quot;,\r\n  keySecret: process.env.SINCH_KEY_SECRET ?? &quot;&quot;,\r\n  conversationRegion: &quot;us&quot;,\r\n});\r\n\r\nconst response = await sinchClient.conversation.messages.sendTextMessage({\r\n  sendMessageRequestBody: {\r\n    app_id: process.env.SINCH_APP_ID ?? &quot;&quot;,\r\n    recipient: {\r\n      identified_by: {\r\n        channel_identities: [{ channel: &quot;SMS&quot;, identity: &quot;+15551234567&quot; }],\r\n      },\r\n    },\r\n    message: { text_message: { text: &quot;Your order has shipped&quot; } },\r\n    channel_properties: { SMS_SENDER: &quot;+12025550123&quot; },\r\n    message_metadata: &quot;order-1042&quot;,\r\n  },\r\n});\r\n\r\nconsole.log(`Sent message ${response.message_id}`);\r\n                                <\/code>\r\n                            <\/pre>\r\n                        <\/div>\r\n                    <\/div>\r\n                                    <\/div>\r\n    <\/div>\r\n\n<p class=\"wp-block-paragraph\">Both use <code>@sinch\/sdk-core<\/code>, so you can run them side by side in one codebase while you move flows over. The examples skip input validation to keep the comparison readable. The <a href=\"https:\/\/sinch.com\/pt\/blog\/enviar-sms-conversation-api-curl-nodejs-python\/\">send SMS post<\/a> has the full version with environment checks and number validation.<\/p>\n\n<h2 class=\"wp-block-heading\">Field by field<\/h2>\n\n<p class=\"wp-block-paragraph\">The fields most SMS API integrations use, and where they go:<\/p>\n\n<figure tabindex=\"0\" class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>SMS API field<\/th><th>Conversation API<\/th><\/tr><\/thead><tbody><tr><td><code>from<\/code><\/td><td><code>channel_properties.SMS_SENDER<\/code>, or the service plan&#8217;s default originator<\/td><\/tr><tr><td><code>to<\/code> (array)<\/td><td><code>recipient<\/code> (one per request), or the Batch API for many recipients<\/td><\/tr><tr><td><code>body<\/code><\/td><td><code>message.text_message.text<\/code><\/td><\/tr><tr><td><code>client_reference<\/code><\/td><td><code>message_metadata<\/code>, returned in Delivery Reports. <code>correlation_id<\/code> also reaches inbound replies<\/td><\/tr><tr><td><code>delivery_report<\/code><\/td><td>A <code>MESSAGE_DELIVERY<\/code> webhook on the app<\/td><\/tr><tr><td><code>callback_url<\/code><\/td><td><code>callback_url<\/code> on the request. The Python SDK calls it <code>event_destination_target<\/code><\/td><\/tr><tr><td><code>parameters<\/code><\/td><td>Batch API <code>recipient_and_params[].parameters<\/code><\/td><\/tr><tr><td><code>send_at<\/code><\/td><td>Batch API <code>send_after<\/code>, up to seven days ahead<\/td><\/tr><tr><td><code>flash_message<\/code><\/td><td><code>channel_properties.SMS_FLASH_MESSAGE: \"true\"<\/code><\/td><\/tr><tr><td><code>max_number_of_message_parts<\/code><\/td><td><code>channel_properties.SMS_MAX_NUMBER_OF_MESSAGE_PARTS<\/code><\/td><\/tr><tr><td>Batch <code>id<\/code><\/td><td><code>message_id<\/code> per message, or <code>batch_id<\/code> from the Batch API<\/td><\/tr><\/tbody><\/table><\/figure>\n\n<p class=\"wp-block-paragraph\">Channel property values are strings, so <code>SMS_FLASH_MESSAGE<\/code> takes <code>\"true\"<\/code>, not <code>true<\/code>. If you send binary SMS with <code>type: mt_binary<\/code> and a UDH, check the <a href=\"https:\/\/developers.sinch.com\/docs\/conversation\/channel-support\/sms\/properties\">SMS channel properties<\/a> for your use case before you move that flow.<\/p>\n\n<h2 class=\"wp-block-heading\">Send to many recipients<\/h2>\n\n<p class=\"wp-block-paragraph\">The SMS API takes up to 1,000 numbers in <code>to<\/code> and fills in <code>parameters<\/code> per recipient. On the Conversation API, <code>messages:send<\/code> takes one recipient. For a handful of messages, loop over your recipients and send one request each. For a real list, use the <a href=\"https:\/\/developers.sinch.com\/docs\/conversation\/api-reference\/batch-api\">Conversation Batch API<\/a>: One message, up to 1,000 recipients, each with its own parameters.<\/p>\n    <div data-content-type=\"longform\" class=\"code-snippet longform-spacings rounded-lg overflow-hidden shadow \" data-count=\"1\">\r\n        <ul class=\"nav nav-buttons code-snippet__tabs longform-except position-relative d-flex gap-2 flex-wrap p-3\" role=\"tablist\">\r\n\r\n                            \r\n                    \r\n                        <li class=\"nav-item\" role=\"presentation\">\r\n                            <button class=\"nav-link active\" data-bs-toggle=\"tab\" data-bs-target=\"#block-408a9e8d12992fe49b825298cde00aa4_code_0\" type=\"button\" role=\"tab\" aria-controls=\"block-408a9e8d12992fe49b825298cde00aa4_code_0\" aria-selected=\"true\">\r\n                                Shell                            <\/button>\r\n                        <\/li>\r\n\r\n                    \r\n                            \r\n        <\/ul>\r\n        <div class=\"code-snippet__tab-content tab-content\">\r\n\r\n                            \r\n                    <div class=\"tab-pane show active\" id=\"block-408a9e8d12992fe49b825298cde00aa4_code_0\" role=\"tabpanel\" aria-labelledby=\"block-408a9e8d12992fe49b825298cde00aa4_code_0\">\r\n                        <div class=\"code-snippet__code-wrapper\">\r\n                            <div class=\"nav nav-buttons code-snippet__copy-wrapper\">\r\n                                <button type=\"button\" class=\"nav-link code-snippet__copy\" data-clipboard-target=\"#block-408a9e8d12992fe49b825298cde00aa4_code_0_content\" data-clipboard-label=\"Copiar para a \u00e1rea de transfer\u00eancia\" data-clipboard-success-label=\"Copiado!\" data-clipboard-error-label=\"N\u00e3o foi poss\u00edvel copiar\" data-tooltip=\"Copiar para a \u00e1rea de transfer\u00eancia\" data-tooltip-placement=\"left\" role=\"tooltip\" aria-label=\"Copiar para a \u00e1rea de transfer\u00eancia\">\r\n                                    <svg class=\"code-snippet__copy-icon code-snippet__copy-icon--default\" width=\"24\" height=\"24\" aria-hidden=\"true\" data-url=\"https:\/\/sinch.com\/wp-content\/plugins\/sinch-core\/assets\/icons\/sinch\/file-stack.svg\"><\/svg>\r\n                                    <svg class=\"code-snippet__copy-icon code-snippet__copy-icon--success\" width=\"24\" height=\"24\" aria-hidden=\"true\" data-url=\"https:\/\/sinch.com\/wp-content\/plugins\/sinch-core\/assets\/icons\/sinch\/badge-check.svg\"><\/svg>\r\n                                <\/button>\r\n                            <\/div>\r\n                                                        <pre class=\"w-100 h-100 m-0 line-numbers language-shell\" tabindex=\"0\">\r\n                                <code id=\"block-408a9e8d12992fe49b825298cde00aa4_code_0_content\" class=\"language-shell\">\r\n\r\n                                    #!\/usr\/bin\/env bash\r\n# Send one templated SMS to several recipients with the Conversation Batch API.\r\n# Requires SINCH_ACCESS_TOKEN from https:\/\/auth.sinch.com\/oauth2\/token.\r\nset -euo pipefail\r\n\r\n: &quot;${SINCH_ACCESS_TOKEN:?Set SINCH_ACCESS_TOKEN}&quot;\r\n: &quot;${SINCH_PROJECT_ID:?Set SINCH_PROJECT_ID}&quot;\r\n: &quot;${SINCH_APP_ID:?Set SINCH_APP_ID}&quot;\r\n: &quot;${SINCH_SMS_SENDER:?Set SINCH_SMS_SENDER}&quot;\r\nregion=&quot;${SINCH_REGION:-us}&quot;\r\n\r\nbody=$(jq -n \\\r\n  --arg app_id &quot;$SINCH_APP_ID&quot; \\\r\n  --arg sender &quot;$SINCH_SMS_SENDER&quot; \\\r\n  &#039;{\r\n    app_id: $app_id,\r\n    message: { text_message: { text: &quot;Hi ${name}, your order has shipped&quot; } },\r\n    channel_properties: { SMS_SENDER: $sender },\r\n    recipient_and_params: [\r\n      {\r\n        recipient: { identified_by: { channel_identities: [{ channel: &quot;SMS&quot;, identity: &quot;+15551234567&quot; }] } },\r\n        parameters: { name: &quot;Ana&quot; }\r\n      },\r\n      {\r\n        recipient: { identified_by: { channel_identities: [{ channel: &quot;SMS&quot;, identity: &quot;+15557654321&quot; }] } },\r\n        parameters: { name: &quot;Sam&quot; }\r\n      }\r\n    ]\r\n  }&#039;)\r\n\r\ncurl --silent --show-error --fail-with-body \\\r\n  &quot;https:\/\/$region.conversationbatch.api.sinch.com\/v1\/projects\/$SINCH_PROJECT_ID\/messages&quot; \\\r\n  --header &quot;Authorization: Bearer $SINCH_ACCESS_TOKEN&quot; \\\r\n  --header &quot;Content-Type: application\/json&quot; \\\r\n  --data &quot;$body&quot;\r\necho\r\n                                <\/code>\r\n                            <\/pre>\r\n                        <\/div>\r\n                    <\/div>\r\n                                    <\/div>\r\n    <\/div>\r\n    <div data-content-type=\"longform\" class=\"code-snippet longform-spacings rounded-lg overflow-hidden shadow \" data-count=\"1\">\r\n        <ul class=\"nav nav-buttons code-snippet__tabs longform-except position-relative d-flex gap-2 flex-wrap p-3\" role=\"tablist\">\r\n\r\n                            \r\n                    \r\n                        <li class=\"nav-item\" role=\"presentation\">\r\n                            <button class=\"nav-link active\" data-bs-toggle=\"tab\" data-bs-target=\"#block-cde9341de1e67ab82fabc74dbafd9fac_code_0\" type=\"button\" role=\"tab\" aria-controls=\"block-cde9341de1e67ab82fabc74dbafd9fac_code_0\" aria-selected=\"true\">\r\n                                Shell                            <\/button>\r\n                        <\/li>\r\n\r\n                    \r\n                            \r\n        <\/ul>\r\n        <div class=\"code-snippet__tab-content tab-content\">\r\n\r\n                            \r\n                    <div class=\"tab-pane show active\" id=\"block-cde9341de1e67ab82fabc74dbafd9fac_code_0\" role=\"tabpanel\" aria-labelledby=\"block-cde9341de1e67ab82fabc74dbafd9fac_code_0\">\r\n                        <div class=\"code-snippet__code-wrapper\">\r\n                            <div class=\"nav nav-buttons code-snippet__copy-wrapper\">\r\n                                <button type=\"button\" class=\"nav-link code-snippet__copy\" data-clipboard-target=\"#block-cde9341de1e67ab82fabc74dbafd9fac_code_0_content\" data-clipboard-label=\"Copiar para a \u00e1rea de transfer\u00eancia\" data-clipboard-success-label=\"Copiado!\" data-clipboard-error-label=\"N\u00e3o foi poss\u00edvel copiar\" data-tooltip=\"Copiar para a \u00e1rea de transfer\u00eancia\" data-tooltip-placement=\"left\" role=\"tooltip\" aria-label=\"Copiar para a \u00e1rea de transfer\u00eancia\">\r\n                                    <svg class=\"code-snippet__copy-icon code-snippet__copy-icon--default\" width=\"24\" height=\"24\" aria-hidden=\"true\" data-url=\"https:\/\/sinch.com\/wp-content\/plugins\/sinch-core\/assets\/icons\/sinch\/file-stack.svg\"><\/svg>\r\n                                    <svg class=\"code-snippet__copy-icon code-snippet__copy-icon--success\" width=\"24\" height=\"24\" aria-hidden=\"true\" data-url=\"https:\/\/sinch.com\/wp-content\/plugins\/sinch-core\/assets\/icons\/sinch\/badge-check.svg\"><\/svg>\r\n                                <\/button>\r\n                            <\/div>\r\n                                                        <pre class=\"w-100 h-100 m-0 line-numbers language-shell\" tabindex=\"0\">\r\n                                <code id=\"block-cde9341de1e67ab82fabc74dbafd9fac_code_0_content\" class=\"language-shell\">\r\n\r\n                                    {&quot;batch_id&quot;:&quot;01M613S8XFQAP5EAX93J9QHX1W&quot;,&quot;send_after&quot;:&quot;2026-10-28T11:19:34Z&quot;}\r\n                                <\/code>\r\n                            <\/pre>\r\n                        <\/div>\r\n                    <\/div>\r\n                                    <\/div>\r\n    <\/div>\r\n\n<p class=\"wp-block-paragraph\">The placeholder syntax is <code>${name}<\/code>, the same as SMS API parameters. The Batch API has its own host, <code>conversationbatch.api.sinch.com<\/code>. To schedule the batch, add <code>send_after<\/code> with a UTC time up to seven days out. Each recipient&#8217;s message gets its own <code>message_id<\/code> and its own Delivery Report, with the batch ID in the report&#8217;s <code>metadata<\/code>.<\/p>\n\n<p class=\"wp-block-paragraph\">Use the <code>\/v1\/<\/code> path. The <code>v1alpha<\/code> and <code>v1beta<\/code> Batch API endpoints <a href=\"https:\/\/developers.sinch.com\/docs\/conversation\/release-notes\">stop working on December 16, 2026<\/a>, so code written against them has to move to <code>\/v1\/<\/code> as well.<\/p>\n\n<h2 class=\"wp-block-heading\">Delivery Reports<\/h2>\n\n<p class=\"wp-block-paragraph\">On the SMS API, you set <code>delivery_report<\/code> on each batch and get reports at the service plan&#8217;s callback URL. On the Conversation API, reports go to the webhooks on the app, and you choose them by trigger. Add one with <code>MESSAGE_DELIVERY<\/code> for reports and <code>MESSAGE_INBOUND<\/code> for replies:<\/p>\n    <div data-content-type=\"longform\" class=\"code-snippet longform-spacings rounded-lg overflow-hidden shadow \" data-count=\"1\">\r\n        <ul class=\"nav nav-buttons code-snippet__tabs longform-except position-relative d-flex gap-2 flex-wrap p-3\" role=\"tablist\">\r\n\r\n                            \r\n                    \r\n                        <li class=\"nav-item\" role=\"presentation\">\r\n                            <button class=\"nav-link active\" data-bs-toggle=\"tab\" data-bs-target=\"#block-8e50e5ee9ee5f27ee1e4dc8f374d22d0_code_0\" type=\"button\" role=\"tab\" aria-controls=\"block-8e50e5ee9ee5f27ee1e4dc8f374d22d0_code_0\" aria-selected=\"true\">\r\n                                Shell                            <\/button>\r\n                        <\/li>\r\n\r\n                    \r\n                            \r\n        <\/ul>\r\n        <div class=\"code-snippet__tab-content tab-content\">\r\n\r\n                            \r\n                    <div class=\"tab-pane show active\" id=\"block-8e50e5ee9ee5f27ee1e4dc8f374d22d0_code_0\" role=\"tabpanel\" aria-labelledby=\"block-8e50e5ee9ee5f27ee1e4dc8f374d22d0_code_0\">\r\n                        <div class=\"code-snippet__code-wrapper\">\r\n                            <div class=\"nav nav-buttons code-snippet__copy-wrapper\">\r\n                                <button type=\"button\" class=\"nav-link code-snippet__copy\" data-clipboard-target=\"#block-8e50e5ee9ee5f27ee1e4dc8f374d22d0_code_0_content\" data-clipboard-label=\"Copiar para a \u00e1rea de transfer\u00eancia\" data-clipboard-success-label=\"Copiado!\" data-clipboard-error-label=\"N\u00e3o foi poss\u00edvel copiar\" data-tooltip=\"Copiar para a \u00e1rea de transfer\u00eancia\" data-tooltip-placement=\"left\" role=\"tooltip\" aria-label=\"Copiar para a \u00e1rea de transfer\u00eancia\">\r\n                                    <svg class=\"code-snippet__copy-icon code-snippet__copy-icon--default\" width=\"24\" height=\"24\" aria-hidden=\"true\" data-url=\"https:\/\/sinch.com\/wp-content\/plugins\/sinch-core\/assets\/icons\/sinch\/file-stack.svg\"><\/svg>\r\n                                    <svg class=\"code-snippet__copy-icon code-snippet__copy-icon--success\" width=\"24\" height=\"24\" aria-hidden=\"true\" data-url=\"https:\/\/sinch.com\/wp-content\/plugins\/sinch-core\/assets\/icons\/sinch\/badge-check.svg\"><\/svg>\r\n                                <\/button>\r\n                            <\/div>\r\n                                                        <pre class=\"w-100 h-100 m-0 line-numbers language-shell\" tabindex=\"0\">\r\n                                <code id=\"block-8e50e5ee9ee5f27ee1e4dc8f374d22d0_code_0_content\" class=\"language-shell\">\r\n\r\n                                    curl --silent --show-error --fail-with-body \\\r\n  &quot;https:\/\/us.conversation.api.sinch.com\/v1\/projects\/$SINCH_PROJECT_ID\/webhooks&quot; \\\r\n  --header &quot;Authorization: Bearer $SINCH_ACCESS_TOKEN&quot; \\\r\n  --header &quot;Content-Type: application\/json&quot; \\\r\n  --data &#039;{\r\n    &quot;app_id&quot;: &quot;YOUR_APP_ID&quot;,\r\n    &quot;target&quot;: &quot;https:\/\/example.com\/sinch\/callbacks&quot;,\r\n    &quot;target_type&quot;: &quot;HTTP&quot;,\r\n    &quot;triggers&quot;: [&quot;MESSAGE_DELIVERY&quot;, &quot;MESSAGE_INBOUND&quot;]\r\n  }&#039;\r\n                                <\/code>\r\n                            <\/pre>\r\n                        <\/div>\r\n                    <\/div>\r\n                                    <\/div>\r\n    <\/div>\r\n\n<p class=\"wp-block-paragraph\">A Delivery Report looks like this:<\/p>\n    <div data-content-type=\"longform\" class=\"code-snippet longform-spacings rounded-lg overflow-hidden shadow \" data-count=\"1\">\r\n        <ul class=\"nav nav-buttons code-snippet__tabs longform-except position-relative d-flex gap-2 flex-wrap p-3\" role=\"tablist\">\r\n\r\n                            \r\n                    \r\n                        <li class=\"nav-item\" role=\"presentation\">\r\n                            <button class=\"nav-link active\" data-bs-toggle=\"tab\" data-bs-target=\"#block-e9d9d537a17a3934174af595bc53e37f_code_0\" type=\"button\" role=\"tab\" aria-controls=\"block-e9d9d537a17a3934174af595bc53e37f_code_0\" aria-selected=\"true\">\r\n                                Javascript                            <\/button>\r\n                        <\/li>\r\n\r\n                    \r\n                            \r\n        <\/ul>\r\n        <div class=\"code-snippet__tab-content tab-content\">\r\n\r\n                            \r\n                    <div class=\"tab-pane show active\" id=\"block-e9d9d537a17a3934174af595bc53e37f_code_0\" role=\"tabpanel\" aria-labelledby=\"block-e9d9d537a17a3934174af595bc53e37f_code_0\">\r\n                        <div class=\"code-snippet__code-wrapper\">\r\n                            <div class=\"nav nav-buttons code-snippet__copy-wrapper\">\r\n                                <button type=\"button\" class=\"nav-link code-snippet__copy\" data-clipboard-target=\"#block-e9d9d537a17a3934174af595bc53e37f_code_0_content\" data-clipboard-label=\"Copiar para a \u00e1rea de transfer\u00eancia\" data-clipboard-success-label=\"Copiado!\" data-clipboard-error-label=\"N\u00e3o foi poss\u00edvel copiar\" data-tooltip=\"Copiar para a \u00e1rea de transfer\u00eancia\" data-tooltip-placement=\"left\" role=\"tooltip\" aria-label=\"Copiar para a \u00e1rea de transfer\u00eancia\">\r\n                                    <svg class=\"code-snippet__copy-icon code-snippet__copy-icon--default\" width=\"24\" height=\"24\" aria-hidden=\"true\" data-url=\"https:\/\/sinch.com\/wp-content\/plugins\/sinch-core\/assets\/icons\/sinch\/file-stack.svg\"><\/svg>\r\n                                    <svg class=\"code-snippet__copy-icon code-snippet__copy-icon--success\" width=\"24\" height=\"24\" aria-hidden=\"true\" data-url=\"https:\/\/sinch.com\/wp-content\/plugins\/sinch-core\/assets\/icons\/sinch\/badge-check.svg\"><\/svg>\r\n                                <\/button>\r\n                            <\/div>\r\n                                                        <pre class=\"w-100 h-100 m-0 line-numbers language-Javascript\" tabindex=\"0\">\r\n                                <code id=\"block-e9d9d537a17a3934174af595bc53e37f_code_0_content\" class=\"language-Javascript\">\r\n\r\n                                    {\r\n  &quot;app_id&quot;: &quot;YOUR_APP_ID&quot;,\r\n  &quot;project_id&quot;: &quot;YOUR_PROJECT_ID&quot;,\r\n  &quot;message_delivery_report&quot;: {\r\n    &quot;message_id&quot;: &quot;01M613S632MAAMWRVFEHPQ4YMA&quot;,\r\n    &quot;conversation_id&quot;: &quot;&quot;,\r\n    &quot;status&quot;: &quot;DELIVERED&quot;,\r\n    &quot;channel_identity&quot;: {\r\n      &quot;channel&quot;: &quot;SMS&quot;,\r\n      &quot;identity&quot;: &quot;46706855785&quot;,\r\n      &quot;app_id&quot;: &quot;&quot;,\r\n      &quot;nrs_data&quot;: { &quot;mcc&quot;: &quot;240&quot;, &quot;mnc&quot;: &quot;07&quot;, &quot;country&quot;: &quot;SE&quot; }\r\n    },\r\n    &quot;contact_id&quot;: &quot;&quot;,\r\n    &quot;metadata&quot;: &quot;order-1042&quot;,\r\n    &quot;processing_mode&quot;: &quot;DISPATCH&quot;\r\n  }\r\n}\r\n                                <\/code>\r\n                            <\/pre>\r\n                        <\/div>\r\n                    <\/div>\r\n                                    <\/div>\r\n    <\/div>\r\n\n<p class=\"wp-block-paragraph\">The status list is shorter than the SMS API&#8217;s. An SMS goes from <code>QUEUED_ON_CHANNEL<\/code> to <code>DELIVERED<\/code> or <code>FAILED<\/code>. A <code>FAILED<\/code> report has a <code>reason<\/code> with a code and description that says why. Your <code>client_reference<\/code> lookup becomes a lookup on <code>metadata<\/code>.<\/p>\n\n<p class=\"wp-block-paragraph\">The phone number in <code>channel_identity.identity<\/code> comes back without the leading <code>+<\/code>, even when you sent to <code>+46706855785<\/code>. The SMS API does the same in its reports, so code that already matches on <code>recipient<\/code> keeps working once it reads from the new field. <code>contact_id<\/code> and <code>conversation_id<\/code> are empty because the app runs in Dispatch mode.<\/p>\n\n<p class=\"wp-block-paragraph\">Sinch retries a webhook that doesn&#8217;t return a <code>2xx<\/code>, so keep the handler idempotent: Use <code>message_id<\/code> and <code>status<\/code> to skip reports you&#8217;ve already processed.<\/p>\n\n<h2 class=\"wp-block-heading\">Inbound messages<\/h2>\n\n<p class=\"wp-block-paragraph\">Replies to your number arrive on the app&#8217;s webhook with the <code>MESSAGE_INBOUND<\/code> trigger. The text is at <code>message.contact_message.text_message.text<\/code> and the sender&#8217;s number is at <code>message.channel_identity.identity<\/code>. If your SMS API code reads <code>body<\/code> and <code>from<\/code> from an inbound callback, those are the two paths to change.<\/p>\n\n<p class=\"wp-block-paragraph\">Once the service plan is linked, its default callback URL points at the Conversation API, and replies to its numbers go to the app&#8217;s Conversation API webhook. They still show up in the SMS API&#8217;s inbound list (<code>GET \/xms\/v1\/{service_plan_id}\/inbounds<\/code>), so code that reads that list keeps working while you move.<\/p>\n\n<h2 class=\"wp-block-heading\">Move one flow at a time<\/h2>\n\n<p class=\"wp-block-paragraph\">A few choices make the move less risky.<\/p>\n\n<h3 class=\"wp-block-heading\">Start with outbound notifications<\/h3>\n\n<p class=\"wp-block-paragraph\">One-way notifications like shipping updates and reminders need the fewest changes: A send and a Delivery Report. Move those first and keep two-way flows on the SMS API until the webhook is in place and tested. Both APIs work against the same service plan while you move.<\/p>\n\n<h3 class=\"wp-block-heading\">Give SMS API sends their own <code>callback_url<\/code> while you move<\/h3>\n\n<p class=\"wp-block-paragraph\">Once the service plan is linked, its default callback URL belongs to the Conversation API. Delivery Reports for messages you still send through the SMS API don&#8217;t reach your app&#8217;s webhook, and the plan has no other callback URL to send them to. Set <code>callback_url<\/code> on each SMS API batch that still needs reports, and they keep arriving at your endpoint in the SMS API format. You can also fetch them with <code>GET \/xms\/v1\/{service_plan_id}\/batches\/{batch_id}\/delivery_report<\/code>.<\/p>\n\n<h3 class=\"wp-block-heading\">Keep <code>client_reference<\/code> values in <code>message_metadata<\/code><\/h3>\n\n<p class=\"wp-block-paragraph\">If your reporting, your database, or a support tool keys on <code>client_reference<\/code>, put the same value in <code>message_metadata<\/code>. Reports from both APIs then map to the same records during the move, and nothing downstream has to know which API sent the message.<\/p>\n\n<h3 class=\"wp-block-heading\">Send to phone numbers with <code>identified_by<\/code><\/h3>\n\n<p class=\"wp-block-paragraph\">New Conversation API apps run in <strong>Dispatch<\/strong> mode, which doesn&#8217;t store contacts. That matches how the SMS API works: You send to a number and get a report for that number. <code>identified_by<\/code> with the phone number works in either mode, so you don&#8217;t have to change your data model to move.<\/p>\n\n<h2 class=\"wp-block-heading\">Troubleshooting<\/h2>\n\n<ul class=\"wp-block-list\">\n<li><strong><code>404<\/code> from the Conversation API.<\/strong> The region in the URL doesn&#8217;t match the app&#8217;s region. The app is reachable only in the region you created it in.<\/li>\n<\/ul>\n\n<ul class=\"wp-block-list\">\n<li><strong>The SMS channel reports errors.<\/strong> The app and the service plan have to be in the same region. If they differ, create the app again in the service plan&#8217;s region and set up the SMS channel there.<\/li>\n<\/ul>\n\n<ul class=\"wp-block-list\">\n<li><strong>Callbacks stopped arriving at your old endpoint.<\/strong> Linking removed the plan&#8217;s callback URLs. For inbound messages and Conversation API sends, check that the app has a webhook with the <code>MESSAGE_DELIVERY<\/code> and <code>MESSAGE_INBOUND<\/code> triggers and that it returns a <code>2xx<\/code>. For batches you still send through the SMS API, set <code>callback_url<\/code> on the batch, as described in <a href=\"#move-one-flow-at-a-time\">Move one flow at a time<\/a>. To see what the plan points at, open <strong>SMS<\/strong>, <strong>Service APIs<\/strong>, select the plan, and look under <strong>Callback URLs<\/strong>.<\/li>\n<\/ul>\n\n<ul class=\"wp-block-list\">\n<li><strong><code>contact_id<\/code> sends fail.<\/strong> The app is in Dispatch mode, which doesn&#8217;t store contacts. Send with <code>identified_by<\/code> and the phone number instead.<\/li>\n<\/ul>\n\n<ul class=\"wp-block-list\">\n<li><strong><code>400<\/code> from the Batch API about parameters.<\/strong> A placeholder in the message has no value for one of the recipients. Every <code>${name}<\/code> in the text needs a matching key in each recipient&#8217;s <code>parameters<\/code>.<\/li>\n<\/ul>\n\n<h2 class=\"wp-block-heading\">Next steps<\/h2>\n\n<p class=\"wp-block-paragraph\">With the app in place, you can add RCS or WhatsApp to the same app, give the recipient an identity for each channel in <code>channel_identities<\/code>, list the channels in <code>channel_priority_order<\/code>, and fall back to SMS for recipients who don&#8217;t have them. The <a href=\"https:\/\/developers.sinch.com\/docs\/conversation\/keyconcepts\">key concepts page<\/a> explains how fallback works.<\/p>\n\n<h2 class=\"wp-block-heading\">Additional resources<\/h2>\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/developers.sinch.com\/docs\/conversation\/getting-started\">Conversation API getting started<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/developers.sinch.com\/docs\/conversation\/channel-support\/sms\/set-up\">SMS channel set-up<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/developers.sinch.com\/docs\/conversation\/channel-support\/sms\/properties\">SMS channel properties<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/developers.sinch.com\/docs\/conversation\/api-reference\/batch-api\">Conversation Batch API<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/developers.sinch.com\/docs\/conversation\/callbacks\">Conversation API callbacks<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/developers.sinch.com\/docs\/conversation\/processing-modes\">Processing modes<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/sinch.com\/pt\/blog\/enviar-sms-conversation-api-curl-nodejs-python\/\">Send SMS with the Sinch Conversation API in curl, Node.js, and Python<\/a><\/li>\n<\/ul>\n","protected":false},"author":93,"featured_media":214372,"menu_order":0,"template":"","meta":{"_acf_changed":false,"footnotes":""},"tags":[],"blog_category":[309],"class_list":["post-214402","blog","type-blog","status-publish","has-post-thumbnail","hentry","blog_category-desenvolvedores"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Migrar da API de SMS (XMS) da Sinch para a Conversation API<\/title>\n<meta name=\"description\" content=\"Mapeie lotes da API de SMS (XMS) da Sinch, relat\u00f3rios de entrega e mensagens de entrada para a Conversation API, com solicita\u00e7\u00f5es de antes e depois em curl e Node.js.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/sinch.com\/pt\/blog\/migrar-da-api-de-sms-xms-para-a-conversation-api\/\" \/>\n<meta property=\"og:locale\" content=\"pt_BR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Migrar da API de SMS (XMS) da Sinch para a Conversation API\" \/>\n<meta property=\"og:description\" content=\"Mapeie lotes da API de SMS (XMS) da Sinch, relat\u00f3rios de entrega e mensagens de entrada para a Conversation API, com solicita\u00e7\u00f5es de antes e depois em curl e Node.js.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/sinch.com\/pt\/blog\/migrar-da-api-de-sms-xms-para-a-conversation-api\/\" \/>\n<meta property=\"og:site_name\" content=\"Sinch\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/wearesinch\/\" \/>\n<meta property=\"article:modified_time\" content=\"2026-11-17T11:02:29+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/sinch.com\/wp-content\/uploads\/2026\/10\/SI-Blog-Developers-Migrate-from-sms-xms-api-to-conversation-api-Header.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1296\" \/>\n\t<meta property=\"og:image:height\" content=\"788\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:site\" content=\"@WeAreSinch\" \/>\n<meta name=\"twitter:label1\" content=\"Est. tempo de leitura\" \/>\n\t<meta name=\"twitter:data1\" content=\"8 minutos\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"BlogPosting\",\"@id\":\"https:\\\/\\\/sinch.com\\\/pt\\\/blog\\\/migrar-da-api-de-sms-xms-para-a-conversation-api\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/sinch.com\\\/pt\\\/blog\\\/migrar-da-api-de-sms-xms-para-a-conversation-api\\\/\"},\"author\":{\"name\":\"Gunnar Grosch\",\"@id\":\"https:\\\/\\\/sinch.com\\\/pt\\\/#\\\/schema\\\/person\\\/3b682e886348fa7d4c60becc1a8eb6c5\"},\"headline\":\"Migrar da API de SMS da Sinch para a Conversation API\",\"datePublished\":\"2026-10-29T16:18:15+00:00\",\"dateModified\":\"2026-11-17T11:02:29+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/sinch.com\\\/pt\\\/blog\\\/migrar-da-api-de-sms-xms-para-a-conversation-api\\\/\"},\"wordCount\":1669,\"publisher\":{\"@id\":\"https:\\\/\\\/sinch.com\\\/pt\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/sinch.com\\\/pt\\\/blog\\\/migrar-da-api-de-sms-xms-para-a-conversation-api\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/sinch.com\\\/wp-content\\\/uploads\\\/2026\\\/10\\\/SI-Blog-Developers-Migrate-from-sms-xms-api-to-conversation-api-Header.png\",\"inLanguage\":\"pt-BR\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/sinch.com\\\/pt\\\/blog\\\/migrar-da-api-de-sms-xms-para-a-conversation-api\\\/\",\"url\":\"https:\\\/\\\/sinch.com\\\/pt\\\/blog\\\/migrar-da-api-de-sms-xms-para-a-conversation-api\\\/\",\"name\":\"Migrar da API de SMS (XMS) da Sinch para a Conversation API\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/sinch.com\\\/pt\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/sinch.com\\\/pt\\\/blog\\\/migrar-da-api-de-sms-xms-para-a-conversation-api\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/sinch.com\\\/pt\\\/blog\\\/migrar-da-api-de-sms-xms-para-a-conversation-api\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/sinch.com\\\/wp-content\\\/uploads\\\/2026\\\/10\\\/SI-Blog-Developers-Migrate-from-sms-xms-api-to-conversation-api-Header.png\",\"datePublished\":\"2026-10-29T16:18:15+00:00\",\"dateModified\":\"2026-11-17T11:02:29+00:00\",\"description\":\"Mapeie lotes da API de SMS (XMS) da Sinch, relat\u00f3rios de entrega e mensagens de entrada para a Conversation API, com solicita\u00e7\u00f5es de antes e depois em curl e Node.js.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/sinch.com\\\/pt\\\/blog\\\/migrar-da-api-de-sms-xms-para-a-conversation-api\\\/#breadcrumb\"},\"inLanguage\":\"pt-BR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/sinch.com\\\/pt\\\/blog\\\/migrar-da-api-de-sms-xms-para-a-conversation-api\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"pt-BR\",\"@id\":\"https:\\\/\\\/sinch.com\\\/pt\\\/blog\\\/migrar-da-api-de-sms-xms-para-a-conversation-api\\\/#primaryimage\",\"url\":\"https:\\\/\\\/sinch.com\\\/wp-content\\\/uploads\\\/2026\\\/10\\\/SI-Blog-Developers-Migrate-from-sms-xms-api-to-conversation-api-Header.png\",\"contentUrl\":\"https:\\\/\\\/sinch.com\\\/wp-content\\\/uploads\\\/2026\\\/10\\\/SI-Blog-Developers-Migrate-from-sms-xms-api-to-conversation-api-Header.png\",\"width\":1296,\"height\":788,\"caption\":\"A split-flap departure board routing from the SMS API batches endpoint to the Conversation API messages:send endpoint\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/sinch.com\\\/pt\\\/blog\\\/migrar-da-api-de-sms-xms-para-a-conversation-api\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/sinch.com\\\/pt\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Blog\",\"item\":\"https:\\\/\\\/sinch.com\\\/pt\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Migrar da API de SMS da Sinch para a Conversation API\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/sinch.com\\\/pt\\\/#website\",\"url\":\"https:\\\/\\\/sinch.com\\\/pt\\\/\",\"name\":\"Sinch\",\"description\":\"Envio de mensagens SMS, Voz, E-mail, V\u00eddeo & APIs de verifica\u00e7\u00e3o | Sinch\",\"publisher\":{\"@id\":\"https:\\\/\\\/sinch.com\\\/pt\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/sinch.com\\\/pt\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"pt-BR\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/sinch.com\\\/pt\\\/#organization\",\"name\":\"Sinch\",\"url\":\"https:\\\/\\\/sinch.com\\\/pt\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"pt-BR\",\"@id\":\"https:\\\/\\\/sinch.com\\\/pt\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/sinch.com\\\/wp-content\\\/uploads\\\/2024\\\/09\\\/Thumbnail-Logo-Honey.png\",\"contentUrl\":\"https:\\\/\\\/sinch.com\\\/wp-content\\\/uploads\\\/2024\\\/09\\\/Thumbnail-Logo-Honey.png\",\"width\":800,\"height\":496,\"caption\":\"Sinch\"},\"image\":{\"@id\":\"https:\\\/\\\/sinch.com\\\/pt\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/wearesinch\\\/\",\"https:\\\/\\\/x.com\\\/WeAreSinch\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/sinch\",\"https:\\\/\\\/www.youtube.com\\\/channel\\\/UCZZ2u_B2afTxA0v-xcgfsaw\",\"https:\\\/\\\/www.instagram.com\\\/wearesinch\\\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/sinch.com\\\/pt\\\/#\\\/schema\\\/person\\\/3b682e886348fa7d4c60becc1a8eb6c5\",\"name\":\"Gunnar Grosch\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"pt-BR\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/8f177695c01082754db3f0858d534fdaceedba31f74932d7de39991e5e9d7e8d?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/8f177695c01082754db3f0858d534fdaceedba31f74932d7de39991e5e9d7e8d?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/8f177695c01082754db3f0858d534fdaceedba31f74932d7de39991e5e9d7e8d?s=96&d=mm&r=g\",\"caption\":\"Gunnar Grosch\"},\"description\":\"Gunnar Grosch is a Principal Developer Advocate at Sinch and an engineer with over 25 years of experience building software, scaling developer communities, and making complex technology accessible. He shares code, insights, and lessons through conference talks, blog posts, and open source.\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Migrar da API de SMS (XMS) da Sinch para a Conversation API","description":"Mapeie lotes da API de SMS (XMS) da Sinch, relat\u00f3rios de entrega e mensagens de entrada para a Conversation API, com solicita\u00e7\u00f5es de antes e depois em curl e Node.js.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/sinch.com\/pt\/blog\/migrar-da-api-de-sms-xms-para-a-conversation-api\/","og_locale":"pt_BR","og_type":"article","og_title":"Migrar da API de SMS (XMS) da Sinch para a Conversation API","og_description":"Mapeie lotes da API de SMS (XMS) da Sinch, relat\u00f3rios de entrega e mensagens de entrada para a Conversation API, com solicita\u00e7\u00f5es de antes e depois em curl e Node.js.","og_url":"https:\/\/sinch.com\/pt\/blog\/migrar-da-api-de-sms-xms-para-a-conversation-api\/","og_site_name":"Sinch","article_publisher":"https:\/\/www.facebook.com\/wearesinch\/","article_modified_time":"2026-11-17T11:02:29+00:00","og_image":[{"width":1296,"height":788,"url":"https:\/\/sinch.com\/wp-content\/uploads\/2026\/10\/SI-Blog-Developers-Migrate-from-sms-xms-api-to-conversation-api-Header.png","type":"image\/png"}],"twitter_card":"summary_large_image","twitter_site":"@WeAreSinch","twitter_misc":{"Est. tempo de leitura":"8 minutos"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"BlogPosting","@id":"https:\/\/sinch.com\/pt\/blog\/migrar-da-api-de-sms-xms-para-a-conversation-api\/#article","isPartOf":{"@id":"https:\/\/sinch.com\/pt\/blog\/migrar-da-api-de-sms-xms-para-a-conversation-api\/"},"author":{"name":"Gunnar Grosch","@id":"https:\/\/sinch.com\/pt\/#\/schema\/person\/3b682e886348fa7d4c60becc1a8eb6c5"},"headline":"Migrar da API de SMS da Sinch para a Conversation API","datePublished":"2026-10-29T16:18:15+00:00","dateModified":"2026-11-17T11:02:29+00:00","mainEntityOfPage":{"@id":"https:\/\/sinch.com\/pt\/blog\/migrar-da-api-de-sms-xms-para-a-conversation-api\/"},"wordCount":1669,"publisher":{"@id":"https:\/\/sinch.com\/pt\/#organization"},"image":{"@id":"https:\/\/sinch.com\/pt\/blog\/migrar-da-api-de-sms-xms-para-a-conversation-api\/#primaryimage"},"thumbnailUrl":"https:\/\/sinch.com\/wp-content\/uploads\/2026\/10\/SI-Blog-Developers-Migrate-from-sms-xms-api-to-conversation-api-Header.png","inLanguage":"pt-BR"},{"@type":"WebPage","@id":"https:\/\/sinch.com\/pt\/blog\/migrar-da-api-de-sms-xms-para-a-conversation-api\/","url":"https:\/\/sinch.com\/pt\/blog\/migrar-da-api-de-sms-xms-para-a-conversation-api\/","name":"Migrar da API de SMS (XMS) da Sinch para a Conversation API","isPartOf":{"@id":"https:\/\/sinch.com\/pt\/#website"},"primaryImageOfPage":{"@id":"https:\/\/sinch.com\/pt\/blog\/migrar-da-api-de-sms-xms-para-a-conversation-api\/#primaryimage"},"image":{"@id":"https:\/\/sinch.com\/pt\/blog\/migrar-da-api-de-sms-xms-para-a-conversation-api\/#primaryimage"},"thumbnailUrl":"https:\/\/sinch.com\/wp-content\/uploads\/2026\/10\/SI-Blog-Developers-Migrate-from-sms-xms-api-to-conversation-api-Header.png","datePublished":"2026-10-29T16:18:15+00:00","dateModified":"2026-11-17T11:02:29+00:00","description":"Mapeie lotes da API de SMS (XMS) da Sinch, relat\u00f3rios de entrega e mensagens de entrada para a Conversation API, com solicita\u00e7\u00f5es de antes e depois em curl e Node.js.","breadcrumb":{"@id":"https:\/\/sinch.com\/pt\/blog\/migrar-da-api-de-sms-xms-para-a-conversation-api\/#breadcrumb"},"inLanguage":"pt-BR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/sinch.com\/pt\/blog\/migrar-da-api-de-sms-xms-para-a-conversation-api\/"]}]},{"@type":"ImageObject","inLanguage":"pt-BR","@id":"https:\/\/sinch.com\/pt\/blog\/migrar-da-api-de-sms-xms-para-a-conversation-api\/#primaryimage","url":"https:\/\/sinch.com\/wp-content\/uploads\/2026\/10\/SI-Blog-Developers-Migrate-from-sms-xms-api-to-conversation-api-Header.png","contentUrl":"https:\/\/sinch.com\/wp-content\/uploads\/2026\/10\/SI-Blog-Developers-Migrate-from-sms-xms-api-to-conversation-api-Header.png","width":1296,"height":788,"caption":"A split-flap departure board routing from the SMS API batches endpoint to the Conversation API messages:send endpoint"},{"@type":"BreadcrumbList","@id":"https:\/\/sinch.com\/pt\/blog\/migrar-da-api-de-sms-xms-para-a-conversation-api\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/sinch.com\/pt\/"},{"@type":"ListItem","position":2,"name":"Blog","item":"https:\/\/sinch.com\/pt\/blog\/"},{"@type":"ListItem","position":3,"name":"Migrar da API de SMS da Sinch para a Conversation API"}]},{"@type":"WebSite","@id":"https:\/\/sinch.com\/pt\/#website","url":"https:\/\/sinch.com\/pt\/","name":"Sinch","description":"Envio de mensagens SMS, Voz, E-mail, V\u00eddeo & APIs de verifica\u00e7\u00e3o | Sinch","publisher":{"@id":"https:\/\/sinch.com\/pt\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/sinch.com\/pt\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"pt-BR"},{"@type":"Organization","@id":"https:\/\/sinch.com\/pt\/#organization","name":"Sinch","url":"https:\/\/sinch.com\/pt\/","logo":{"@type":"ImageObject","inLanguage":"pt-BR","@id":"https:\/\/sinch.com\/pt\/#\/schema\/logo\/image\/","url":"https:\/\/sinch.com\/wp-content\/uploads\/2024\/09\/Thumbnail-Logo-Honey.png","contentUrl":"https:\/\/sinch.com\/wp-content\/uploads\/2024\/09\/Thumbnail-Logo-Honey.png","width":800,"height":496,"caption":"Sinch"},"image":{"@id":"https:\/\/sinch.com\/pt\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/wearesinch\/","https:\/\/x.com\/WeAreSinch","https:\/\/www.linkedin.com\/company\/sinch","https:\/\/www.youtube.com\/channel\/UCZZ2u_B2afTxA0v-xcgfsaw","https:\/\/www.instagram.com\/wearesinch\/"]},{"@type":"Person","@id":"https:\/\/sinch.com\/pt\/#\/schema\/person\/3b682e886348fa7d4c60becc1a8eb6c5","name":"Gunnar Grosch","image":{"@type":"ImageObject","inLanguage":"pt-BR","@id":"https:\/\/secure.gravatar.com\/avatar\/8f177695c01082754db3f0858d534fdaceedba31f74932d7de39991e5e9d7e8d?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/8f177695c01082754db3f0858d534fdaceedba31f74932d7de39991e5e9d7e8d?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/8f177695c01082754db3f0858d534fdaceedba31f74932d7de39991e5e9d7e8d?s=96&d=mm&r=g","caption":"Gunnar Grosch"},"description":"Gunnar Grosch is a Principal Developer Advocate at Sinch and an engineer with over 25 years of experience building software, scaling developer communities, and making complex technology accessible. He shares code, insights, and lessons through conference talks, blog posts, and open source."}]}},"_links":{"self":[{"href":"https:\/\/sinch.com\/pt\/wp-json\/wp\/v2\/blog\/214402","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sinch.com\/pt\/wp-json\/wp\/v2\/blog"}],"about":[{"href":"https:\/\/sinch.com\/pt\/wp-json\/wp\/v2\/types\/blog"}],"author":[{"embeddable":true,"href":"https:\/\/sinch.com\/pt\/wp-json\/wp\/v2\/users\/93"}],"version-history":[{"count":3,"href":"https:\/\/sinch.com\/pt\/wp-json\/wp\/v2\/blog\/214402\/revisions"}],"predecessor-version":[{"id":216417,"href":"https:\/\/sinch.com\/pt\/wp-json\/wp\/v2\/blog\/214402\/revisions\/216417"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/sinch.com\/pt\/wp-json\/wp\/v2\/media\/214372"}],"wp:attachment":[{"href":"https:\/\/sinch.com\/pt\/wp-json\/wp\/v2\/media?parent=214402"}],"wp:term":[{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sinch.com\/pt\/wp-json\/wp\/v2\/tags?post=214402"},{"taxonomy":"blog_category","embeddable":true,"href":"https:\/\/sinch.com\/pt\/wp-json\/wp\/v2\/blog_category?post=214402"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}