[{"data":1,"prerenderedAt":2625},["ShallowReactive",2],{"docs-nav":3,"content:\u002Fapi\u002Fsms":78},[4,18,29,35,46,63,66,69,72,75],{"path":5,"title":6,"navTitle":6,"order":7,"subnav":8},"\u002Fapi\u002Fapi-tokens","API tokens",3,[9,12,15],{"title":10,"anchor":11},"Create an API key","create-an-api-key",{"title":13,"anchor":14},"List API keys","list-api-keys",{"title":16,"anchor":17},"Revoke an API key","revoke-an-api-key",{"path":19,"title":20,"navTitle":20,"order":21,"subnav":22},"\u002Fapi\u002Fbalances","Balances",4,[23,26],{"title":24,"anchor":25},"The balance object","the-balance-object",{"title":27,"anchor":28},"List balances","list-balances",{"path":30,"title":31,"navTitle":32,"order":33,"subnav":34},"\u002Fapi","API overview","Overview",1,null,{"path":36,"title":37,"navTitle":37,"order":38,"subnav":39},"\u002Fapi\u002Fsender-ids","Sender IDs",5,[40,43],{"title":41,"anchor":42},"The sender identity object","the-sender-identity-object",{"title":44,"anchor":45},"List sender IDs","list-sender-ids",{"path":47,"title":48,"navTitle":48,"order":49,"subnav":50},"\u002Fapi\u002Fsms","SMS",2,[51,54,57,60],{"title":52,"anchor":53},"The message object","the-message-object",{"title":55,"anchor":56},"Send an SMS","send-an-sms",{"title":58,"anchor":59},"Retrieve an SMS","retrieve-an-sms",{"title":61,"anchor":62},"Send bulk SMS","send-bulk-sms",{"path":64,"title":65,"navTitle":65,"order":49,"subnav":34},"\u002Fguides\u002Fauthentication","Authentication",{"path":67,"title":68,"navTitle":68,"order":7,"subnav":34},"\u002Fguides\u002Fbulk-sms","Bulk SMS",{"path":70,"title":71,"navTitle":71,"order":38,"subnav":34},"\u002Fguides\u002Fmcp","AI agents (MCP)",{"path":73,"title":74,"navTitle":74,"order":33,"subnav":34},"\u002Fguides\u002Fquickstart","Quickstart",{"path":76,"title":77,"navTitle":77,"order":21,"subnav":34},"\u002Fguides\u002Fwebhooks","Webhooks",{"id":79,"path":47,"title":48,"description":80,"navTitle":48,"order":49,"wide":81,"body":82,"seo":2621,"stem":2622,"extension":2623,"meta":2624,"navigation":81},"content\u002Fapi\u002Fsms.md","The message resource — every attribute of the message object, then the three operations on it, send, retrieve, and bulk send.",true,{"type":83,"value":84,"toc":2615},"minimark",[85,99,119,122,502,504,509,1237,1239,1243,1824,1826,1829,2611],[86,87,88,89,93,94,98],"p",{},"A ",[90,91,92],"strong",{},"message"," is one SMS to one recipient. Sending creates it, the carrier's confirmation\ncompletes it, and its ",[95,96,97],"code",{},"id"," reads it back at any point in between — a bulk send is simply many\nmessages created in one call, each with its own id and its own delivery signal.",[86,100,101,102,108,109,112,113,118],{},"One convention to hold onto throughout: ",[90,103,104,107],{},[95,105,106],{},"POST \u002Fapi\u002Fv1\u002Fsms"," returns the message object\nbare",", while every other operation wraps its payload in the ",[95,110,111],{},"{ status, message, data }","\nenvelope — see ",[114,115,117],"a",{"href":116},"\u002Fapi#two-response-conventions","two response conventions",".",[120,121,52],"h2",{"id":53},[123,124,125,319],"row",{},[126,127,128,142,147],"column",{},[86,129,130,131,134,135,138,139,118],{},"The same object comes back from a send and from a retrieve; only the envelope around it\ndiffers. Fresh from a send it reads ",[95,132,133],{},"status: enqueued",", ",[95,136,137],{},"delivered_at: null","; the carrier's\nconfirmation later fills ",[95,140,141],{},"delivered_at",[143,144,146],"h3",{"id":145},"attributes","Attributes",[148,149,150,163,170,175,196,212,239,246,256,263,293,299],"properties",{},[151,152,154],"property",{"name":97,"type":153},"string (uuid)",[86,155,156,157,118],{},"Message id. Pass it to ",[114,158,160],{"href":159},"#retrieve-an-sms",[95,161,162],{},"GET \u002Fapi\u002Fv1\u002Fsms\u002F{id}",[151,164,167],{"name":165,"type":166},"to","string",[86,168,169],{},"Recipient MSISDN in international format.",[151,171,172],{"name":92,"type":166},[86,173,174],{},"The body as sent.",[151,176,178],{"name":177,"type":166},"sender_id",[86,179,180,181,185,186,189,190,193,194,118],{},"Display name of the approved sender the recipient saw. Note the name: the field you ",[182,183,184],"em",{},"send","\nis ",[95,187,188],{},"from","; the field that comes ",[182,191,192],{},"back"," is ",[95,195,177],{},[151,197,199],{"name":198,"type":166},"operator",[86,200,201,202,134,205,208,209,118],{},"Carrier derived from the recipient MSISDN: ",[95,203,204],{},"econet",[95,206,207],{},"netone",", or ",[95,210,211],{},"telecel",[151,213,216],{"name":214,"type":215},"charge","string | integer",[86,217,218,219,222,223,226,227,230,231,234,235,118],{},"Amount billed, in ten-thousandths of ",[95,220,221],{},"charge_currency"," (",[95,224,225],{},"10000"," == 1.00, so ",[95,228,229],{},"450"," == 0.045).\n",[90,232,233],{},"Serialised as a string on the single send and retrieve, as an integer on bulk items"," —\nsame unit, different JSON type. See ",[114,236,238],{"href":237},"\u002Fapi#billing-and-segments","billing and segments",[151,240,241],{"name":221,"type":166},[86,242,243,244,118],{},"Currency of ",[95,245,214],{},[151,247,249],{"name":248,"type":166},"operator_response",[86,250,251,252,255],{},"Raw response from the carrier. Empty until dispatched; ",[95,253,254],{},"DELIVRD"," is a typical confirmed\nvalue.",[151,257,260],{"name":258,"type":259},"received_at","string (date-time)",[86,261,262],{},"When Sendai accepted the message.",[151,264,266],{"name":265,"type":166},"status",[86,267,268,269,272,273,272,276,272,279,208,282,285,286,288,289,292],{},"The send pipeline: ",[95,270,271],{},"created"," → ",[95,274,275],{},"enqueued",[95,277,278],{},"processing",[95,280,281],{},"success",[95,283,284],{},"failed",". ",[95,287,281],{},"\nmeans the carrier accepted or confirmed it — it is ",[90,290,291],{},"not"," the delivery signal; there is no\nseparate delivery-status field.",[151,294,296],{"name":295,"type":259},"created_at",[86,297,298],{},"When the message row was created.",[151,300,302],{"name":141,"type":301},"string (date-time) | null",[86,303,304,307,308,311,312,315,316,318],{},[95,305,306],{},"null"," until the carrier confirms handset delivery, then an RFC 3339 timestamp. ",[90,309,310],{},"This is\nthe only delivery signal."," A message can sit at ",[95,313,314],{},"status: success"," with ",[95,317,137],{},"\nfor a while — normal, not a failure.",[126,320,322],{":sticky":321},"true",[323,324,325],"code-group",{"title":52},[326,327,333],"pre",{"className":328,"code":329,"filename":330,"language":331,"meta":332,"style":332},"language-json shiki shiki-themes github-light github-dark","{\n  \"id\": \"0f9c1b3a-6d2e-4a1b-9c3d-7e5f2a8b4c10\",\n  \"to\": \"263771000000\",\n  \"message\": \"Your code is 4821\",\n  \"sender_id\": \"Sendai SMS\",\n  \"operator\": \"econet\",\n  \"charge\": \"450\",\n  \"charge_currency\": \"USD\",\n  \"operator_response\": \"DELIVRD\",\n  \"received_at\": \"2026-07-06T09:12:03Z\",\n  \"status\": \"success\",\n  \"created_at\": \"2026-07-06T09:12:03Z\",\n  \"delivered_at\": \"2026-07-06T09:12:44Z\"\n}\n","Message","json","",[95,334,335,343,359,371,383,395,408,421,434,447,460,473,485,496],{"__ignoreMap":332},[336,337,339],"span",{"class":338,"line":33},"line",[336,340,342],{"class":341},"sVt8B","{\n",[336,344,345,349,352,356],{"class":338,"line":49},[336,346,348],{"class":347},"sj4cs","  \"id\"",[336,350,351],{"class":341},": ",[336,353,355],{"class":354},"sZZnC","\"0f9c1b3a-6d2e-4a1b-9c3d-7e5f2a8b4c10\"",[336,357,358],{"class":341},",\n",[336,360,361,364,366,369],{"class":338,"line":7},[336,362,363],{"class":347},"  \"to\"",[336,365,351],{"class":341},[336,367,368],{"class":354},"\"263771000000\"",[336,370,358],{"class":341},[336,372,373,376,378,381],{"class":338,"line":21},[336,374,375],{"class":347},"  \"message\"",[336,377,351],{"class":341},[336,379,380],{"class":354},"\"Your code is 4821\"",[336,382,358],{"class":341},[336,384,385,388,390,393],{"class":338,"line":38},[336,386,387],{"class":347},"  \"sender_id\"",[336,389,351],{"class":341},[336,391,392],{"class":354},"\"Sendai SMS\"",[336,394,358],{"class":341},[336,396,398,401,403,406],{"class":338,"line":397},6,[336,399,400],{"class":347},"  \"operator\"",[336,402,351],{"class":341},[336,404,405],{"class":354},"\"econet\"",[336,407,358],{"class":341},[336,409,411,414,416,419],{"class":338,"line":410},7,[336,412,413],{"class":347},"  \"charge\"",[336,415,351],{"class":341},[336,417,418],{"class":354},"\"450\"",[336,420,358],{"class":341},[336,422,424,427,429,432],{"class":338,"line":423},8,[336,425,426],{"class":347},"  \"charge_currency\"",[336,428,351],{"class":341},[336,430,431],{"class":354},"\"USD\"",[336,433,358],{"class":341},[336,435,437,440,442,445],{"class":338,"line":436},9,[336,438,439],{"class":347},"  \"operator_response\"",[336,441,351],{"class":341},[336,443,444],{"class":354},"\"DELIVRD\"",[336,446,358],{"class":341},[336,448,450,453,455,458],{"class":338,"line":449},10,[336,451,452],{"class":347},"  \"received_at\"",[336,454,351],{"class":341},[336,456,457],{"class":354},"\"2026-07-06T09:12:03Z\"",[336,459,358],{"class":341},[336,461,463,466,468,471],{"class":338,"line":462},11,[336,464,465],{"class":347},"  \"status\"",[336,467,351],{"class":341},[336,469,470],{"class":354},"\"success\"",[336,472,358],{"class":341},[336,474,476,479,481,483],{"class":338,"line":475},12,[336,477,478],{"class":347},"  \"created_at\"",[336,480,351],{"class":341},[336,482,457],{"class":354},[336,484,358],{"class":341},[336,486,488,491,493],{"class":338,"line":487},13,[336,489,490],{"class":347},"  \"delivered_at\"",[336,492,351],{"class":341},[336,494,495],{"class":354},"\"2026-07-06T09:12:44Z\"\n",[336,497,499],{"class":338,"line":498},14,[336,500,501],{"class":341},"}\n",[120,503,55],{"id":56},[505,506],"endpoint",{"method":507,"path":508},"POST","\u002Fapi\u002Fv1\u002Fsms",[123,510,511,683],{},[126,512,513,531,535,563,567,589,622,630,634],{},[86,514,515,516,519,520,285,523,526,527,530],{},"Sends one message. Sendai validates the sender ID, prices the message per segment, places a\nhold on your prepaid balance, and answers ",[95,517,518],{},"202 Accepted"," — accepted, priced, and queued,\n",[90,521,522],{},"not delivered",[114,524,525],{"href":159},"Retrieve the message"," or register a\n",[114,528,529],{"href":76},"webhook"," for the delivery signal.",[143,532,534],{"id":533},"request-body","Request body",[148,536,537,545,556],{},[151,538,539],{"name":165,"type":166,":required":321},[86,540,541,542,118],{},"Recipient MSISDN in international format, e.g. ",[95,543,544],{},"263771000000",[151,546,547],{"name":188,"type":166,":required":321},[86,548,549,550,552,553,118],{},"An approved sender ID on your account — list yours with\n",[114,551,37],{"href":36},". An unapproved value is rejected with\n",[95,554,555],{},"400 unknown or unapproved sender id",[151,557,558],{"name":92,"type":166,":required":321},[86,559,560,561,118],{},"Message body. Billed per GSM-7\u002FUCS-2 segment — see\n",[114,562,238],{"href":237},[143,564,566],{"id":565},"response","Response",[86,568,569,572,573,577,578,581,582,584,585,588],{},[95,570,571],{},"202"," returns the ",[114,574,576],{"href":575},"#the-message-object","message object"," ",[90,579,580],{},"bare"," — this is the one endpoint\nwith no ",[95,583,111],{}," envelope, so there is no ",[95,586,587],{},"data"," to unwrap. Two fields to\nnote:",[590,591,592,603],"ul",{},[593,594,595,596,600,601,118],"li",{},"The sender comes back as ",[90,597,598],{},[95,599,177],{},", not ",[95,602,188],{},[593,604,605,610,611,613,614,616,617,621],{},[90,606,607,609],{},[95,608,214],{}," is a string"," here (",[95,612,418],{}," == 0.045 ",[95,615,221],{},"); the\n",[114,618,620],{"href":619},"#send-bulk-sms","bulk operation"," returns the same value as an integer.",[86,623,624,626,627,629],{},[95,625,133],{}," and ",[95,628,137],{}," are the normal state of a fresh send — delivery\nconfirmation arrives asynchronously.",[143,631,633],{"id":632},"errors","Errors",[635,636,637,650],"table",{},[638,639,640],"thead",{},[641,642,643,647],"tr",{},[644,645,646],"th",{},"Status",[644,648,649],{},"When",[651,652,653,670],"tbody",{},[641,654,655,661],{},[656,657,658],"td",{},[95,659,660],{},"400",[656,662,663,664,666,667,118],{},"Malformed JSON, or a ",[95,665,188],{}," that is not an approved sender ID. Body carries ",[95,668,669],{},"error.type",[641,671,672,677],{},[656,673,674],{},[95,675,676],{},"401",[656,678,679,680,118],{},"Missing, malformed, or revoked API key. Body carries ",[95,681,682],{},"error.code",[126,684,685,1101],{":sticky":321},[323,686,688,767,946],{"title":687,"label":106},"Request",[326,689,694],{"className":690,"code":691,"filename":692,"language":693,"meta":332,"style":332},"language-bash shiki shiki-themes github-light github-dark","curl -X POST https:\u002F\u002Fapi.sendai.co.zw\u002Fapi\u002Fv1\u002Fsms \\\n  -H \"Authorization: Bearer $SENDAI_API_KEY\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n    \"to\": \"263771000000\",\n    \"from\": \"Sendai SMS\",\n    \"message\": \"Your code is 4821\"\n  }'\n","cURL","bash",[95,695,696,714,730,739,747,752,757,762],{"__ignoreMap":332},[336,697,698,702,705,708,711],{"class":338,"line":33},[336,699,701],{"class":700},"sScJk","curl",[336,703,704],{"class":347}," -X",[336,706,707],{"class":354}," POST",[336,709,710],{"class":354}," https:\u002F\u002Fapi.sendai.co.zw\u002Fapi\u002Fv1\u002Fsms",[336,712,713],{"class":347}," \\\n",[336,715,716,719,722,725,728],{"class":338,"line":49},[336,717,718],{"class":347},"  -H",[336,720,721],{"class":354}," \"Authorization: Bearer ",[336,723,724],{"class":341},"$SENDAI_API_KEY",[336,726,727],{"class":354},"\"",[336,729,713],{"class":347},[336,731,732,734,737],{"class":338,"line":7},[336,733,718],{"class":347},[336,735,736],{"class":354}," \"Content-Type: application\u002Fjson\"",[336,738,713],{"class":347},[336,740,741,744],{"class":338,"line":21},[336,742,743],{"class":347},"  -d",[336,745,746],{"class":354}," '{\n",[336,748,749],{"class":338,"line":38},[336,750,751],{"class":354},"    \"to\": \"263771000000\",\n",[336,753,754],{"class":338,"line":397},[336,755,756],{"class":354},"    \"from\": \"Sendai SMS\",\n",[336,758,759],{"class":338,"line":410},[336,760,761],{"class":354},"    \"message\": \"Your code is 4821\"\n",[336,763,764],{"class":338,"line":423},[336,765,766],{"class":354},"  }'\n",[326,768,773],{"className":769,"code":770,"filename":771,"language":772,"meta":332,"style":332},"language-js shiki shiki-themes github-light github-dark","const res = await fetch('https:\u002F\u002Fapi.sendai.co.zw\u002Fapi\u002Fv1\u002Fsms', {\n  method: 'POST',\n  headers: {\n    'Authorization': `Bearer ${process.env.SENDAI_API_KEY}`,\n    'Content-Type': 'application\u002Fjson',\n  },\n  body: JSON.stringify({\n    to: '263771000000',\n    from: 'Sendai SMS',\n    message: 'Your code is 4821',\n  }),\n})\n\nconst sms = await res.json() \u002F\u002F bare message object — no data wrapper\n","Node.js","js",[95,774,775,802,812,817,845,857,862,878,888,898,908,913,918,923],{"__ignoreMap":332},[336,776,777,781,784,787,790,793,796,799],{"class":338,"line":33},[336,778,780],{"class":779},"szBVR","const",[336,782,783],{"class":347}," res",[336,785,786],{"class":779}," =",[336,788,789],{"class":779}," await",[336,791,792],{"class":700}," fetch",[336,794,795],{"class":341},"(",[336,797,798],{"class":354},"'https:\u002F\u002Fapi.sendai.co.zw\u002Fapi\u002Fv1\u002Fsms'",[336,800,801],{"class":341},", {\n",[336,803,804,807,810],{"class":338,"line":49},[336,805,806],{"class":341},"  method: ",[336,808,809],{"class":354},"'POST'",[336,811,358],{"class":341},[336,813,814],{"class":338,"line":7},[336,815,816],{"class":341},"  headers: {\n",[336,818,819,822,824,827,830,832,835,837,840,843],{"class":338,"line":21},[336,820,821],{"class":354},"    'Authorization'",[336,823,351],{"class":341},[336,825,826],{"class":354},"`Bearer ${",[336,828,829],{"class":341},"process",[336,831,118],{"class":354},[336,833,834],{"class":341},"env",[336,836,118],{"class":354},[336,838,839],{"class":347},"SENDAI_API_KEY",[336,841,842],{"class":354},"}`",[336,844,358],{"class":341},[336,846,847,850,852,855],{"class":338,"line":38},[336,848,849],{"class":354},"    'Content-Type'",[336,851,351],{"class":341},[336,853,854],{"class":354},"'application\u002Fjson'",[336,856,358],{"class":341},[336,858,859],{"class":338,"line":397},[336,860,861],{"class":341},"  },\n",[336,863,864,867,870,872,875],{"class":338,"line":410},[336,865,866],{"class":341},"  body: ",[336,868,869],{"class":347},"JSON",[336,871,118],{"class":341},[336,873,874],{"class":700},"stringify",[336,876,877],{"class":341},"({\n",[336,879,880,883,886],{"class":338,"line":423},[336,881,882],{"class":341},"    to: ",[336,884,885],{"class":354},"'263771000000'",[336,887,358],{"class":341},[336,889,890,893,896],{"class":338,"line":436},[336,891,892],{"class":341},"    from: ",[336,894,895],{"class":354},"'Sendai SMS'",[336,897,358],{"class":341},[336,899,900,903,906],{"class":338,"line":449},[336,901,902],{"class":341},"    message: ",[336,904,905],{"class":354},"'Your code is 4821'",[336,907,358],{"class":341},[336,909,910],{"class":338,"line":462},[336,911,912],{"class":341},"  }),\n",[336,914,915],{"class":338,"line":475},[336,916,917],{"class":341},"})\n",[336,919,920],{"class":338,"line":487},[336,921,922],{"emptyLinePlaceholder":81},"\n",[336,924,925,927,930,932,934,937,939,942],{"class":338,"line":498},[336,926,780],{"class":779},[336,928,929],{"class":347}," sms",[336,931,786],{"class":779},[336,933,789],{"class":779},[336,935,936],{"class":341}," res.",[336,938,331],{"class":700},[336,940,941],{"class":341},"() ",[336,943,945],{"class":944},"sJ8bj","\u002F\u002F bare message object — no data wrapper\n",[326,947,952],{"className":948,"code":949,"filename":950,"language":951,"meta":332,"style":332},"language-python shiki shiki-themes github-light github-dark","import os\nimport requests\n\nres = requests.post(\n    \"https:\u002F\u002Fapi.sendai.co.zw\u002Fapi\u002Fv1\u002Fsms\",\n    headers={\"Authorization\": f\"Bearer {os.environ['SENDAI_API_KEY']}\"},\n    json={\n        \"to\": \"263771000000\",\n        \"from\": \"Sendai SMS\",\n        \"message\": \"Your code is 4821\",\n    },\n)\n\nsms = res.json()  # bare message object — no data wrapper\n","Python","python",[95,953,954,962,969,973,984,991,1032,1041,1052,1063,1074,1079,1084,1088],{"__ignoreMap":332},[336,955,956,959],{"class":338,"line":33},[336,957,958],{"class":779},"import",[336,960,961],{"class":341}," os\n",[336,963,964,966],{"class":338,"line":49},[336,965,958],{"class":779},[336,967,968],{"class":341}," requests\n",[336,970,971],{"class":338,"line":7},[336,972,922],{"emptyLinePlaceholder":81},[336,974,975,978,981],{"class":338,"line":21},[336,976,977],{"class":341},"res ",[336,979,980],{"class":779},"=",[336,982,983],{"class":341}," requests.post(\n",[336,985,986,989],{"class":338,"line":38},[336,987,988],{"class":354},"    \"https:\u002F\u002Fapi.sendai.co.zw\u002Fapi\u002Fv1\u002Fsms\"",[336,990,358],{"class":341},[336,992,993,997,999,1002,1005,1007,1010,1013,1015,1018,1021,1024,1027,1029],{"class":338,"line":397},[336,994,996],{"class":995},"s4XuR","    headers",[336,998,980],{"class":779},[336,1000,1001],{"class":341},"{",[336,1003,1004],{"class":354},"\"Authorization\"",[336,1006,351],{"class":341},[336,1008,1009],{"class":779},"f",[336,1011,1012],{"class":354},"\"Bearer ",[336,1014,1001],{"class":347},[336,1016,1017],{"class":341},"os.environ[",[336,1019,1020],{"class":354},"'SENDAI_API_KEY'",[336,1022,1023],{"class":341},"]",[336,1025,1026],{"class":347},"}",[336,1028,727],{"class":354},[336,1030,1031],{"class":341},"},\n",[336,1033,1034,1037,1039],{"class":338,"line":410},[336,1035,1036],{"class":995},"    json",[336,1038,980],{"class":779},[336,1040,342],{"class":341},[336,1042,1043,1046,1048,1050],{"class":338,"line":423},[336,1044,1045],{"class":354},"        \"to\"",[336,1047,351],{"class":341},[336,1049,368],{"class":354},[336,1051,358],{"class":341},[336,1053,1054,1057,1059,1061],{"class":338,"line":436},[336,1055,1056],{"class":354},"        \"from\"",[336,1058,351],{"class":341},[336,1060,392],{"class":354},[336,1062,358],{"class":341},[336,1064,1065,1068,1070,1072],{"class":338,"line":449},[336,1066,1067],{"class":354},"        \"message\"",[336,1069,351],{"class":341},[336,1071,380],{"class":354},[336,1073,358],{"class":341},[336,1075,1076],{"class":338,"line":462},[336,1077,1078],{"class":341},"    },\n",[336,1080,1081],{"class":338,"line":475},[336,1082,1083],{"class":341},")\n",[336,1085,1086],{"class":338,"line":487},[336,1087,922],{"emptyLinePlaceholder":81},[336,1089,1090,1093,1095,1098],{"class":338,"line":498},[336,1091,1092],{"class":341},"sms ",[336,1094,980],{"class":779},[336,1096,1097],{"class":341}," res.json()  ",[336,1099,1100],{"class":944},"# bare message object — no data wrapper\n",[323,1102,1103],{"title":566},[326,1104,1106],{"className":328,"code":1105,"filename":518,"language":331,"meta":332,"style":332},"{\n  \"id\": \"0f9c1b3a-6d2e-4a1b-9c3d-7e5f2a8b4c10\",\n  \"to\": \"263771000000\",\n  \"message\": \"Your code is 4821\",\n  \"sender_id\": \"Sendai SMS\",\n  \"operator\": \"econet\",\n  \"charge\": \"450\",\n  \"charge_currency\": \"USD\",\n  \"operator_response\": \"\",\n  \"received_at\": \"2026-07-06T09:12:03Z\",\n  \"status\": \"enqueued\",\n  \"created_at\": \"2026-07-06T09:12:03Z\",\n  \"delivered_at\": null\n}\n",[95,1107,1108,1112,1122,1132,1142,1152,1162,1172,1182,1193,1203,1214,1224,1233],{"__ignoreMap":332},[336,1109,1110],{"class":338,"line":33},[336,1111,342],{"class":341},[336,1113,1114,1116,1118,1120],{"class":338,"line":49},[336,1115,348],{"class":347},[336,1117,351],{"class":341},[336,1119,355],{"class":354},[336,1121,358],{"class":341},[336,1123,1124,1126,1128,1130],{"class":338,"line":7},[336,1125,363],{"class":347},[336,1127,351],{"class":341},[336,1129,368],{"class":354},[336,1131,358],{"class":341},[336,1133,1134,1136,1138,1140],{"class":338,"line":21},[336,1135,375],{"class":347},[336,1137,351],{"class":341},[336,1139,380],{"class":354},[336,1141,358],{"class":341},[336,1143,1144,1146,1148,1150],{"class":338,"line":38},[336,1145,387],{"class":347},[336,1147,351],{"class":341},[336,1149,392],{"class":354},[336,1151,358],{"class":341},[336,1153,1154,1156,1158,1160],{"class":338,"line":397},[336,1155,400],{"class":347},[336,1157,351],{"class":341},[336,1159,405],{"class":354},[336,1161,358],{"class":341},[336,1163,1164,1166,1168,1170],{"class":338,"line":410},[336,1165,413],{"class":347},[336,1167,351],{"class":341},[336,1169,418],{"class":354},[336,1171,358],{"class":341},[336,1173,1174,1176,1178,1180],{"class":338,"line":423},[336,1175,426],{"class":347},[336,1177,351],{"class":341},[336,1179,431],{"class":354},[336,1181,358],{"class":341},[336,1183,1184,1186,1188,1191],{"class":338,"line":436},[336,1185,439],{"class":347},[336,1187,351],{"class":341},[336,1189,1190],{"class":354},"\"\"",[336,1192,358],{"class":341},[336,1194,1195,1197,1199,1201],{"class":338,"line":449},[336,1196,452],{"class":347},[336,1198,351],{"class":341},[336,1200,457],{"class":354},[336,1202,358],{"class":341},[336,1204,1205,1207,1209,1212],{"class":338,"line":462},[336,1206,465],{"class":347},[336,1208,351],{"class":341},[336,1210,1211],{"class":354},"\"enqueued\"",[336,1213,358],{"class":341},[336,1215,1216,1218,1220,1222],{"class":338,"line":475},[336,1217,478],{"class":347},[336,1219,351],{"class":341},[336,1221,457],{"class":354},[336,1223,358],{"class":341},[336,1225,1226,1228,1230],{"class":338,"line":487},[336,1227,490],{"class":347},[336,1229,351],{"class":341},[336,1231,1232],{"class":347},"null\n",[336,1234,1235],{"class":338,"line":498},[336,1236,501],{"class":341},[120,1238,58],{"id":59},[505,1240],{"method":1241,"path":1242},"GET","\u002Fapi\u002Fv1\u002Fsms\u002F{id}",[123,1244,1245,1383],{},[126,1246,1247,1259,1263,1278,1281,1284,1319,1330,1335,1338],{},[86,1248,1249,1250,1252,1253,1256,1257,118],{},"Reads back one message by the ",[95,1251,97],{}," from the send response. Unlike the send operation, this\nresponse ",[90,1254,1255],{},"is"," enveloped — the message sits under ",[95,1258,587],{},[143,1260,1262],{"id":1261},"path-parameters","Path parameters",[148,1264,1265],{},[151,1266,1267],{"name":97,"type":153,":required":321},[86,1268,1269,1270,1273,1274,1277],{},"The message id from the ",[114,1271,184],{"href":1272},"#send-an-sms"," or ",[114,1275,1276],{"href":619},"bulk send"," response.",[143,1279,566],{"id":1280},"response-1",[86,1282,1283],{},"Two fields track the journey, and they are two separate facts:",[590,1285,1286,1305],{},[593,1287,1288,1293,1294,272,1296,272,1298,272,1300,1302,1303,118],{},[90,1289,1290],{},[95,1291,1292],{},"data.status"," — the send pipeline: ",[95,1295,271],{},[95,1297,275],{},[95,1299,278],{},[95,1301,281],{},",\nor ",[95,1304,284],{},[593,1306,1307,1312,1313,1315,1316],{},[90,1308,1309],{},[95,1310,1311],{},"data.delivered_at"," — ",[95,1314,306],{}," until the carrier confirms delivery, then a timestamp.\n",[90,1317,1318],{},"This is the only delivery signal.",[86,1320,1321,1322,315,1324,1326,1327,1329],{},"A message can sit at ",[95,1323,314],{},[95,1325,137],{}," for a while — the pipeline\nfinished but the carrier has not confirmed yet. That is normal, not a failure. Carrier\nconfirmation takes seconds to hours, so poll on an interval, or let a\n",[114,1328,529],{"href":76}," call you instead.",[86,1331,1332,1334],{},[95,1333,248],{}," is the raw carrier response — empty until dispatched.",[143,1336,633],{"id":1337},"errors-1",[635,1339,1340,1348],{},[638,1341,1342],{},[641,1343,1344,1346],{},[644,1345,646],{},[644,1347,649],{},[651,1349,1350,1363,1373],{},[641,1351,1352,1356],{},[656,1353,1354],{},[95,1355,660],{},[656,1357,1358,1360,1361,118],{},[95,1359,97],{}," is not a valid UUID. Body carries ",[95,1362,669],{},[641,1364,1365,1369],{},[656,1366,1367],{},[95,1368,676],{},[656,1370,679,1371,118],{},[95,1372,682],{},[641,1374,1375,1380],{},[656,1376,1377],{},[95,1378,1379],{},"404",[656,1381,1382],{},"No such message on your account — unknown id, another account's message, or not an SMS.",[126,1384,1385,1640],{":sticky":321},[323,1386,1387,1412,1521],{"title":687,"label":162},[326,1388,1390],{"className":690,"code":1389,"filename":692,"language":693,"meta":332,"style":332},"curl https:\u002F\u002Fapi.sendai.co.zw\u002Fapi\u002Fv1\u002Fsms\u002F0f9c1b3a-6d2e-4a1b-9c3d-7e5f2a8b4c10 \\\n  -H \"Authorization: Bearer $SENDAI_API_KEY\"\n",[95,1391,1392,1401],{"__ignoreMap":332},[336,1393,1394,1396,1399],{"class":338,"line":33},[336,1395,701],{"class":700},[336,1397,1398],{"class":354}," https:\u002F\u002Fapi.sendai.co.zw\u002Fapi\u002Fv1\u002Fsms\u002F0f9c1b3a-6d2e-4a1b-9c3d-7e5f2a8b4c10",[336,1400,713],{"class":347},[336,1402,1403,1405,1407,1409],{"class":338,"line":49},[336,1404,718],{"class":347},[336,1406,721],{"class":354},[336,1408,724],{"class":341},[336,1410,1411],{"class":354},"\"\n",[326,1413,1415],{"className":769,"code":1414,"filename":771,"language":772,"meta":332,"style":332},"const id = '0f9c1b3a-6d2e-4a1b-9c3d-7e5f2a8b4c10'\n\nconst res = await fetch(`https:\u002F\u002Fapi.sendai.co.zw\u002Fapi\u002Fv1\u002Fsms\u002F${id}`, {\n  headers: { 'Authorization': `Bearer ${process.env.SENDAI_API_KEY}` },\n})\n\nconst { data: sms } = await res.json() \u002F\u002F enveloped — the message is under data\n",[95,1416,1417,1429,1433,1456,1483,1487,1491],{"__ignoreMap":332},[336,1418,1419,1421,1424,1426],{"class":338,"line":33},[336,1420,780],{"class":779},[336,1422,1423],{"class":347}," id",[336,1425,786],{"class":779},[336,1427,1428],{"class":354}," '0f9c1b3a-6d2e-4a1b-9c3d-7e5f2a8b4c10'\n",[336,1430,1431],{"class":338,"line":49},[336,1432,922],{"emptyLinePlaceholder":81},[336,1434,1435,1437,1439,1441,1443,1445,1447,1450,1452,1454],{"class":338,"line":7},[336,1436,780],{"class":779},[336,1438,783],{"class":347},[336,1440,786],{"class":779},[336,1442,789],{"class":779},[336,1444,792],{"class":700},[336,1446,795],{"class":341},[336,1448,1449],{"class":354},"`https:\u002F\u002Fapi.sendai.co.zw\u002Fapi\u002Fv1\u002Fsms\u002F${",[336,1451,97],{"class":341},[336,1453,842],{"class":354},[336,1455,801],{"class":341},[336,1457,1458,1461,1464,1466,1468,1470,1472,1474,1476,1478,1480],{"class":338,"line":21},[336,1459,1460],{"class":341},"  headers: { ",[336,1462,1463],{"class":354},"'Authorization'",[336,1465,351],{"class":341},[336,1467,826],{"class":354},[336,1469,829],{"class":341},[336,1471,118],{"class":354},[336,1473,834],{"class":341},[336,1475,118],{"class":354},[336,1477,839],{"class":347},[336,1479,842],{"class":354},[336,1481,1482],{"class":341}," },\n",[336,1484,1485],{"class":338,"line":38},[336,1486,917],{"class":341},[336,1488,1489],{"class":338,"line":397},[336,1490,922],{"emptyLinePlaceholder":81},[336,1492,1493,1495,1498,1500,1502,1505,1508,1510,1512,1514,1516,1518],{"class":338,"line":410},[336,1494,780],{"class":779},[336,1496,1497],{"class":341}," { ",[336,1499,587],{"class":995},[336,1501,351],{"class":341},[336,1503,1504],{"class":347},"sms",[336,1506,1507],{"class":341}," } ",[336,1509,980],{"class":779},[336,1511,789],{"class":779},[336,1513,936],{"class":341},[336,1515,331],{"class":700},[336,1517,941],{"class":341},[336,1519,1520],{"class":944},"\u002F\u002F enveloped — the message is under data\n",[326,1522,1524],{"className":948,"code":1523,"filename":950,"language":951,"meta":332,"style":332},"import os\nimport requests\n\nsms_id = \"0f9c1b3a-6d2e-4a1b-9c3d-7e5f2a8b4c10\"\n\nres = requests.get(\n    f\"https:\u002F\u002Fapi.sendai.co.zw\u002Fapi\u002Fv1\u002Fsms\u002F{sms_id}\",\n    headers={\"Authorization\": f\"Bearer {os.environ['SENDAI_API_KEY']}\"},\n)\n\nsms = res.json()[\"data\"]  # enveloped — the message is under data\n",[95,1525,1526,1532,1538,1542,1552,1556,1565,1584,1614,1618,1622],{"__ignoreMap":332},[336,1527,1528,1530],{"class":338,"line":33},[336,1529,958],{"class":779},[336,1531,961],{"class":341},[336,1533,1534,1536],{"class":338,"line":49},[336,1535,958],{"class":779},[336,1537,968],{"class":341},[336,1539,1540],{"class":338,"line":7},[336,1541,922],{"emptyLinePlaceholder":81},[336,1543,1544,1547,1549],{"class":338,"line":21},[336,1545,1546],{"class":341},"sms_id ",[336,1548,980],{"class":779},[336,1550,1551],{"class":354}," \"0f9c1b3a-6d2e-4a1b-9c3d-7e5f2a8b4c10\"\n",[336,1553,1554],{"class":338,"line":38},[336,1555,922],{"emptyLinePlaceholder":81},[336,1557,1558,1560,1562],{"class":338,"line":397},[336,1559,977],{"class":341},[336,1561,980],{"class":779},[336,1563,1564],{"class":341}," requests.get(\n",[336,1566,1567,1570,1573,1575,1578,1580,1582],{"class":338,"line":410},[336,1568,1569],{"class":779},"    f",[336,1571,1572],{"class":354},"\"https:\u002F\u002Fapi.sendai.co.zw\u002Fapi\u002Fv1\u002Fsms\u002F",[336,1574,1001],{"class":347},[336,1576,1577],{"class":341},"sms_id",[336,1579,1026],{"class":347},[336,1581,727],{"class":354},[336,1583,358],{"class":341},[336,1585,1586,1588,1590,1592,1594,1596,1598,1600,1602,1604,1606,1608,1610,1612],{"class":338,"line":423},[336,1587,996],{"class":995},[336,1589,980],{"class":779},[336,1591,1001],{"class":341},[336,1593,1004],{"class":354},[336,1595,351],{"class":341},[336,1597,1009],{"class":779},[336,1599,1012],{"class":354},[336,1601,1001],{"class":347},[336,1603,1017],{"class":341},[336,1605,1020],{"class":354},[336,1607,1023],{"class":341},[336,1609,1026],{"class":347},[336,1611,727],{"class":354},[336,1613,1031],{"class":341},[336,1615,1616],{"class":338,"line":436},[336,1617,1083],{"class":341},[336,1619,1620],{"class":338,"line":449},[336,1621,922],{"emptyLinePlaceholder":81},[336,1623,1624,1626,1628,1631,1634,1637],{"class":338,"line":462},[336,1625,1092],{"class":341},[336,1627,980],{"class":779},[336,1629,1630],{"class":341}," res.json()[",[336,1632,1633],{"class":354},"\"data\"",[336,1635,1636],{"class":341},"]  ",[336,1638,1639],{"class":944},"# enveloped — the message is under data\n",[323,1641,1642],{"title":566},[326,1643,1646],{"className":328,"code":1644,"filename":1645,"language":331,"meta":332,"style":332},"{\n  \"status\": \"success\",\n  \"message\": \"request successful\",\n  \"data\": {\n    \"id\": \"0f9c1b3a-6d2e-4a1b-9c3d-7e5f2a8b4c10\",\n    \"to\": \"263771000000\",\n    \"message\": \"Your code is 4821\",\n    \"sender_id\": \"Sendai SMS\",\n    \"operator\": \"econet\",\n    \"charge\": \"450\",\n    \"charge_currency\": \"USD\",\n    \"operator_response\": \"DELIVRD\",\n    \"received_at\": \"2026-07-06T09:12:03Z\",\n    \"status\": \"success\",\n    \"created_at\": \"2026-07-06T09:12:03Z\",\n    \"delivered_at\": \"2026-07-06T09:12:44Z\"\n  }\n}\n","200 OK",[95,1647,1648,1652,1662,1673,1681,1692,1703,1714,1725,1736,1747,1758,1769,1780,1791,1803,1813,1819],{"__ignoreMap":332},[336,1649,1650],{"class":338,"line":33},[336,1651,342],{"class":341},[336,1653,1654,1656,1658,1660],{"class":338,"line":49},[336,1655,465],{"class":347},[336,1657,351],{"class":341},[336,1659,470],{"class":354},[336,1661,358],{"class":341},[336,1663,1664,1666,1668,1671],{"class":338,"line":7},[336,1665,375],{"class":347},[336,1667,351],{"class":341},[336,1669,1670],{"class":354},"\"request successful\"",[336,1672,358],{"class":341},[336,1674,1675,1678],{"class":338,"line":21},[336,1676,1677],{"class":347},"  \"data\"",[336,1679,1680],{"class":341},": {\n",[336,1682,1683,1686,1688,1690],{"class":338,"line":38},[336,1684,1685],{"class":347},"    \"id\"",[336,1687,351],{"class":341},[336,1689,355],{"class":354},[336,1691,358],{"class":341},[336,1693,1694,1697,1699,1701],{"class":338,"line":397},[336,1695,1696],{"class":347},"    \"to\"",[336,1698,351],{"class":341},[336,1700,368],{"class":354},[336,1702,358],{"class":341},[336,1704,1705,1708,1710,1712],{"class":338,"line":410},[336,1706,1707],{"class":347},"    \"message\"",[336,1709,351],{"class":341},[336,1711,380],{"class":354},[336,1713,358],{"class":341},[336,1715,1716,1719,1721,1723],{"class":338,"line":423},[336,1717,1718],{"class":347},"    \"sender_id\"",[336,1720,351],{"class":341},[336,1722,392],{"class":354},[336,1724,358],{"class":341},[336,1726,1727,1730,1732,1734],{"class":338,"line":436},[336,1728,1729],{"class":347},"    \"operator\"",[336,1731,351],{"class":341},[336,1733,405],{"class":354},[336,1735,358],{"class":341},[336,1737,1738,1741,1743,1745],{"class":338,"line":449},[336,1739,1740],{"class":347},"    \"charge\"",[336,1742,351],{"class":341},[336,1744,418],{"class":354},[336,1746,358],{"class":341},[336,1748,1749,1752,1754,1756],{"class":338,"line":462},[336,1750,1751],{"class":347},"    \"charge_currency\"",[336,1753,351],{"class":341},[336,1755,431],{"class":354},[336,1757,358],{"class":341},[336,1759,1760,1763,1765,1767],{"class":338,"line":475},[336,1761,1762],{"class":347},"    \"operator_response\"",[336,1764,351],{"class":341},[336,1766,444],{"class":354},[336,1768,358],{"class":341},[336,1770,1771,1774,1776,1778],{"class":338,"line":487},[336,1772,1773],{"class":347},"    \"received_at\"",[336,1775,351],{"class":341},[336,1777,457],{"class":354},[336,1779,358],{"class":341},[336,1781,1782,1785,1787,1789],{"class":338,"line":498},[336,1783,1784],{"class":347},"    \"status\"",[336,1786,351],{"class":341},[336,1788,470],{"class":354},[336,1790,358],{"class":341},[336,1792,1794,1797,1799,1801],{"class":338,"line":1793},15,[336,1795,1796],{"class":347},"    \"created_at\"",[336,1798,351],{"class":341},[336,1800,457],{"class":354},[336,1802,358],{"class":341},[336,1804,1806,1809,1811],{"class":338,"line":1805},16,[336,1807,1808],{"class":347},"    \"delivered_at\"",[336,1810,351],{"class":341},[336,1812,495],{"class":354},[336,1814,1816],{"class":338,"line":1815},17,[336,1817,1818],{"class":341},"  }\n",[336,1820,1822],{"class":338,"line":1821},18,[336,1823,501],{"class":341},[120,1825,61],{"id":62},[505,1827],{"method":507,"path":1828},"\u002Fapi\u002Fv1\u002Fsms\u002Fbulk",[123,1830,1831,1982],{},[126,1832,1833,1849,1852,1882,1885,1899,1919,1922],{},[86,1834,1835,1836,1838,1839,1842,1843,1846,1847,118],{},"Sends the same body to every recipient in ",[95,1837,165],{},", priced as one send. The whole send is\naccepted or rejected together — there is no partial success. Returns one entry per recipient,\n",[90,1840,1841],{},"in request order","; each ",[95,1844,1845],{},"items[].id"," behaves exactly like a single-send id, so you track\neach recipient with ",[114,1848,58],{"href":159},[143,1850,534],{"id":1851},"request-body-1",[148,1853,1854,1860,1867,1872],{},[151,1855,1857],{"name":165,"type":1856,":required":321},"array of strings",[86,1858,1859],{},"Recipient MSISDNs in international format. At least one. A repeated MSISDN is not collapsed —\nthe recipient gets two messages and you are billed for both.",[151,1861,1862],{"name":188,"type":166,":required":321},[86,1863,1864,1865,118],{},"An approved sender ID on your account — list yours with ",[114,1866,37],{"href":36},[151,1868,1869],{"name":92,"type":166,":required":321},[86,1870,1871],{},"Body sent to every recipient. Billed per segment, per recipient.",[151,1873,1876],{"name":1874,"type":1875},"webhook_url","string (url)",[86,1877,1878,1879,1881],{},"Optional callback applied to every message in the send. Must be a valid URL. See\n",[114,1880,77],{"href":76}," for the account-level alternative.",[143,1883,566],{"id":1884},"response-2",[86,1886,1887,1888,1890,1891,1894,1895,1898],{},"This response ",[90,1889,1255],{}," enveloped. ",[95,1892,1893],{},"data.charge"," is the total held for the send and\n",[95,1896,1897],{},"data.items[].charge"," what each recipient cost — operators price independently, so entries\nwithin one send can differ.",[86,1900,1901,1906,1907,1910,1911,1913,1914,600,1917,118],{},[90,1902,1903,1905],{},[95,1904,214],{}," is an integer here",", unlike the string the\n",[114,1908,1909],{"href":1272},"single send"," returns. Both are in ten-thousandths of the currency\n(",[95,1912,229],{}," == 0.045); only the JSON type differs. Note the total's currency arrives as\n",[95,1915,1916],{},"currency",[95,1918,221],{},[143,1920,633],{"id":1921},"errors-2",[635,1923,1924,1932],{},[638,1925,1926],{},[641,1927,1928,1930],{},[644,1929,646],{},[644,1931,649],{},[651,1933,1934,1957,1966],{},[641,1935,1936,1940],{},[656,1937,1938],{},[95,1939,660],{},[656,1941,1942,1943,1945,1946,1273,1948,1950,1951,1953,1954,118],{},"Validation failed — ",[95,1944,165],{}," empty, ",[95,1947,92],{},[95,1949,188],{}," blank, or ",[95,1952,1874],{}," not a URL. Offending fields are listed in ",[95,1955,1956],{},"error.validation_errors",[641,1958,1959,1963],{},[656,1960,1961],{},[95,1962,676],{},[656,1964,1965],{},"Missing, malformed, or revoked API key.",[641,1967,1968,1973],{},[656,1969,1970],{},[95,1971,1972],{},"422",[656,1974,1975,1978,1979,1981],{},[95,1976,1977],{},"insufficient balance"," — your prepaid balance does not cover the send. Nothing is sent. Check ",[114,1980,20],{"href":19}," first.",[126,1983,1984,2366],{":sticky":321},[323,1985,1987,2054,2215],{"title":687,"label":1986},"POST \u002Fapi\u002Fv1\u002Fsms\u002Fbulk",[326,1988,1990],{"className":690,"code":1989,"filename":692,"language":693,"meta":332,"style":332},"curl -X POST https:\u002F\u002Fapi.sendai.co.zw\u002Fapi\u002Fv1\u002Fsms\u002Fbulk \\\n  -H \"Authorization: Bearer $SENDAI_API_KEY\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n    \"to\": [\"263771000000\", \"263772000001\"],\n    \"from\": \"Sendai SMS\",\n    \"message\": \"Polls close at 18:00. Thanks for taking part!\",\n    \"webhook_url\": \"https:\u002F\u002Fexample.com\u002Fwebhooks\u002Fdlr\"\n  }'\n",[95,1991,1992,2005,2017,2025,2031,2036,2040,2045,2050],{"__ignoreMap":332},[336,1993,1994,1996,1998,2000,2003],{"class":338,"line":33},[336,1995,701],{"class":700},[336,1997,704],{"class":347},[336,1999,707],{"class":354},[336,2001,2002],{"class":354}," https:\u002F\u002Fapi.sendai.co.zw\u002Fapi\u002Fv1\u002Fsms\u002Fbulk",[336,2004,713],{"class":347},[336,2006,2007,2009,2011,2013,2015],{"class":338,"line":49},[336,2008,718],{"class":347},[336,2010,721],{"class":354},[336,2012,724],{"class":341},[336,2014,727],{"class":354},[336,2016,713],{"class":347},[336,2018,2019,2021,2023],{"class":338,"line":7},[336,2020,718],{"class":347},[336,2022,736],{"class":354},[336,2024,713],{"class":347},[336,2026,2027,2029],{"class":338,"line":21},[336,2028,743],{"class":347},[336,2030,746],{"class":354},[336,2032,2033],{"class":338,"line":38},[336,2034,2035],{"class":354},"    \"to\": [\"263771000000\", \"263772000001\"],\n",[336,2037,2038],{"class":338,"line":397},[336,2039,756],{"class":354},[336,2041,2042],{"class":338,"line":410},[336,2043,2044],{"class":354},"    \"message\": \"Polls close at 18:00. Thanks for taking part!\",\n",[336,2046,2047],{"class":338,"line":423},[336,2048,2049],{"class":354},"    \"webhook_url\": \"https:\u002F\u002Fexample.com\u002Fwebhooks\u002Fdlr\"\n",[336,2051,2052],{"class":338,"line":436},[336,2053,766],{"class":354},[326,2055,2057],{"className":769,"code":2056,"filename":771,"language":772,"meta":332,"style":332},"const res = await fetch('https:\u002F\u002Fapi.sendai.co.zw\u002Fapi\u002Fv1\u002Fsms\u002Fbulk', {\n  method: 'POST',\n  headers: {\n    'Authorization': `Bearer ${process.env.SENDAI_API_KEY}`,\n    'Content-Type': 'application\u002Fjson',\n  },\n  body: JSON.stringify({\n    to: ['263771000000', '263772000001'],\n    from: 'Sendai SMS',\n    message: 'Polls close at 18:00. Thanks for taking part!',\n    webhook_url: 'https:\u002F\u002Fexample.com\u002Fwebhooks\u002Fdlr',\n  }),\n})\n\nconst { data } = await res.json() \u002F\u002F enveloped — items under data.items\n",[95,2058,2059,2078,2086,2090,2112,2122,2126,2138,2153,2161,2170,2180,2184,2188,2192],{"__ignoreMap":332},[336,2060,2061,2063,2065,2067,2069,2071,2073,2076],{"class":338,"line":33},[336,2062,780],{"class":779},[336,2064,783],{"class":347},[336,2066,786],{"class":779},[336,2068,789],{"class":779},[336,2070,792],{"class":700},[336,2072,795],{"class":341},[336,2074,2075],{"class":354},"'https:\u002F\u002Fapi.sendai.co.zw\u002Fapi\u002Fv1\u002Fsms\u002Fbulk'",[336,2077,801],{"class":341},[336,2079,2080,2082,2084],{"class":338,"line":49},[336,2081,806],{"class":341},[336,2083,809],{"class":354},[336,2085,358],{"class":341},[336,2087,2088],{"class":338,"line":7},[336,2089,816],{"class":341},[336,2091,2092,2094,2096,2098,2100,2102,2104,2106,2108,2110],{"class":338,"line":21},[336,2093,821],{"class":354},[336,2095,351],{"class":341},[336,2097,826],{"class":354},[336,2099,829],{"class":341},[336,2101,118],{"class":354},[336,2103,834],{"class":341},[336,2105,118],{"class":354},[336,2107,839],{"class":347},[336,2109,842],{"class":354},[336,2111,358],{"class":341},[336,2113,2114,2116,2118,2120],{"class":338,"line":38},[336,2115,849],{"class":354},[336,2117,351],{"class":341},[336,2119,854],{"class":354},[336,2121,358],{"class":341},[336,2123,2124],{"class":338,"line":397},[336,2125,861],{"class":341},[336,2127,2128,2130,2132,2134,2136],{"class":338,"line":410},[336,2129,866],{"class":341},[336,2131,869],{"class":347},[336,2133,118],{"class":341},[336,2135,874],{"class":700},[336,2137,877],{"class":341},[336,2139,2140,2143,2145,2147,2150],{"class":338,"line":423},[336,2141,2142],{"class":341},"    to: [",[336,2144,885],{"class":354},[336,2146,134],{"class":341},[336,2148,2149],{"class":354},"'263772000001'",[336,2151,2152],{"class":341},"],\n",[336,2154,2155,2157,2159],{"class":338,"line":436},[336,2156,892],{"class":341},[336,2158,895],{"class":354},[336,2160,358],{"class":341},[336,2162,2163,2165,2168],{"class":338,"line":449},[336,2164,902],{"class":341},[336,2166,2167],{"class":354},"'Polls close at 18:00. Thanks for taking part!'",[336,2169,358],{"class":341},[336,2171,2172,2175,2178],{"class":338,"line":462},[336,2173,2174],{"class":341},"    webhook_url: ",[336,2176,2177],{"class":354},"'https:\u002F\u002Fexample.com\u002Fwebhooks\u002Fdlr'",[336,2179,358],{"class":341},[336,2181,2182],{"class":338,"line":475},[336,2183,912],{"class":341},[336,2185,2186],{"class":338,"line":487},[336,2187,917],{"class":341},[336,2189,2190],{"class":338,"line":498},[336,2191,922],{"emptyLinePlaceholder":81},[336,2193,2194,2196,2198,2200,2202,2204,2206,2208,2210,2212],{"class":338,"line":1793},[336,2195,780],{"class":779},[336,2197,1497],{"class":341},[336,2199,587],{"class":347},[336,2201,1507],{"class":341},[336,2203,980],{"class":779},[336,2205,789],{"class":779},[336,2207,936],{"class":341},[336,2209,331],{"class":700},[336,2211,941],{"class":341},[336,2213,2214],{"class":944},"\u002F\u002F enveloped — items under data.items\n",[326,2216,2218],{"className":948,"code":2217,"filename":950,"language":951,"meta":332,"style":332},"import os\nimport requests\n\nres = requests.post(\n    \"https:\u002F\u002Fapi.sendai.co.zw\u002Fapi\u002Fv1\u002Fsms\u002Fbulk\",\n    headers={\"Authorization\": f\"Bearer {os.environ['SENDAI_API_KEY']}\"},\n    json={\n        \"to\": [\"263771000000\", \"263772000001\"],\n        \"from\": \"Sendai SMS\",\n        \"message\": \"Polls close at 18:00. Thanks for taking part!\",\n        \"webhook_url\": \"https:\u002F\u002Fexample.com\u002Fwebhooks\u002Fdlr\",\n    },\n)\n\ndata = res.json()[\"data\"]  # enveloped — items under data[\"items\"]\n",[95,2219,2220,2226,2232,2236,2244,2251,2281,2289,2305,2315,2326,2338,2342,2346,2350],{"__ignoreMap":332},[336,2221,2222,2224],{"class":338,"line":33},[336,2223,958],{"class":779},[336,2225,961],{"class":341},[336,2227,2228,2230],{"class":338,"line":49},[336,2229,958],{"class":779},[336,2231,968],{"class":341},[336,2233,2234],{"class":338,"line":7},[336,2235,922],{"emptyLinePlaceholder":81},[336,2237,2238,2240,2242],{"class":338,"line":21},[336,2239,977],{"class":341},[336,2241,980],{"class":779},[336,2243,983],{"class":341},[336,2245,2246,2249],{"class":338,"line":38},[336,2247,2248],{"class":354},"    \"https:\u002F\u002Fapi.sendai.co.zw\u002Fapi\u002Fv1\u002Fsms\u002Fbulk\"",[336,2250,358],{"class":341},[336,2252,2253,2255,2257,2259,2261,2263,2265,2267,2269,2271,2273,2275,2277,2279],{"class":338,"line":397},[336,2254,996],{"class":995},[336,2256,980],{"class":779},[336,2258,1001],{"class":341},[336,2260,1004],{"class":354},[336,2262,351],{"class":341},[336,2264,1009],{"class":779},[336,2266,1012],{"class":354},[336,2268,1001],{"class":347},[336,2270,1017],{"class":341},[336,2272,1020],{"class":354},[336,2274,1023],{"class":341},[336,2276,1026],{"class":347},[336,2278,727],{"class":354},[336,2280,1031],{"class":341},[336,2282,2283,2285,2287],{"class":338,"line":410},[336,2284,1036],{"class":995},[336,2286,980],{"class":779},[336,2288,342],{"class":341},[336,2290,2291,2293,2296,2298,2300,2303],{"class":338,"line":423},[336,2292,1045],{"class":354},[336,2294,2295],{"class":341},": [",[336,2297,368],{"class":354},[336,2299,134],{"class":341},[336,2301,2302],{"class":354},"\"263772000001\"",[336,2304,2152],{"class":341},[336,2306,2307,2309,2311,2313],{"class":338,"line":436},[336,2308,1056],{"class":354},[336,2310,351],{"class":341},[336,2312,392],{"class":354},[336,2314,358],{"class":341},[336,2316,2317,2319,2321,2324],{"class":338,"line":449},[336,2318,1067],{"class":354},[336,2320,351],{"class":341},[336,2322,2323],{"class":354},"\"Polls close at 18:00. Thanks for taking part!\"",[336,2325,358],{"class":341},[336,2327,2328,2331,2333,2336],{"class":338,"line":462},[336,2329,2330],{"class":354},"        \"webhook_url\"",[336,2332,351],{"class":341},[336,2334,2335],{"class":354},"\"https:\u002F\u002Fexample.com\u002Fwebhooks\u002Fdlr\"",[336,2337,358],{"class":341},[336,2339,2340],{"class":338,"line":475},[336,2341,1078],{"class":341},[336,2343,2344],{"class":338,"line":487},[336,2345,1083],{"class":341},[336,2347,2348],{"class":338,"line":498},[336,2349,922],{"emptyLinePlaceholder":81},[336,2351,2352,2355,2357,2359,2361,2363],{"class":338,"line":1793},[336,2353,2354],{"class":341},"data ",[336,2356,980],{"class":779},[336,2358,1630],{"class":341},[336,2360,1633],{"class":354},[336,2362,1636],{"class":341},[336,2364,2365],{"class":944},"# enveloped — items under data[\"items\"]\n",[323,2367,2368],{"title":566},[326,2369,2371],{"className":328,"code":2370,"filename":518,"language":331,"meta":332,"style":332},"{\n  \"status\": \"success\",\n  \"message\": \"bulk sms enqueued\",\n  \"data\": {\n    \"total\": 2,\n    \"charge\": 900,\n    \"currency\": \"USD\",\n    \"items\": [\n      {\n        \"id\": \"0f9c1b3a-6d2e-4a1b-9c3d-7e5f2a8b4c10\",\n        \"to\": \"263771000000\",\n        \"status\": \"enqueued\",\n        \"operator\": \"econet\",\n        \"charge\": 450,\n        \"charge_currency\": \"USD\"\n      },\n      {\n        \"id\": \"7e5f2a8b-4c10-4a1b-9c3d-0f9c1b3a6d2e\",\n        \"to\": \"263772000001\",\n        \"status\": \"enqueued\",\n        \"operator\": \"netone\",\n        \"charge\": 450,\n        \"charge_currency\": \"USD\"\n      }\n    ]\n  }\n}\n",[95,2372,2373,2377,2387,2398,2404,2416,2427,2438,2446,2451,2462,2472,2483,2494,2505,2515,2520,2524,2535,2546,2557,2569,2580,2589,2595,2601,2606],{"__ignoreMap":332},[336,2374,2375],{"class":338,"line":33},[336,2376,342],{"class":341},[336,2378,2379,2381,2383,2385],{"class":338,"line":49},[336,2380,465],{"class":347},[336,2382,351],{"class":341},[336,2384,470],{"class":354},[336,2386,358],{"class":341},[336,2388,2389,2391,2393,2396],{"class":338,"line":7},[336,2390,375],{"class":347},[336,2392,351],{"class":341},[336,2394,2395],{"class":354},"\"bulk sms enqueued\"",[336,2397,358],{"class":341},[336,2399,2400,2402],{"class":338,"line":21},[336,2401,1677],{"class":347},[336,2403,1680],{"class":341},[336,2405,2406,2409,2411,2414],{"class":338,"line":38},[336,2407,2408],{"class":347},"    \"total\"",[336,2410,351],{"class":341},[336,2412,2413],{"class":347},"2",[336,2415,358],{"class":341},[336,2417,2418,2420,2422,2425],{"class":338,"line":397},[336,2419,1740],{"class":347},[336,2421,351],{"class":341},[336,2423,2424],{"class":347},"900",[336,2426,358],{"class":341},[336,2428,2429,2432,2434,2436],{"class":338,"line":410},[336,2430,2431],{"class":347},"    \"currency\"",[336,2433,351],{"class":341},[336,2435,431],{"class":354},[336,2437,358],{"class":341},[336,2439,2440,2443],{"class":338,"line":423},[336,2441,2442],{"class":347},"    \"items\"",[336,2444,2445],{"class":341},": [\n",[336,2447,2448],{"class":338,"line":436},[336,2449,2450],{"class":341},"      {\n",[336,2452,2453,2456,2458,2460],{"class":338,"line":449},[336,2454,2455],{"class":347},"        \"id\"",[336,2457,351],{"class":341},[336,2459,355],{"class":354},[336,2461,358],{"class":341},[336,2463,2464,2466,2468,2470],{"class":338,"line":462},[336,2465,1045],{"class":347},[336,2467,351],{"class":341},[336,2469,368],{"class":354},[336,2471,358],{"class":341},[336,2473,2474,2477,2479,2481],{"class":338,"line":475},[336,2475,2476],{"class":347},"        \"status\"",[336,2478,351],{"class":341},[336,2480,1211],{"class":354},[336,2482,358],{"class":341},[336,2484,2485,2488,2490,2492],{"class":338,"line":487},[336,2486,2487],{"class":347},"        \"operator\"",[336,2489,351],{"class":341},[336,2491,405],{"class":354},[336,2493,358],{"class":341},[336,2495,2496,2499,2501,2503],{"class":338,"line":498},[336,2497,2498],{"class":347},"        \"charge\"",[336,2500,351],{"class":341},[336,2502,229],{"class":347},[336,2504,358],{"class":341},[336,2506,2507,2510,2512],{"class":338,"line":1793},[336,2508,2509],{"class":347},"        \"charge_currency\"",[336,2511,351],{"class":341},[336,2513,2514],{"class":354},"\"USD\"\n",[336,2516,2517],{"class":338,"line":1805},[336,2518,2519],{"class":341},"      },\n",[336,2521,2522],{"class":338,"line":1815},[336,2523,2450],{"class":341},[336,2525,2526,2528,2530,2533],{"class":338,"line":1821},[336,2527,2455],{"class":347},[336,2529,351],{"class":341},[336,2531,2532],{"class":354},"\"7e5f2a8b-4c10-4a1b-9c3d-0f9c1b3a6d2e\"",[336,2534,358],{"class":341},[336,2536,2538,2540,2542,2544],{"class":338,"line":2537},19,[336,2539,1045],{"class":347},[336,2541,351],{"class":341},[336,2543,2302],{"class":354},[336,2545,358],{"class":341},[336,2547,2549,2551,2553,2555],{"class":338,"line":2548},20,[336,2550,2476],{"class":347},[336,2552,351],{"class":341},[336,2554,1211],{"class":354},[336,2556,358],{"class":341},[336,2558,2560,2562,2564,2567],{"class":338,"line":2559},21,[336,2561,2487],{"class":347},[336,2563,351],{"class":341},[336,2565,2566],{"class":354},"\"netone\"",[336,2568,358],{"class":341},[336,2570,2572,2574,2576,2578],{"class":338,"line":2571},22,[336,2573,2498],{"class":347},[336,2575,351],{"class":341},[336,2577,229],{"class":347},[336,2579,358],{"class":341},[336,2581,2583,2585,2587],{"class":338,"line":2582},23,[336,2584,2509],{"class":347},[336,2586,351],{"class":341},[336,2588,2514],{"class":354},[336,2590,2592],{"class":338,"line":2591},24,[336,2593,2594],{"class":341},"      }\n",[336,2596,2598],{"class":338,"line":2597},25,[336,2599,2600],{"class":341},"    ]\n",[336,2602,2604],{"class":338,"line":2603},26,[336,2605,1818],{"class":341},[336,2607,2609],{"class":338,"line":2608},27,[336,2610,501],{"class":341},[2612,2613,2614],"style",{},"html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}",{"title":332,"searchDepth":49,"depth":49,"links":2616},[2617,2618,2619,2620],{"id":53,"depth":49,"text":52},{"id":56,"depth":49,"text":55},{"id":59,"depth":49,"text":58},{"id":62,"depth":49,"text":61},{"title":48,"description":80},"api\u002Fsms","md",{},1786390037514]