Create Campaign

Create A Campaign

POST {{URL}}/api/v1/campaign

This endpoint allows the admin user to create a campaign. NOTE: end_date must be greater than start_date, else, there will be an error in the creation of a campaign.

Headers

Name
Type
Description

Authentication

string

Authentication token of the user creating a campaign.

Request Body

Name
Type
Description

name

string

Name of campaign

start_date

string

Enter the start_date of the campaign

end_date

string

Enter the end_date of the campaign

{
    "status": "success",
    "message": "Campaign created successfully",
    "results": 1,
    "data": {
        "status": "created",
        "_id": "60b0be9bebb00b379c4ac7b9",
        "name": "Culture",
        "startDate": "2021-07-03T23:00:00.000Z",
        "endDate": "2021-12-06T23:00:00.000Z",
        "__v": 0
    }
}

Last updated

Was this helpful?