Skip to main content

Getting Started

📋 Copy Prompt
Help me send my first transactional SMS using the Integify API.

**I want to:**
- Create a working script that sends one SMS
- Understand the API request/response structure
- Learn best practices for error handling

**Context:**
- API endpoint: https://api.integify.io/v1
- Authentication: Bearer token in Authorization header
- I have my API key ready
- Target audience: Gambian businesses sending transactional SMS

**Please provide:**
1. A complete, working example (Python, JavaScript, and cURL)
2. Line-by-line explanation of what each part does
3. Example request/response payloads
4. Common error codes and how to handle them
5. Next steps (webhooks, production setup)

**Constraints:**
- Use standard libraries (requests for Python, fetch for JS)
- Include error handling
- Show real Gambian phone number format (+220XXXXXXX)
- Assume Python 3.8+, Node.js 14+

Overview

This guide walks you through sending your first SMS with the Integify API. By the end, you'll have a working script that sends a transactional SMS to any Gambian number.

Integify exposes a simple REST API — you POST JSON with the recipient number and message body. Delivery, SIMs, and operator routing are handled on the Integify side; your integration only speaks HTTP.

Prerequisites

Before you begin:

  • An active Integify account
  • An API key (found in your dashboard under Settings → API Keys)
  • Python 3.8+, Node.js 14+, or cURL installed

How It Works

When you send an API request, Integify:

  1. Authenticates your API key
  2. Queues the SMS for delivery through Integify's SMS stack
  3. Returns a message ID you can use to track delivery status (via dashboard, API, or webhooks)

All requests go to https://api.integify.io/v1. Authentication uses a Bearer token in the Authorization header.

Send Your First SMS

Step 1: Get your API key

Log in to your Integify dashboard and navigate to Settings → API Keys. Copy your key — it starts with sk_.

Step 2: Make the API call

The send-SMS endpoint is POST /v1/messages. Required fields:

| Field | Type | Description | |-------|------|-------------| | to | string | Recipient phone number (E.164 format) | | body | string | SMS message text (max 160 chars) |

Step 3: Check the response

A successful request returns HTTP 200 with a message object containing the message ID and status.

Code Examples

Python

python
import requests

API_KEY = "sk_your_api_key_here"
API_URL = "https://api.integify.io/v1"

def send_sms(to: str, body: str) -> dict:
    headers = {
        "Authorization": f"Bearer {API_KEY}",
        "Content-Type": "application/json",
    }
    payload = {
        "to": to,
        "body": body,
    }
    try:
        response = requests.post(
            f"{API_URL}/messages",
            json=payload,
            headers=headers,
            timeout=10,
        )
        response.raise_for_status()
        return response.json()
    except requests.exceptions.HTTPError as e:
        print(f"HTTP error: {e.response.status_code}{e.response.text}")
        raise
    except requests.exceptions.RequestException as e:
        print(f"Request failed: {e}")
        raise

result = send_sms("+2203001234", "Hello from Integify!")
print(f"Message ID: {result['id']}, Status: {result['status']}")

JavaScript

javascript
const API_KEY = "sk_your_api_key_here";
const API_URL = "https://api.integify.io/v1";

async function sendSms(to, body) {
  const response = await fetch(`${API_URL}/messages`, {
    method: "POST",
    headers: {
      "Authorization": `Bearer ${API_KEY}`,
      "Content-Type": "application/json",
    },
    body: JSON.stringify({ to, body }),
  });

  if (!response.ok) {
    const error = await response.json();
    throw new Error(`API error ${response.status}: ${error.message}`);
  }

  return response.json();
}

sendSms("+2203001234", "Hello from Integify!")
  .then(result => console.log(`Message ID: ${result.id}, Status: ${result.status}`))
  .catch(err => console.error(err.message));

cURL

bash
curl -X POST https://api.integify.io/v1/messages \
  -H "Authorization: Bearer sk_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{"to": "+2203001234", "body": "Hello from Integify!"}'

Example response:

json
{
  "id": "msg_01HXYZ123456",
  "to": "+2203001234",
  "body": "Hello from Integify!",
  "status": "queued",
  "created_at": "2026-04-10T12:00:00Z"
}

Testing

After sending, verify delivery:

  1. Check your Integify dashboard under Messages — you should see the message with status delivered
  2. The recipient's phone should receive the SMS within a few seconds
  3. If status stays queued for more than ~30 seconds, check Messages in the dashboard and your webhook logs for errors

Troubleshooting

401 Unauthorized — Your API key is missing or malformed. Ensure the header is Authorization: Bearer sk_... (note the space after Bearer).

422 Unprocessable Entity — The phone number format is invalid. Use E.164 format: +220 followed by 7 digits (e.g. +2203001234).

503 / capacity or routing errors — Temporary delivery constraints on Integify's side. Retry with backoff; if it persists, contact support with the message ID.

SMS not received — Confirm E.164 +220… format, operator coverage for that prefix, and the Messages detail for failure reasons.

Next Steps

  • Webhooks — Receive real-time delivery notifications
  • FAQ — Billing, rate limits, and troubleshooting