Skip to content
MessageOS.ai

Developers

The MessageOS Developer Docs Are Now Public

Everything a developer needs to send and receive RCS messages through MessageOS is now open to read at docs.messageos.ai, with no passcode and no sign-in.

By MessageOS Team4 min read
The address docs.messageos.ai in large white type on a dark blue ground, under the MessageOS logo, with the words Open to everyone and the sections Quickstart, Guides, API reference, Webhooks, and Kitchen Sink

The MessageOS developer docs are public. Anyone can read them at docs.messageos.ai, with no passcode and no sign-in.

They are written for two readers. A business setting up an agent can start with what an agent can do. A developer connecting their own software can go from a key to a two-way conversation in the quickstart, then read every endpoint in the API reference.

What the API does

The API is served at https://api.messageos.ai/v1. Your system sends messages with POST /v1/messages and hears what people send back through a signed webhook. The messages come from your agent, the sender MessageOS sets up for your business, with the name and logo people see on the conversation, and they go by RCS to the phone's regular messaging app.

With a client key, a developer can:

  • Send a message in one call: text, suggested replies, suggested actions, a rich card, a carousel, or a file. Message types has a request body for each.
  • Answer a person who just wrote in. A send that names their message in inReplyTo is a reply, as Contacts, conversations, and messages explains.
  • Store contacts and consent, and read conversations and their messages.
  • Hear every reply through a webhook: what a person typed or tapped, a file, or a shared location, plus delivery, read, and failure reports and opt outs and opt ins.
  • Ask for a draft: where it is turned on, MessageOS writes the text from your instructions and keeps it as a draft for approval instead of sending it.
  • Submit events from your own systems, and read approved answers, gaps, and usage.

Some features are turned on for each agent by MessageOS. The typing indicator, checking a phone number for RCS, taking a message back, message expiry, and traffic type are among them. GET /v1/whoami tells you what your key and your agent have.

Client keys

A client key starts with mosc_. An owner or admin of a brand makes one in the MessageOS dashboard, under Developers. The key is shown once, when it is made, and only a hash of it is stored.

Each key has permissions, and a request without the one its route needs is refused with 403. A key's permissions cannot be changed later: to change them, make a new key and revoke the old one. Authentication lists every permission and says which ones an owner or admin can give a key.

Until an agent is launched, it reaches only the phones MessageOS has added as its testers. The quickstart's testing section says how to get a phone added.

What is in the docs

The docs have three parts.

Overview

For the business: what an agent can do, rich messages, opt-in and opt-out (consent, STOP, and quiet hours), and onboarding, which lists what a new business provides before launch.

Guides

API reference

The reference starts with Authentication, Errors, Idempotency, Rate limits, Objects, and Webhook events. Then each endpoint has its own page, from sending a message to identifying the caller.

Each endpoint page is generated from the same contract the API checks, and a stale contract fails the docs build.

Samples in eight languages

Every endpoint page shows its request in cURL, JavaScript, Python, PHP, Ruby, Go, Java, and C#. Pick one under Language, and the page remembers it. Where an endpoint has more than one example, such as each kind of message, pick one under Example and the sample changes to match.

Each sample is a whole program that uses only what comes with the language, and prints the status and the answer. Swap the placeholder key for your own, and keep a real key on your server, never in a web page or an app.

Built for coding assistants too

Each page has a Markdown copy: add .md to the page address. /llms-full.txt is every page in one text file. Point a coding assistant at either and it reads the same reference you do.

Start here

  1. Read the quickstart.
  2. If your own software answers your customers, read When your own system answers.
  3. Run the example app, or read about it first in our post on the Kitchen Sink.

Want to see what your own brand looks like in RCS before you write a line of code? Enter your website and the preview arrives on your own phone.

About a minute

See your branded text message on your own phone.

Enter your website. We draft a verified business profile and a first message from what your site says, and send it to your phone.