/i/campaign/update
Enterprise
This endpoint is part of Countly Enterprise. To get access, contact sales or compare versions. Existing customers can reach the support portal with questions.
Endpoint
/i/campaign/update
Overview
Updates selected fields of an existing attribution campaign using the JSON object passed in args.
Authentication
Pass api_key or auth_token as a query parameter, or send countly-token as a header. See Authentication.
Permissions
- Attribution
Updatepermission for the target app.
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
api_key | String | Yes (or use auth_token) | Dashboard API key. |
auth_token | String | Yes (or use api_key) | Dashboard auth token. |
app_id | String | Yes | Target app ID. |
args | JSON String (Object) | Yes | Update payload. Must include _id. |
Example
/i/campaign/update?api_key=YOUR_API_KEY&app_id=6991c75b024cb89cdc04efd2&args={"_id":"campaign-summer-2026","name":"Summer 2026 Retargeting","cost":"0.75"}
Response
Success Response
{
"result": "Success"
}
Error Responses
Status Code: 200 OK
{
"result": "Campaign not found"
}
Behavior
- Parses
argsfrom JSON. - Requires
_idand updates only provided campaign fields. - Empty
name,type, orlinkvalues are discarded. - Sets
edited_atto the current Unix timestamp.
Implementation details
Database Collections
| Collection | Used for | Data touched by this endpoint |
|---|---|---|
countly.campaigns | Campaign storage | Updates an existing campaign document. |