***

title: create
slug: /reference/typescript/rest/compat/messages/create
description: Send a new SMS or MMS message.
max-toc-depth: 3
---------------------

For a complete index of all SignalWire documentation pages, fetch https://signalwire.com/docs/llms.txt

Send a new SMS or MMS message.

<EndpointSchemaSnippet endpoint="POST /Accounts/{AccountSid}/Messages" />

## **Response Example**

<EndpointResponseSnippet endpoint="POST /Accounts/{AccountSid}/Messages" />

## **Example**

```typescript {9,16}
import { RestClient } from "@signalwire/sdk";

const client = new RestClient({
  project: "your-project-id",
  token: "your-api-token",
  host: "your-space.signalwire.com",
});

// Send an SMS
const msg = await client.compat.messages.create({
  To: "+15559876543",
  From: "+15551234567",
  Body: "Hello from SignalWire!",
});

// Send an MMS with an image
const mms = await client.compat.messages.create({
  To: "+15559876543",
  From: "+15551234567",
  Body: "Check this out",
  MediaUrl: ["https://example.com/image.jpg"],
});
```