Before you start

You need a Notilify API key.

Minute 1: get your Notilify API key

Create an API key in Notilify and make it available to your application asNOTILIFY_API_KEY.

Minute 2: replace the send call

Keep your application-facing function unchanged. Replace only the provider adapter behind it.

async function sendWithNotilify({ from, to, body, requestId }) {
  const response = await fetch("https://api.notilify.com/v1/message", {
    method: "POST",
    headers: {
      Authorization: `Bearer ${process.env.NOTILIFY_API_KEY}`,
      "Content-Type": "application/json",
      "Idempotency-Key": requestId
    },
    body: JSON.stringify({ from, to, message: body })
  });

  if (!response.ok) throw new Error(`Notilify returned ${response.status}`);
  const result = await response.json();
  return { provider: "notilify", messageId: result.data.message_id };
}
TwilioNotilifyMigration note
Account SID + Auth TokenBearer API keyUse the Authorization header
BodymessageKeep the same SMS text
TotoKeep the number in E.164 format
FromfromUse an approved sender ID or purchased number
MessageSiddata.message_idStore this as your provider message ID
StatusCallbackConfigured webhookRegister one delivery webhook

Minute 3: map the response

Replace the Twilio MessageSid with Notilify'sdata.message_id wherever you store or return the provider message ID.

Pass your existing request ID as the Idempotency-Key.

Minute 4: move delivery events

Register your delivery endpoint once instead of attaching a callback URL to every send.

curl -X POST https://api.notilify.com/v1/webhook \
  -H "Authorization: Bearer $NOTILIFY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com/webhooks/notilify",
    "enabled": true,
    "secret": "use-a-long-random-secret"
  }'

Store event_id for deduplication and message_id for correlation. Return success quickly, then process the event asynchronously.

Twilio statusNotilify statusApplication status
queued / acceptedqueuedpending
sentsentsent
delivereddelivereddelivered
failed / undeliveredfailedfailed
No direct equivalentretryingpending

Minute 5: send a test message

  1. Send one message through the updated application path.
  2. Confirm the API returns data.message_id.
  3. Confirm the delivery event reaches your webhook.

Once those checks pass, route your transactional SMS sends through Notilify.

If you use Twilio Verify

Twilio Verify manages code generation and verification as well as message delivery. Keep it active until your application has secure OTP generation, expiration, attempt limits, hashing, and verification.

Migration complete

  • New sends use Notilify and store the Notilify message ID.
  • Delivery events reach your Notilify webhook endpoint.
  • Retries use stable idempotency keys.