Skip to main content

/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 Update permission for the target app.

Request Parameters

ParameterTypeRequiredDescription
api_keyStringYes (or use auth_token)Dashboard API key.
auth_tokenStringYes (or use api_key)Dashboard auth token.
app_idStringYesTarget app ID.
argsJSON String (Object)YesUpdate 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 args from JSON.
  • Requires _id and updates only provided campaign fields.
  • Empty name, type, or link values are discarded.
  • Sets edited_at to the current Unix timestamp.
Implementation details

Database Collections

CollectionUsed forData touched by this endpoint
countly.campaignsCampaign storageUpdates an existing campaign document.