Skip to content

Scheduling

Every setting on this page goes into one request: POST /api/campaign/:id/schedule. You send it once, on a DRAFT campaign. Only startDateTime is required. Anything you leave out uses the default shown below.

What you want to control Field(s) If you leave it out Section
When calling may start and stop startDateTime, endDateTime No deadline Start and end
Which days and hours calls are allowed timeWindows Mon–Fri 09:00–19:00, Sat–Sun 10:00–19:00 Calling hours
How many times to try each person, and how long to wait maxAttempts, retryInterval 1 attempt, no retry Retries
Which phone number(s) the customer sees callerIds The agent’s numbers, or else Gowajee’s shared number Caller numbers
Which AI voice(s) the agent speaks with ttsVoiceKeys The agent’s own voice setup Voices
Skip people who were called recently removeDuplicates Off Remove duplicate recipients

A request that uses all of them:

POST /api/campaign/:id/schedule
{
"startDateTime": "2026-10-01T02:00:00.000Z",
"endDateTime": "2026-10-07T11: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,
"callerIds": ["+6621234567", "+6621234568"],
"ttsVoiceKeys": ["nicha", "suda"]
}
Field Format Meaning
startDateTime ISO-8601, UTC The earliest moment the first call may be dialled. A time in the past means “start now”.
endDateTime ISO-8601, UTC, or null The deadline. Anyone not called by then gets EXPIRED, and so does the campaign. null or left out means no deadline.

After you start the campaign it is SCHEDULED. Gowajee’s scheduler checks about every 30 seconds. Once startDateTime has passed and the current time is inside a calling window, the campaign becomes RUNNING and dialling begins. It stays RUNNING between calling windows.

timeWindows lists the days and the hours on each day when calls may start. Hours are in Bangkok time (UTC+7), HH:MM, 24-hour clock.

"timeWindows": [
{ "dayOfWeek": 1, "time": [{ "start": "09:00", "end": "12:00" }, { "start": "13:00", "end": "18:00" }] },
{ "dayOfWeek": 6, "time": [{ "start": "10:00", "end": "15:00" }] }
]

This means Mondays 09:00–12:00 and 13:00–18:00 (with a lunch break), and Saturdays 10:00–15:00. No calls on any other day.

dayOfWeek 1 2 3 4 5 6 7
Day Mon Tue Wed Thu Fri Sat Sun

Rules

  • A day that isn’t in the list gets no calls.
  • Put every range for a day in one object’s time array. If the same dayOfWeek appears twice, only the first one counts.
  • start must be earlier than end, so a range can’t cross midnight.
  • Hours need two digits: 09:00, not 9:00. 9:00 is rejected with 400.
  • A day must have at least one range. "time": [] is rejected with 400.
  • The window controls when a call starts. A call that starts at 17:59 can carry on past 18:00.
  • Leave timeWindows out to get the default: Mon–Fri 09:00–19:00, Sat–Sun 10:00–19:00.

When a call ends as NO_ANSWER, BUSY or FAILED, Gowajee can call that person again.

Field Default Meaning
maxAttempts 1 Total calls per recipient, counting the first one. 3 means the first call plus up to 2 retries. 1 means no retries.
retryInterval 3600000 (1 hour) when maxAttempts is more than 1, otherwise 0 The minimum wait after an attempt ends before the next one, in milliseconds. When maxAttempts is more than 1, it must be at least 300000 (5 minutes).

A call that ends as CANCELLED, for example because it waited too long in the queue, is also called again. It doesn’t use up an attempt, so this happens even when maxAttempts is 1.

With maxAttempts: 3, retryInterval: 7200000 (2 hours) and weekday calling hours 09:00–18:00:

Attempt Ended at Result What happens next
1 Mon 09:05 NO_ANSWER A retry becomes due after 11:05.
2 Mon 11:06 BUSY A retry becomes due after 13:06.
3 Mon 13:09 COMPLETED Done: the person was reached.

The wait counts from when an attempt ends, not from when it was dialled.

If attempt 2 had ended at 17:30, the retry would be due at 19:30. That’s outside the calling hours, so it would be dialled at 09:00 the next weekday.

A person is not called again when:

  • a call reached them (COMPLETED, including voicemail) at any point in this campaign,
  • they have used up maxAttempts, or
  • the campaign was cancelled or expired.

A pause doesn’t stop retries for good. They wait while the campaign is PAUSED, and continue after resume.

Term What it is
SIP account A connection to a phone line provider (your telecom provider, or Gowajee’s). It holds one or more phone numbers.
Caller ID One phone number inside a SIP account. It is the number the customer sees on their screen.
Outbound Default The caller ID marked as the default of its SIP account.

You can see all of them in the dashboard under System → Settings → Phone Numbers.

Send the phone numbers exactly as they appear on the Phone Numbers page:

You send What happens
One number: ["+6621234567"] Every call uses that number.
Several numbers: ["+6621234567", "+6621234568", "0812345678"] Shuffle: each call picks one at random.
[] (empty array) Rejected with 400. Leave the field out to use the default instead.
  • With several numbers, a retry never uses the number that person was last called from. Someone who ignored the first number sees a different one the next time.
  • The numbers may come from different SIP accounts.
  • A number that isn’t one of your organization’s numbers is rejected: 400 Unknown caller ID: <number>.

The first of these that exists is used:

  1. sipCallerId from the legacy fields below.
  2. The agent’s default outbound numbers (set by Gowajee in the agent’s configuration).
  3. If you sent only sipAccountId: that SIP account’s Outbound Default number.
  4. Gowajee’s shared number.

Legacy fields: sipAccountId and sipCallerId

Section titled “Legacy fields: sipAccountId and sipCallerId”

Older integrations pin every call to one number with two IDs (not phone numbers): sipAccountId (the SIP account) and sipCallerId (one caller ID in that account). You can copy both IDs from the Phone Numbers page. They still work, but callerIds does the same job with plain phone numbers, and it can shuffle, so use callerIds in new integrations.

You send What happens
One voice: ["nicha"] Every call uses that voice.
Several voices: ["nicha", "suda", "kanya"] Shuffle: each call picks one at random. The voice stays the same for the whole call. A retry is a new call, so it picks again.
[] (empty array) Rejected with 400. Leave the field out to use the agent’s own setup.
  • Sending ttsVoiceKeys switches the campaign’s calls to the TTS V2 voices in the table below, even if the agent uses another voice engine.
  • A key you send twice counts once.
  • With a male voice, Gowajee’s own built-in text (for example its filler words) uses ครับ instead of ค่ะ / คะ. Lines in your agent’s script are not converted, so a script written with ค่ะ usually still says ค่ะ with a male voice. Use a male version of the script for male voices.
  • An unknown or retired key is rejected: 400 Unknown voice: <key>.
  • If you leave it out: the agent’s own setup is used. If Shuffle voices is on in the agent’s configuration, each call picks from the agent’s voice list. Otherwise every call uses the agent’s single voice.
voiceKey Name Gender Note
nicha Nicha Female Recommended
supannee Supannee Female
suda Suda Female
kanya Kanya Female
narin Narin Female
nisa Nisa Female
taste Taste Female
beer Beer Male Recommended
thaksin Thaksin Male
chakrit Chakrit Male
krit Krit Male
somchai Somchai Male
carmen Carmen Female Non-native Thai accent
reflective Reflective Woman Female Non-native Thai accent

This table was last updated in September 2026. For the live list, call GET /voice-demo/catalog. It is public, so it needs no API key.

If Duplicate Call Alert is on for your organization (dashboard: System → Settings → General → Duplicate Call Alert), add "removeDuplicates": true. Before dialling, Gowajee removes everyone whose phone number the same agent already reached within your alert window (for example “this month”). The response tells you how many were removed: "removedRecipients": 12.

  • Only COMPLETED calls count. A number that was dialled but not reached (NO_ANSWER, BUSY…) is kept.
  • The phone number must match exactly, as text. 0812345678 and +66812345678 are different numbers here.
Error (400) Cause
Duplicate call alert is not enabled for this organization The feature is off for your organization.
All recipients are duplicates within the configured window Nobody would be left to call. The campaign stays DRAFT.
{ "startDateTime": "2026-10-01T02:00:00.000Z" }

Weekdays 09:00–19:00, weekends 10:00–19:00, one attempt each, the agent’s numbers and voice.