- List SMS GET
- Send an SMS POST
- List suppressed numbers GET
- Add a number to the SMS suppression list POST
- Check whether a number is suppressed GET
- Retrieve an SMS suppression GET
- Remove a number from the SMS suppression list DELETE
- List received SMS GET
- Retrieve a received SMS GET
- List the organization's phone numbers GET
- Retrieve an SMS GET
- List an SMS's events GET
- Cancel a scheduled SMS POST
Retrieve an SMS
One message sent from the API key's environment, with its current status.
bearerAuthAuthorizationBearer <token>A secret API key from the dashboard: coss_live_… for production environments, coss_test_… for sandbox environments.
id*stringThe message's id.
Coss-Version?"2026-10-10"The API version (a date) to use for this request. Defaults to your organization's version, pinned to the latest one when it first used the API and upgraded from the dashboard. The SDK always sends the version it was built for.
"2026-10-10"The message.
application/json- response
- response
- …
object*"sms""sms"id*stringfrom*stringThe number it's sent from, in E.164.
to*stringThe recipient's number, in E.164.
body*stringThe text. Empty once discarded.
status*stringqueued until handed to the carrier (sent), then delivered or undelivered once the carrier reports. failed: never sent. scheduled and canceled: scheduled sends.
"queued""scheduled""sent""delivered""undelivered""failed""canceled"segments*integerSegments the body takes (what is billed).
encoding*stringgsm7 fits the basic alphabet; ucs2 is used for anything else, with smaller segments.
"gsm7""ucs2"country*stringISO 3166 country of to.
tags*array<>Your tags on the message.
failure*|Why the message failed or wasn't delivered.
sandbox*booleanSent from a sandbox environment: simulated.
scheduled_at*|When it's set to send. null: it was sent at once.
date-timesent_at*|When it was handed to the carrier. null: not yet.
date-timedelivered_at*|When the carrier reported delivery. null: not delivered, or not reported.
date-timecreated_at*stringdate-timeimport { Coss } from "coss";const coss = new Coss({ apiKey: process.env.COSS_API_KEY, baseUrl: "https://api.coss.com",});const { data, error } = await coss.sms.get("sms_01k7c8m4q2f3e9v6t5r1n0p8yz");{ "object": "sms", "id": "sms_01k7c8m4q2f3e9v6t5r1n0p8yz", "from": "+14155550123", "to": "+14155550199", "body": "Your Acme code is 482913", "status": "delivered", "segments": 1, "encoding": "gsm7", "country": "US", "tags": [ { "name": "flow", "value": "sign_in" } ], "failure": null, "sandbox": false, "scheduled_at": null, "sent_at": "2026-11-10T12:00:01.000Z", "delivered_at": "2026-11-10T12:00:04.000Z", "created_at": "2026-11-10T12:00:00.000Z"}