/ Docs

Send Your First Message

Send a test message from your backend and understand the response.

View Markdown

Before You Begin

Sign in to the Smobi dashboard, 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

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

export SMOBI_API_KEY='YOUR_BRAND_API_KEY'

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.

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

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 to track SENT, DELIVERED, READ where supported, or FAILED.

Next Steps

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

On This Page