# Send Your First Message (/docs/quickstart)

## Before You Begin [#before-you-begin]

Sign in to the [Smobi dashboard](https://app.smobi.com), select your brand, and obtain its API key. Your brand needs a configured messaging sender. If your brand is not ready to send, complete setup with your Smobi contact first.

Use a phone you control for the first test. API examples call the production API and can send real messages.

## 1. Store Your API Key [#1-store-your-api-key]

Keep the key in a server-side environment variable. Never place it in frontend code or commit it to Git.

```bash
export SMOBI_API_KEY='YOUR_BRAND_API_KEY'
```

## 2. Send a Message [#2-send-a-message]

Replace the recipient with your own phone number, including its country code. Use a unique `clientRef` to correlate this message with your application.

```bash
curl --request POST 'https://api.smobi.com/v1/message' \
  --header "x-api-key: $SMOBI_API_KEY" \
  --header 'Content-Type: application/json' \
  --data '{
    "clientRef": "quickstart-001",
    "recipientPhoneNumber": "15552223333",
    "content": {
      "sms": { "content": "Hello from Smobi!" }
    }
  }'
```

## 3. Save the Message Identifier [#3-save-the-message-identifier]

A successful request returns HTTP `201` with `smobiMessageId` and `status`. Store the identifier alongside your `clientRef`. An accepted request is not proof that the phone received the message: sending and delivery happen asynchronously.

Configure a [status webhook](/docs/guides/webhooks) to track `SENT`, `DELIVERED`, `READ` where supported, or `FAILED`.

## Next Steps [#next-steps]

- [Add RCS content and an SMS fallback](/docs/guides/messaging).
- [Sync contacts and record marketing consent](/docs/guides/contacts).
- [Use the TypeScript SDK](/docs/guides/typescript-sdk).

If a request fails, use the [troubleshooting guide](/docs/troubleshooting). Before retrying a send after a timeout, check whether the original request was accepted to avoid sending a duplicate message.
