Skip to content
Nigora Zap API

    Sign in Create account

    Getting started

    In this guide you create an instance, connect the number and send your first message. An instance is a WhatsApp number connected to the API.

    In the examples, replace INSTANCIA_ID with your instance’s identifier and TOKEN with its token.

    In the dashboard (which is in Portuguese), open Instâncias and click Nova instância. Copy the token: it is shown only once and gives full access to the instance. Store it somewhere safe. If you lose it, generate a new one; the old one stops working.

    The identifier (instance ID) is on the instance’s credentials tab, next to the API base address.

    Terminal window
    curl -X POST https://api.zap.nigora.com.br/v1/instances/INSTANCIA_ID/connect \
    -H "Authorization: Bearer TOKEN"

    The response is 202 with { "connectionStatus": "..." }. It only confirms that the connection has started.

    Terminal window
    curl https://api.zap.nigora.com.br/v1/instances/INSTANCIA_ID/qr \
    -H "Authorization: Bearer TOKEN"

    The response has qr (the code’s text) and image (a PNG as a data: URL, ready to display). While the code is not available, both are null: check again in a few seconds.

    On your phone, open WhatsApp, go to Linked devices and scan the code. Prefer to type a code instead of scanning the QR? See Connection.

    Terminal window
    curl https://api.zap.nigora.com.br/v1/instances/INSTANCIA_ID \
    -H "Authorization: Bearer TOKEN"

    The response has connectionStatus (disconnected, connecting, qr or connected) and, once connected, the number in phone. If you would rather be notified, set up the instance.connected and instance.disconnected webhooks (see Webhooks).

    Terminal window
    curl -X POST https://api.zap.nigora.com.br/v1/instances/INSTANCIA_ID/messages/text \
    -H "Authorization: Bearer TOKEN" \
    -H "Content-Type: application/json" \
    -d '{ "to": "5511999999999", "text": "Olá! Primeira mensagem pela API." }'

    The response is 202 with { "id": "...", "status": "queued" }. That means the message entered the queue, not that it has been delivered yet. Track the result through webhooks, in the Sending messages guide.