Skip to content

Quickstart

This guide takes you from an API key to your first call result.

You need:

  • An API key. An Owner or Admin can copy it in the dashboard under System → Developers → API Key. See Authentication.
  • An agent that Gowajee has set up for your organization.
  • A webhook URL (optional) under System → Developers → Webhook URL, only if you want results pushed to you.
export GOWAJEE_API_KEY="gw_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
export GOWAJEE_API="https://api.voice-agent.gowajee.ai"
  1. curl "$GOWAJEE_API/api/agent/list" -H "X-API-Key: $GOWAJEE_API_KEY"
    Response (shortened)
    {
    "success": true,
    "message": "Get Agent list successfully",
    "data": [
    {
    "id": "33ea7a25-03b2-4614-a004-fa3bf9984bd1",
    "name": "Payment reminder",
    "paramsSchema": {
    "customer_name": { "type": "text", "required": true, "description": "Customer first name" },
    "amount_due": { "type": "number", "required": true }
    }
    }
    ]
    }

    Note the agent id. paramsSchema lists the fields each recipient’s agentParams must contain.

  2. curl -X POST "$GOWAJEE_API/api/campaign/create" \
    -H "X-API-Key: $GOWAJEE_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
    "agentId": "33ea7a25-03b2-4614-a004-fa3bf9984bd1",
    "name": "October payment reminder",
    "recipients": [
    { "tel": "0812345678", "customerName": "Somchai", "agentParams": { "customer_name": "Somchai", "amount_due": 1500 } },
    { "tel": "0898765432", "customerName": "Suda", "agentParams": { "customer_name": "Suda", "amount_due": 3200 } }
    ]
    }'
    Response 201 (shortened)
    {
    "success": true,
    "message": "Campaign created successfully",
    "data": [
    { "tel": "0812345678", "customerName": "Somchai", "agentParams": { "customer_name": "Somchai", "amount_due": 1500 },
    "campaignId": "eac2489c-672c-455e-ab8c-4e0ecd18d7dc", "organizationId": "8ee40f50-58de-4ae7-a55b-6bc83291b4be" }
    ]
    }
  3. curl -X POST "$GOWAJEE_API/api/campaign/eac2489c-672c-455e-ab8c-4e0ecd18d7dc/schedule" \
    -H "X-API-Key: $GOWAJEE_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
    "startDateTime": "2026-10-01T02:00:00.000Z",
    "timeWindows": [
    { "dayOfWeek": 1, "time": [{ "start": "09:00", "end": "12:00" }, { "start": "13:00", "end": "18:00" }] },
    { "dayOfWeek": 2, "time": [{ "start": "09:00", "end": "18:00" }] },
    { "dayOfWeek": 3, "time": [{ "start": "09:00", "end": "18:00" }] },
    { "dayOfWeek": 4, "time": [{ "start": "09:00", "end": "18:00" }] },
    { "dayOfWeek": 5, "time": [{ "start": "09:00", "end": "18:00" }] }
    ],
    "maxAttempts": 3,
    "retryInterval": 7200000
    }'

    Calls start at 09:00 Bangkok time on 1 October 2026 (02:00Z), only on weekdays inside the given windows. A recipient who doesn’t answer is called up to 3 times, at least 2 hours apart.

  4. Check progress, then read the calls. Repeat every 1–2 minutes until the campaign is finished (COMPLETED, CANCELLED or EXPIRED) and no call is still going.

    # Progress: how many people are in each state
    curl "$GOWAJEE_API/api/campaign/eac2489c-672c-455e-ab8c-4e0ecd18d7dc/status" -H "X-API-Key: $GOWAJEE_API_KEY"
    # Results: every call, most recently updated first (100 per page)
    curl "$GOWAJEE_API/api/campaign/eac2489c-672c-455e-ab8c-4e0ecd18d7dc/calls?page=1" -H "X-API-Key: $GOWAJEE_API_KEY"
    A finished call in /calls (shortened)
    {
    "id": "fc1c320d-d133-4d48-8118-5932d93149fd",
    "callStatus": "COMPLETED",
    "callDuration": "120.120",
    "callResult": {
    "version": "v2",
    "fixedAttr": { "callSummary": "ลูกค้ารับทราบยอดค้างชำระ และนัดชำระวันที่ 5 ตุลาคม" },
    "postCallAnalyticsResult": { "promise_to_pay": { "type": "boolean", "required": true, "value": true } }
    },
    "recipient": { "tel": "0812345678", "customerName": "Somchai", "callAttempt": 1 }
    }

    The Polling guide has a complete sync loop in JavaScript and Python.