Codique

DevelopersQuickstart

Developers · Start

Quickstart

Send your first WhatsApp message from your own code in a few minutes.

Send a WhatsApp template message from your own code. You need a workspace with WhatsApp connected and admin access, or an admin to do steps 1 and 2 for you.

  1. Have an approved template

    In EngageTemplates, check that at least one Utility or Authentication template is Approved. This guide uses one called order_confirmation with two body variables.

  2. Register a connected app

    In Team & channelsConnected apps, register an app with an App ID such as acme-orders, click Generate for the service key and save. Copy the key now: it is shown only once. Details in Connect an application.

  3. Store the credentials

    Your backend’s environment
    CODIQUE_APP_ID=acme-ordersCODIQUE_SERVICE_KEY=<the-service-key-you-copied>
  4. Check that they work

    Check the credentials
    curl https://api.example.com/health/auth \  -H "x-app-id: $CODIQUE_APP_ID" \  -H "x-app-service-key: $CODIQUE_SERVICE_KEY"

    You should get {"ok":true,"app_id":"acme-orders",…}. A 401 means the ID or key is wrong, or the app is inactive.

  5. Send the message

    Put your own WhatsApp number in to, with the country code and no plus sign.

    curl -X POST https://api.example.com/api/app-notifications/send \  -H "Content-Type: application/json" \  -H "x-app-id: $CODIQUE_APP_ID" \  -H "x-app-service-key: $CODIQUE_SERVICE_KEY" \  -d '{    "to": "919876543210",    "category": "TRANSACTIONAL",    "notification_type": "order_confirmed",    "template_name": "order_confirmation",    "language_code": "en_US",    "template_variables": ["Aarav", "#4421"]  }'
  6. See it arrive

    The message arrives on your phone. It also appears in InsightsNotification logs and as a thread in the inbox, so if you reply, your team sees it.

Next: get the exact request for any of your templates with template codes.

Still stuck? Contact us with what you were doing and the exact message you saw.