:: documentation

opensms :: docs

$ getting started

From zero to your first message in five steps.

## 1. sign in with google

Open /login and continue with Google. There is no separate password to manage.

## 2. create an api key

Go to dashboard → api keys, name the key and create it. The full key is shown once. Store it somewhere safe.

## 3. install the android gateway

Install and open the OpenSMS Android gateway app on the phone that holds the SIM you want to send from.

## 4. paste the api key

Paste the key into the app. The app registers itself with OpenSMS under your account and receives its own device credential, which it uses from then on. You do not need to do anything else on this step.

## 5. send an sms

Create a job with your API key. A paired gateway will pick it up.

curl
curl -X POST https://opensms.dev/api/v1/messages \
  -H "Authorization: Bearer opensms_xxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{"to": "+923001234567", "message": "Hello from OpenSMS"}'
javascript
const res = await fetch('https://opensms.dev/api/v1/messages', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer opensms_xxxxxxxxx',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({ to: '+923001234567', message: 'Hello from OpenSMS' }),
})

const { id, status } = await res.json()

The response is { "id": "...", "status": "pending" }. Check it with send sms.