Skip to main content
Back to API List

Create SMS Campaign (Using Template) API

Use this API to create an SMS campaign using a predefined message template.
MethodPOST
Endpointhttps://{{host}}/agentassist/api/v1/public/{{IID}}/campaign?campaignType=sms
Content-Typeapplication/json
Authorizationauth: {{JWT}} See How to generate the JWT Token
API ScopeCampaign Management

Path Parameters

ParameterDescriptionType
hostEnvironment URL, for example, https://platform.kore.aistring, required
IIdthe Application IDstring, required

Query Parameters

ParameterDescriptionType
campaignTypeType of Campaign. Use "sms".string, required

Sample Request

curl --location 'https://{{host}}/agentassist/api/v1/public/{{IID}}/campaign?campaignType=sms' \
--header 'auth: <token>' \
--header 'iid: st-0603182c-7ffb-53c3-b307-47ca14b9xxxx' \
--header 'accountId: 67777ce93e25326494exxxx' \
--header 'Content-Type: application/json' \
--data '{
    "name": "Billing Alert Template Campaign",
    "description": "Uses a pre-approved message template to alert customers about pending bills. Includes dynamic fields for customer name, due date, and bill amount",
    "contactLists": [
     "Renewal Due - May/June 2025"
    ],
    "campaignType": "sms",
    "priority": "5",
    "format": "simple",
    "message": {
        "template_name": "Payment Reminder Template",
        "message": "VGhpcyBpcyBhIHJlbWluZGVyIHRoYXQgeW91ciBwYXltZW50IGlzIGR1ZSBzb29uLiBQbGVhc2UgY29tcGxldGUgdGhlIHBheW1lbnQgb24gdGltZSB0byBhdm9pZCBhbnkgc2VydmljZSBpbnRlcnJ1cHRpb24uIFZpc2l0IHlvdXIgYWNjb3VudCB0byBwYXkgbm93Lg%3D%3D"
    },
    "dialingStrategy": {
        "callerId": {
            "phoneNumber": "+919876543210"
        },
        "callingHours": {
            "frequency": "WEEKLY",
            "timezone": "Asia/Kolkata",
            "days": [
                {
                    "day": "MO",
                    "start": "9:00 AM",
                    "end": "6:00 PM"
                },
                {
                    "day": "TU",
                    "start": "9:00 AM",
                    "end": "6:00 PM"
                },
                {
                    "day": "WE",
                    "start": "9:00 AM",
                    "end": "6:00 PM"
                },
                {
                    "day": "TH",
                    "start": "9:00 AM",
                    "end": "6:00 PM"
                },
                {
                    "day": "FR",
                    "start": "9:00 AM",
                    "end": "6:00 PM"
                }
            ]
        }
    },
    "schedule": {
        "isSchedulingEnabled": false
    }
}'

Headers

HeaderDescriptionRequired/Optional
authJWT token for authentication.required
iidThe Application Id.required
accountIdThe Account Id.required

Body Parameters

ParameterDescriptionType
nameName of the SMS campaign. Used for identification and reporting. Max 48 characters.string, required
descriptionDescription of the campaign’s purpose. Helpful for internal reference. Max 256 characters.string, required
contactListsList of contact list names that will receive the message. Must already exist. At least one required.array[string], required
campaignTypeType of campaign. Must be either 'voice' or 'sms'.string, required
priorityCampaign priority. Higher values indicate higher execution priority. Allowed values: 1, 2, 3, 4, 5.string, required
formatFormat of the SMS. 'simple' = plain template without personalization logic.string, required
message.template_nameName of the pre-approved message template to use.string, required
message.messageBase64-encoded message body to be sent. Should match the registered template body exactly.string (Base64), required
dialingStrategy.callerId.phoneNumberSender phone number or ID used to send SMS. Must be approved and linked to your SMS provider.string, required
dialingStrategy.callingHours.frequencyFrequency of calling hours. Allowed values: 'WEEKLY', 'DAILY', 'CUSTOM'.string, required
dialingStrategy.callingHours.timezoneTimezone used to interpret calling hours. Example: "Asia/Kolkata".string, required
dialingStrategy.callingHours.daysList of day/time ranges when messaging is allowed. Each object includes: day, start (for example, “9:00 AM”), end (for example, “6:00 PM”). Multiple blocks allowed.array[object], required

Sample Response

{
    "status": "success",
    "message": "Campaign Billing Alert Template Campaign creation in progress",
    "data": {
        "_id": "cd-d6824984-fb9c-513f-b7aa-25c355fdxxxx",
        "name": "Billing Alert Template Campaign",
        "lname": "billing alert template campaign",
        "description": "Uses a pre-approved message template to alert customers about pending bills. Includes dynamic fields for customer name, due date, and bill amount",
        "status": "Ready",
        "priority": "5",
        "dialingStrategy": {
            "callerId": {
                "phoneNumber": "+919876543210"
            },
            "callingHours": {
                "frequency": "WEEKLY",
                "timezone": "Asia/Kolkata",
                "days": [
                    {
                        "day": "MO",
                        "start": "9:00 AM",
                        "end": "6:00 PM"
                    },
                    {
                        "day": "TU",
                        "start": "9:00 AM",
                        "end": "6:00 PM"
                    },
                    {
                        "day": "WE",
                        "start": "9:00 AM",
                        "end": "6:00 PM"
                    },
                    {
                        "day": "TH",
                        "start": "9:00 AM",
                        "end": "6:00 PM"
                    },
                    {
                        "day": "FR",
                        "start": "9:00 AM",
                        "end": "6:00 PM"
                    }
                ]
            }
        },
        "message": {
            "template_name": "Payment Reminder Template",
            "message": "PHA%2BVGhpcyBpcyBhIDxzdHJvbmc%2BcmVtaW5kZXI8L3N0cm9uZz4gdGhhdCB5b3VyIHBheW1lbnQgaXMgZHVlIHNvb24uIFBsZWFzZSBjb21wbGV0ZSB0aGUgcGF5bWVudCBvbiB0aW1lIHRvIGF2b2lkIGFueSBzZXJ2aWNlIGludGVycnVwdGlvbi4gVmlzaXQgeW91ciBhY2NvdW50IHRvIHBheSBub3cuPC9wPg%3D%3D",
            "templateId": "cmt-152aa8a4-81a6-591e-aff3-d5645dafxxxx"
        },
        "createdAt": "2025-06-27T08:48:57.215Z",
        "updatedAt": "2025-06-27T08:48:57.215Z",
        "schedule": {
            "isSchedulingEnabled": false
        },
        "contactLists": [
            "Renewal Due - May/June 2025"
        ],
        "enableMachineDetect": false,
        "format": "simple"
    }
}

Response Body Parameters

ParameterDescriptionType
_idUnique identifier for the campaign.string
nameCampaign name.string
lnameLowercase version of campaign name.string
descriptionCampaign description.string
statusCurrent campaign status. For example: Ready.string
priorityCampaign priority. For example: 5string
dialingStrategyDialing configuration for the campaign.object
dialingStrategy.callerIdCaller ID configuration.object
dialingStrategy.callerId.phoneNumberCaller phone number in E.164 format.string
dialingStrategy.callingHoursAllowed calling hours.object
dialingStrategy.callingHours.frequencyFrequency of calls. Example: WEEKLY.string
dialingStrategy.callingHours.timezoneTime zone used for calling hours.string
dialingStrategy.callingHours.daysList of daily calling windows.array
dialingStrategy.callingHours.days.dayDay of the week (for example, MO, TU).string
dialingStrategy.callingHours.days.startStart time (for example, 9:00 AM).string
dialingStrategy.callingHours.days.endEnd time (for example, 6:00 PM).string
messageContains the Base64-encoded SMS content.object
message.messageBase64-encoded SMS message string.string
totalMessagesSentCount of messages sent.integer
directionCampaign format type. For example: simple.string
createdAtCampaign creation timestamp in ISO format.string
updatedAtLast update timestamp in ISO format.string
scheduleScheduling settings for the campaign.object
schedule.isSchedulingEnabledIndicates if scheduling is enabled for the campaign.boolean
contactListsList of contact list names used in the campaign.array
enableMachineDetectIndicates if machine detection is enabled (not applicable for sms).boolean
data.formatSpecifies the message format (for example, simple).string