Version 1.2


Campaigns' folders


Create a new folder


Request Parameters:
Name Example Value Default Value Description Type Data Type Required
name My Best Folder null Folder name body string(100)
note Note null Campaign note body string(100)
parent_id 89dae0a6-14fe-c46c-cc4b-95440e95c1a0 null Parent folder ID body string(38)
campaigns empty Campaigns body array
campaigns: campaign_id 89dae0a6-14fe-c46c-cc4b-95440e95c1a0 null Campaign ID body string(38)
Request Example:
{
    "name": "My Best Campaign",
    "note": "Note",
    "campaigns": [
        "676165f8-f8cc-e490-3a45-5e904a482b34",
        "e2a05de0-6f47-cfb2-2289-601957bbcb53",
        "676165f8-f8cc-e490-3a45-5e904a482b34"
    ]
}
Example Request URL:
https://api.clevermonitor.com/v1.2/campaigns/folders
Response Parameters:
Name Data Type Reference Description
folder_id string(38) Folder ID
name string(50) Folder name
parent_id string(38) Parent folder ID
count_campaigns integer(4) Campaigns count
create_time ISO8601 Timestamp of creation
campaigns array Campaigns in folder
campaigns: campaign_id string(38) Campaign ID
campaigns: record_status integer(3) record_status Record status
Response Messages:
Code Status Example Body
201 OK
{
    "folder_id": "7dc878dd-c774-7453-850e-6831d158d04f",
    "name": "My Best Folder",
    "note": "Note",
    "create_time": "2016-05-13T09:11:46+02:00",
    "count_campaigns": 2,
    "campaigns": [
        {
            "campaign_id": "676165f8-f8cc-e490-3a45-5e904a482b34",
            "record_status": 204
        },
        {
            "campaign_id": "e2a05de0-6f47-cfb2-2289-601957bbcb53",
            "record_status": 204
        },
        {
            "campaign_id": "676165f8-f8cc-e490-3a45-5e904a482b34",
            "record_status": 291
        }
    ]
}

Campaign folders overview


Request Parameters:
Name Example Value Default Value Description Type Data Type Required
count 100 100 Record limit query integer
offset 0 0 Record offset query integer
Example Request URL:
https://api.clevermonitor.com/v1.2/campaigns/folders?count=100&offset=10
Response Parameters:
Name Data Type Reference Description
folder_id string(38) Folder ID
name string(50) Folder name
create_time ISO8601 Timestamp of creation
parent_id string(38) Parent folder ID
count_campaigns integer(4) Count of campaigns
Response Messages:
Code Status Example Body
200 OK
[
    {
        "folder_id": "root",
        "name": "Main Folder",
        "parent_id": null,
        "note": null,
        "create_time": null,
        "count_campaigns": 82
    },
    {
        "folder_id": "386d0815-885d-d18a-a9e9-4e723a521b63",
        "name": "Example Folder",
        "parent_id": null,
        "note": "Example Note",
        "create_time": "2016-02-29T11:33:09+01:00",
        "campaigns_count": 4
    }
]

Detail of a folder


Request Parameters:
Name Example Value Default Value Description Type Data Type Required
folder_id 386d0815-885d-d18a-a9e9-4e723a521b63 null Folder ID path string(38)
Example Request URL:
https://api.clevermonitor.com/v1.2/campaigns/folders/root
Response Parameters:
Name Data Type Reference Description
folder_id string(38) Folder ID
name string(50) Folder name
parent_id string(38) Parent folder ID
create_time ISO8601 Timestamp of creation
count_campaigns integer(4) Count of campaigns
campaigns array Campaigns in folder
campaigns: campaign_id string(38) Campaign ID
campaigns: title string(100) Campaign title
campaigns: content_type integer(3) content_type Content type
campaigns: status integer(3) campaign_status Campaign status
Response Messages:
Code Status Example Body
200 OK
{
    "folder_id": "root",
    "name": "Main Folder",
    "parent_id": null,
    "note": null,
    "create_time": null,
    "count_campaigns": 1,
    "campaigns": [
        {
            "campaign_id": "a8fdf423-b731-0e86-4da0-70885dae99ce",
            "title": "Example Campaign",
            "content_type": 3,
            "status": 1
        }
    ]
}

Edit a folder


Request Parameters:
Name Example Value Default Value Description Type Data Type Required
folder_id 386d0815-885d-d18a-a9e9-4e723a521b63 null Folder ID path string(38)
name My Best Folder null Folder name body string(100)
note Note null Folder note body string(100)
parent_id 89dae0a6-14fe-c46c-cc4b-95440e95c1a0 null Parent folder ID body string(38)
campaigns empty Campaigns body array
campaigns: campaign_id 89dae0a6-14fe-c46c-cc4b-95440e95c1a0 null Campaign ID body string(38)
Request Example:
{
    "name": "My Best Campaign",
    "note": "Note",
    "campaigns": [
        "676165f8-f8cc-e490-3a45-5e904a482b34",
        "e2a05de0-6f47-cfb2-2289-601957bbcb53",
        "676165f8-f8cc-e490-3a45-5e904a482b34"
    ]
}
Example Request URL:
https://api.clevermonitor.com/v1.2/campaigns/folders/89dae0a6-14fe-c46c-cc4b-95440e95c1a0
Response Parameters:
Name Data Type Reference Description
folder_id string(38) Folder ID
name string(50) Folder name
parent_id string(38) Parent folder ID
count_campaigns integer(4) Count of campaigns
create_time ISO8601 Timestamp of creation
campaigns array Campaigns in folder
campaigns: campaign_id string(38) Campaign ID
campaigns: record_status integer(3) record_status Record status
Response Messages:
Code Status Example Body
200 OK
{
    "folder_id": "7dc878dd-c774-7453-850e-6831d158d04f",
    "name": "My Best Folder",
    "note": "Note",
    "create_time": "2016-05-13T09:11:46+02:00",
    "count_campaigns": 2,
    "campaigns": [
        {
            "campaign_id": "676165f8-f8cc-e490-3a45-5e904a482b34",
            "record_status": 204
        },
        {
            "campaign_id": "e2a05de0-6f47-cfb2-2289-601957bbcb53",
            "record_status": 204
        },
        {
            "campaign_id": "676165f8-f8cc-e490-3a45-5e904a482b34",
            "record_status": 291
        }
    ]
}

Delete a folder


Request Parameters:
Name Example Value Default Value Description Type Data Type Required
folder_id 386d0815-885d-d18a-a9e9-4e723a521b63 null Folder ID path string(38)
delete_campaigns true false Deletes campaigns in this folder body boolean
delete_children true false Deletes subfolders of this folder body boolean
Request Example:
{
    "delete_campaigns": true
}
Example Request URL:
https://api.clevermonitor.com/v1.2/campaigns/folders/89dae0a6-14fe-c46c-cc4b-95440e95c1a0
Response Messages:
Code Status Example Body
200 OK
{
    "folder_id": "386d0815-885d-d18a-a9e9-4e723a521b63",
    "message": "The folder was deleted successfully."
}

Copyright © CleverMonitor, 2017