Make your first API call

Learn the base URL, how to send your key, and what a reply looks like.

4 minPlans: Pro and Max

Before you start

  • An API key (see Create an API key)
  1. 1

    Find the base URL

    Open API keys and look at Try the REST API. The base URL is shown there, for example https://app.nuhachat.com/api/v1.

    API keys
    Try the REST API
    curl …/api/v1/contacts?stage=offer -H "Authorization: Bearer nuha_live_…"
    Base URL: …/api/v1
    Sketch of the API keys screen
    Open this in Nuha Chat
  2. 2

    Send your key in the header

    Every call needs the header Authorization: Bearer nuha_live_… with your full key.

  3. 3

    Try a simple call

    List contacts in the Offer stage: curl "https://app.nuhachat.com/api/v1/contacts?stage=offer" -H "Authorization: Bearer nuha_live_…".

  4. 4

    Read the reply

    A good reply is JSON like { "data": [ … ] }. Money is in ringgit with "currency": "MYR". If something is wrong you get { "error": { "status": 401, "message": "…" } }.

  5. 5

    Send data with POST

    For POST calls, send a JSON body and use a Read + write key. Example: curl -X POST …/api/v1/contacts -H "Authorization: Bearer nuha_live_…" -H "Content-Type: application/json" -d '{"phone":"+60123456789","name":"Aina"}'.

Tips

  • Copy the ready-made example on the API keys page with the copy button.
  • POST calls are written to your business audit log.

Something not working?

401: Missing or malformed API key

Check the header is exactly Authorization: Bearer followed by the whole key.

403: This key is read-only

Create a Read + write key for POST calls.

404: No such endpoint

Check the path and method against the endpoint list.

Make your first API call · Nuha Chat Help