| Method | POST |
|---|---|
| Endpoint | https://{{host}}/campaign/api/v2/public/{{streamId}}/campaign/schedule?enableSchedule=true&campaignName={{campaignName}} |
| Content Type | application/json |
| Authorization | auth: {{JWT}} See How to generate the JWT Token |
| API Scope | Campaign Management |
Path Parameters
| Parameter | Description | Type |
|---|---|---|
host | Environment URL, for example, https://platform.kore.ai | string, required |
streamId | BotId or StreamId. You can access it from the App Settings page of the bot. | string, required |
Query Parameters
| Parameter | Description | Type |
|---|---|---|
enableSchedule | Enable a campaign schedule with either Daily or Weekly recurrence patterns. Set it to true. | boolean, required |
campaignName | The name of the Voice or SMS campaign. | string, required |
Sample Request
Request Headers
| Header | Description | Required/Optional |
|---|---|---|
auth | JWT token for authentication. | required |
accountId | The account ID associated with the API request. | required |
Content-Type | The format in which the request payload is sent to the server. Example: application/json | required |
iid | BotId or StreamId. You can access it from the App Settings page of the bot. | required |
Body Parameters
| Parameter | Description | Type |
|---|---|---|
startDateTime | The campaign’s start date and time in YYYY-MM-DD HH:mm:ss format. | string (Date-Time), required |
endDateTime | The campaign’s end date and time in YYYY-MM-DD HH:mm:ss format. Must be greater than both current time and startDateTime. | string (Date-Time), required |
recurrenceObject | Contains the recurrence configuration of a campaign. | object, required |
recurrenceObject.recurType | Recurrence type for the campaign. For example, Daily or Weekly. | string |
recurrenceObject.dailyDetails | Weekly recurrence configuration. Required when recurType is Weekly. | object, required |
recurrenceObject.dailyDetails.onceEveryNweeks | Specifies the campaign runs once every N weeks. For example, 1 = every week, 2 = every alternate week. | integer, required |
recurrenceObject.dailyDetails.whichDays | Days of the week on which the campaign runs. For example, Mon, Tue, Wed, Thu, Fri, Sat, Sun. | array, required |
Sample Response
Response Parameters
| Parameter | Description | Type |
|---|---|---|
status | Indicates the response status. Example: success | string |
message | Descriptive message about the result. | string |
id | Unique identifier of the successfully scheduled campaign. | string |