#Quickstart
This takes you from nothing to a delivered test message. It never touches a carrier, so it is free and needs no registration.
#1. Create a test API key
Sign in at app.mittis.ai, open Developers, API keys, and create a key in test mode. Test keys start with sk_test_. The key is shown once, so store it.
bash
export MITTIS_API_KEY=sk_test_...You can also mint keys from the terminal with the CLI: npx @mittis/cli login --test.
#2. Send a text
Send from the reserved number +15005550006. It is always a test send, even with a live key.
bash
curl https://api.mittis.ai/v1/messages \
-H "Authorization: Bearer $MITTIS_API_KEY" \
-H "Idempotency-Key: first-message-1" \
-H "Content-Type: application/json" \
-d '{
"to": "+14155550199",
"from": "+15005550006",
"body": "Your appointment is confirmed."
}'The response is the new message, returned immediately while delivery continues in the background:
json
{
"id": "8f14e45f-ceea-467a-9575-4d2f7b0e2a31",
"to": "+14155550199",
"from": "+15005550006",
"direction": "outbound",
"status": "queued"
}Follow it with GET /v1/messages/{id} or with message.status webhooks.
#With the SDK
bash
npm install @mittis/sdkts
import { Mittis } from '@mittis/sdk';
const mittis = new Mittis({ apiKey: process.env.MITTIS_API_KEY! });
const message = await mittis.messages.send({
to: '+14155550199',
from: '+15005550006',
body: 'Your appointment is confirmed.',
});#3. Receive events locally
Stream live events into your dev server, signed exactly like production:
bash
npx @mittis/cli listen --forward-to http://localhost:3000/api/webhooks/mittis#4. Go live
- Create a
sk_live_key. - Buy a number.
- Register your brand and campaign and attach the number to the approved campaign.
- Send from your own number. Messages sent from a number without an approved campaign are rejected.