Table of Contents

Send notification to users using API:

NOTE: In case of a new user (i.e. the user doesn’t exist on your contact list in AiSensy Platform) then a new contact will get created with the incoming details.

HTTP Request

POST https://backend.aisensy.com/campaign/t1/api

Request Body

The request body contains data with the following structure:

JSON Representation

{
apiKey: string,
campaignName: string,
destination: string,
userName: string,
source: string,
media: {
url: string,
filename: string
},
templateParams: [
string
], tags: [
string
]
}

Fields

Description

apiKey

string

Required. API key generated from the dashboard.

campaignName

string

Required. Name of the campaign which has to be sent to the user. The status of the campaign should be ‘Live’.

destination

string

Required. Mobile number of users with country dial-code to whom the campaign has to be sent.
e.g. – 917428526285 (India)

userName

string

Required Name of the user to whom campaign has to be sent.

source

string

Optional. Source of lead. It is to create a source-based segment to re-target.
e.g.- ‘Facebook forms’, ‘Website lead’, ‘Youtube lead’

media

object

Optional. URL & filename of media that has to be sent with the template message.

templateParams[]

string

Optional. An array of parameter values to fill in a template message

tags[]

string

Optional. An array of tag names to assign to the user.

NOTE: templateParams and media are optional if your template message doesn’t have parameters or doesn’t require any media to be sent (i.e. Text type ).

Response Body

If successful, the response body will return a status of 200.


👈🏻 How To Setup API Campaigns Active, Requesting and Intervened Chats👉🏼

Did this answer your question?