The Manage panel atDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Priyanshu471/ad-management/llms.txt
Use this file to discover all available pages before exploring further.
/admin/manage is the planned administrative hub for campaign oversight on the Ad Management System. In its current state the route renders a placeholder. The REST API layer that will power this panel — for retrieving all campaigns, updating campaign fields, and deleting campaigns — is fully implemented and ready to consume.
Route
Current Implementation
The page component currently renders a single placeholder element:Campaign API Endpoints
The following endpoints are defined inapp/api/campaign/route.ts and are available for the Manage UI to consume:
List all campaigns
Update a campaign
title (prevTitle) and applies the supplied field updates. All fields are optional except prevTitle, which is used as the lookup key:
Delete a campaign
id:
{ "message": "Campaign deleted permanently" } on success.
Campaign Status Values
Each campaign document carries astatus field set to "Active" by default when created. The possible values and their meanings are:
| Status | Description |
|---|---|
Active | Default state — campaign is running |
Live | Campaign is live and being promoted |
End | Campaign has concluded |
Deleted | Removed from the platform via the DELETE endpoint |
PATCH /api/campaign endpoint by passing the desired value in the status field.
The
PATCH endpoint locates campaigns by title (via prevTitle), not by _id. If two campaigns share the same title, findOneAndUpdate will match only the first document found. A future iteration of the Manage UI should switch the lookup key to _id to avoid ambiguity.