REST API

    ChatterSwift Connect API

    Programmatically send WhatsApp messages to reach your customers instantly using our robust REST APIs.

    Need Help?

    Having trouble with the API? Our support team is ready to help.

    Please contact support@chatterswift.com

    Introduction
    Overview of the ChatterSwift Connect API

    ChatterSwift Connect provides REST APIs that enable businesses to programmatically send WhatsApp messages. This document outlines the authentication, endpoints, and usage guidelines for the Connect feature.

    WhatsApp API
    Messaging
    Templates
    Authentication
    All API requests must include your API key in the request header

    Security Note

    Keep your API key secure. Don't expose it in client-side code or public repositories.

    API Key Header

    Header
    x-api-key: your_api_key_here

    If the API key is missing, invalid, or lacks the necessary permissions, the request will be rejected.

    Rate Limiting
    Understanding request limits and handling rate limiting responses

    API requests are subject to rate limits defined for your account. When a rate limit is exceeded, requests will return a 429 Too Many Requests status code until the limit resets.

    Business Plan
    1,000
    requests per day
    Base URL
    All API requests are made to this endpoint
    JSON
    https://backend.chatterswift.com/api/v1/connect
    

    Endpoints

    Send Message
    POST
    Stable
    Sends a simple text message to a WhatsApp number

    Endpoint

    POST
    /send-message

    Authorization

    Requires x-api-key header

    Permission

    sendText

    Request Body

    JSON
    {
      "recipient": "9999999999",  // Recipient's phone number
      "message": "Your message text here"  // Text content to send
    }

    Success Response

    200 OK
    {
      "success": true,
      "data": {
        "messageId": "wamid.xxxxx",  // WhatsApp message ID
        "status": "sent"
      },
      "message": "Message sent successfully"
    }

    Error Responses

    401 UnauthorizedMissing or invalid API key
    403 ForbiddenAPI key doesn't have sendText permission
    404 Not FoundCustomer account not found
    400 Bad RequestMissing required fields
    429 Too Many RequestsRate limit exceeded
    500 Internal Server ErrorServer error or WhatsApp API error
    Best Practices
    Follow these guidelines for optimal API usage

    Store your API key securely

    Never expose your API key in client-side code or public repositories.

    Handle rate limits

    Implement exponential backoff when encountering rate limit errors.

    Validate templates

    Ensure your templates are approved before attempting to send them.

    Error handling

    Implement proper error handling to manage API response codes.

    Last updated: March 7, 2025