Campaign Tracking API

Get post and Campaign level (aggregated) insights, including Campaign Overview, Engagement, ROI, each post type performance, Audience Demographics, cumulative engagement rate as well as campaign reach, top comments, and sentiment analysis.

POST - Create New Campaign

This API is used for creating a new Campaign.

curl --location 'https://app.ylytic.com/ylytic/admin/api/v1/campaigns' \
--header 'Authorization: Bearer {{auth_header}}' \
--data '{
    "name": "Test Campaign - 2024", 
    "brand_name": "Test Brand"
}'

payload

ATTRIBUTES
DESCRIPTION
SAMPLE DATA

name

The name of the campaign from which insights are required.

"Test Campaign - 2025"

brand_name

The name of the brand for which the campaign is to be launched.

"Sugar"

Output (JSON)
{
    "id": "6687df09a9c8f8bbea3c0d93",
    "name": "Test Campaign - 2024",
    "brand_name": "Test Brand",
    "brand_url": null,
    "cost_of_campaign": null,
    "custom_field_name": null,
    "custom_field_value": null,
    "campaign_tracking_interval": 24,
    "threshold_er": null,
    "threshold_reach": null,
    "tracking_urls": [],
    "tracking_details": {},
    "shortlinks": {},
    "post_costs": {},
    "insights_link": "https://insights.ylytic.com/storyCampaign?id=6687df09a9c8f8bbea3c0d93",
    "tracking_expiry_at": "Sun, 04 Aug 2024 11:54:49 GMT",
    "status": "Yet to start",
    "next_tracking_at": null,
    "hashtags": [],
    "show_shortlinks": false,
    "show_post_costs": false
}

PUT - Update Existing Campaign

This API is used for adding post URL's to the campaign, brand logo, and campaign cost, short links, individual post costs in the created campaign.

payload

ATTRIBUTES
DESCRIPTION
SAMPLE DATA

tracking_urls

URLs of the posts that are to be tracked.

["https://www.instagram.com/p/C5xojT2yMyd/","https://www.youtube.com/shorts/hMqpW_oTeaQ"]

brand_url

brand_url refers to the URL of the brand's website.

"https://www.ylytic.com/assets/img/brand/ylytic-logo.svg"

name

campaign name

"Sugar Campaign"

cost_of_campaign

cost_of_campaign denotes the total cost of the campaign.

12000

custom_field_name

Name of the custom field

"sub-category"

custom_field_value

value of the custom field

"lipstick"

tracking_expiry_at

used for extend campaign tracking. Next tracking date should be multiple of 30 days from current expiry.

"2025-11-07"

Output (JSON)

PATCH - Add/Remove Campaign Posts

This API is used to add or delete posts to the created campaign.

payload

ATTRIBUTES
DESCRIPTION
SAMPLE DATA

add_tracking_urls

add_tracking_url is used for adding the URL of social media posts created by the creator.

["https://www.instagram.com/p/CmjTS_Npakm/"]

remove_tracking_urls

add_tracking_url is used for removing the URL of social media posts created by the creator.

["https://www.instagram.com/p/C5xojT2yMyd/"]

Output (JSON)

GET - Get Campaign Insights

This API is used to get insights of the campaign explained in the campaign insights section

Output (JSON)

Last updated