Skip to content

Campaign management

Use the Advertiser API to list, inspect, update, and change the status of campaigns owned by the authenticated Nexus member.

ItemValue
Base URLhttps://example.com/api/v1
AuthenticationNexus member access JWT or the secure member session
OwnershipThe backend derives the advertiser UID from the authenticated member
Update modelRead the complete campaign, modify it, and send the complete object back

Member authentication is different

These routes do not accept a Search/XML publisher API key. Use the member access token returned by the Nexus tenant backend:

http
Authorization: Bearer MEMBER_ACCESS_TOKEN

Endpoints at a glance

MethodEndpointPurpose
GET/login/campaigns/campaignsList campaigns owned by the member
GET/login/campaigns/{cid}Load the complete editable campaign and tenant validation settings
PUT/login/campaigns/{cid}Validate and update one owned campaign
PUT/login/campaigns/update-statusChange the status of one or more owned campaigns

The examples below assume:

bash
export NEXUS_BACKEND="https://example.com/api/v1"
export MEMBER_ACCESS_TOKEN="YOUR_MEMBER_ACCESS_TOKEN"

List campaigns

http
GET /login/campaigns/campaigns

Query parameters

ParameterRequiredDescription
pageNoPage number, starting from 1. Default: 1.
perPageNoRows per page from 1 to 200. Default: 20.
sortNoField used by the Nexus campaign table, for example cid or name.
orderNoasc or desc. Default: desc.
queryNoText searches campaign names; a numeric value matches an exact CID.
statusNoCampaign status code from 0 to 4.
typesNoRepeat the parameter to include multiple enabled Nexus campaign types.

Request example

bash
curl --get "$NEXUS_BACKEND/login/campaigns/campaigns" \
  --header "Authorization: Bearer $MEMBER_ACCESS_TOKEN" \
  --data-urlencode "page=1" \
  --data-urlencode "perPage=20" \
  --data-urlencode "query=summer" \
  --data-urlencode "status=1" \
  --data-urlencode "types=48" \
  --data-urlencode "types=64"

Response example

json
{
  "status": "success",
  "message": "Feeds data retrieved successfully",
  "data": {
    "data": [
      {
        "cid": 123,
        "uid": 451,
        "type_name": "Push Ads (CPC)",
        "name": "Summer Push US",
        "website": "",
        "geo": ["US"],
        "payout": 0.03,
        "d_revenue": 200,
        "t_revenue": 2000,
        "daily_budget": 75.42,
        "total_budget": 910.18,
        "bid_control_count": 2,
        "status": 1,
        "status_name": "Active"
      }
    ],
    "total": 1,
    "currentPage": 1,
    "totalPages": 1
  }
}

Only the member's campaigns are returned. Supplying a UID for another advertiser does not expand access.

Get campaign edit data

http
GET /login/campaigns/{cid}

Always call this endpoint immediately before editing. It returns three objects:

  • campaign — the complete current campaign payload;
  • campaign_types — enabled types with the tenant's pricing and bid limits;
  • settings — tenant features and validation settings such as minimum budget and bid-control availability.

Request example

bash
curl "$NEXUS_BACKEND/login/campaigns/123" \
  --header "Authorization: Bearer $MEMBER_ACCESS_TOKEN"

Response example

json
{
  "status": "success",
  "message": "Found campaign",
  "data": {
    "campaign": {
      "cid": 123,
      "uid": 451,
      "name": "Summer Push US",
      "type": 48,
      "status": 1,
      "payout": 0.03,
      "clickurl": "https://advertiser.example/landing?click_id=[clickid]",
      "title": "Your daily offer",
      "description": "Open the offer and see today's available promotion.",
      "icon": { "url": "https://cdn.example.com/push/icon.png" },
      "image": { "url": "https://cdn.example.com/push/image.jpg" },
      "enable_budget": 1,
      "d_revenue": 200,
      "t_revenue": 2000,
      "geo_enabled": 0,
      "geo": ["US"],
      "os_enabled": 1,
      "os": [],
      "devices_enabled": 1,
      "devices": [],
      "bidControl": []
    },
    "campaign_types": {
      "48": {
        "name": "Push Ads",
        "pricing": "CPC",
        "minBid": 0.01,
        "maxBid": 5
      }
    },
    "settings": {
      "enable_bidcontrol": true,
      "enable_freq_cap": true,
      "enable_traffic_speed": true,
      "edit_clickurl": true,
      "min_budget": 10,
      "postbackurl": "https://example.com/postback"
    }
  }
}

Treat returned settings as authoritative

Campaign types, bid limits, minimum budgets, and enabled features can differ between Nexus tenants. Do not hard-code the example values.

Update a campaign

http
PUT /login/campaigns/{cid}

The member UI and API use a read-modify-write flow. The backend validates the complete payload against the selected campaign type and tenant settings.

Step 1: read the latest version

bash
curl "$NEXUS_BACKEND/login/campaigns/123" \
  --header "Authorization: Bearer $MEMBER_ACCESS_TOKEN"

Take the data.campaign object from this response.

Step 2: change only the intended values

For example, change the bid and daily budget while preserving the remaining fields:

json
{
  "cid": 123,
  "uid": 451,
  "name": "Summer Push US",
  "type": 48,
  "status": 1,
  "payout": 0.04,
  "clickurl": "https://advertiser.example/landing?click_id=[clickid]",
  "title": "Your daily offer",
  "description": "Open the offer and see today's available promotion.",
  "icon": { "url": "https://cdn.example.com/push/icon.png" },
  "image": { "url": "https://cdn.example.com/push/image.jpg" },
  "enable_budget": 1,
  "d_revenue": 250,
  "t_revenue": 2000,
  "enable_time": 0,
  "enable_shedule": 0,
  "shedule": [],
  "freq_cap": 0,
  "freq_counter": 1,
  "traffic_speed": 0,
  "traffic_speed_counter": 0,
  "geo_enabled": 0,
  "geo": ["US"],
  "os_enabled": 1,
  "os": [],
  "os_versions_enabled": 1,
  "os_versions": [],
  "browsers_enabled": 1,
  "browsers": [],
  "browser_versions_enabled": 1,
  "browser_versions": [],
  "devices_enabled": 1,
  "devices": [],
  "keywords_enabled": 1,
  "keywords_whitelist": "",
  "keywords_blocklist": "",
  "bidControl": []
}

Step 3: submit the complete object

bash
curl --request PUT "$NEXUS_BACKEND/login/campaigns/123" \
  --header "Authorization: Bearer $MEMBER_ACCESS_TOKEN" \
  --header "Content-Type: application/json" \
  --data @campaign-123.json

Successful response:

json
{
  "status": "success",
  "message": "Campaign updated successfully"
}

Step 4: re-read and verify

Call GET /login/campaigns/123 again and confirm the persisted bid, budget, targeting, and status.

Complete update payload required

Do not build an update from a cached list row or a hand-written subset. A list row is not an editable campaign. Omitting conditional settings can reset values or fail validation.

Campaign field groups

Identity and pricing

FieldRequirementDescription
cidReturned by GETCampaign ID. The path CID remains authoritative during an update.
uidRequiredAdvertiser owner. Member requests cannot use it to update another account.
nameRequiredCampaign name, maximum 255 characters.
typeRequiredAn enabled key from campaign_types.
statusRequiredStatus code 0 through 4.
payoutRequiredBid within the selected type's returned minBid and maxBid.
clickurlCPC/CPVHTTP(S) destination; Nexus URL macros are allowed.
websiteCPMAdvertiser's primary ad domain as a valid HTTP(S) URL.

Creative fields

FieldApplies toRule
titleContextual and PushRequired, maximum 25 characters.
descriptionContextual and PushRequired, maximum 75 characters.
iconPushRequired image object returned by Nexus.
imagePushRequired main image object returned by Nexus.

Budget, dates, and delivery

FieldDescription
enable_budgetEnables daily and total campaign budgets.
d_revenueDaily budget; must satisfy settings.min_budget when budgeting is enabled.
t_revenueTotal budget; 0 means unlimited, otherwise it must satisfy the tenant minimum.
enable_timeEnables the start/end date window.
create, create_timeStart date and time. Required when the time window is enabled.
expire, expire_timeEnd date and time. The end cannot precede the start.
enable_sheduleEnables the weekly delivery schedule. The spelling is part of the existing API.
sheduleWeekly schedule returned by Nexus; preserve all 168 hourly values.
shedule_timezoneRequired when the weekly schedule is enabled.
freq_cap, freq_counterFrequency-cap mode and positive counter when required by the type/settings.
traffic_speed, traffic_speed_counterTraffic pacing; when enabled, the counter must be a whole number of at least 1000.

Targeting selectors

The current API uses a selector flag together with an array:

  • a selector flag of 1 means all available values and the backend normalizes the array to [];
  • a selector flag of 0 means custom targeting and requires at least one selected array value.
FlagValuesDimension
geo_enabledgeoCountries
os_enabledosOperating systems
os_versions_enabledos_versionsOS versions
browsers_enabledbrowsersBrowsers
browser_versions_enabledbrowser_versionsBrowser versions
devices_enableddevicesDevice types
categories_enabledcategoriesCPM categories
lang_enabledlangCPM languages
connection_enabledconnectionCPM connection types, except Popunder types
traffic_type_enabledtraffic_typeCPM traffic types, except Popunder types
exchanges_enabledexchangesCPM exchanges; values are positive numeric IDs

Traffic filters such as IP, domain, publisher, site/app, SSP, bundle ID, carrier, and keyword allow/block lists must be copied from the latest GET response unless you intentionally change them.

Bid controls

bidControl is available only when settings.enable_bidcontrol is true and the pricing model is CPC or CPV. Preserve the complete array and its backend-provided objects when editing unrelated fields.

Update campaign status

http
PUT /login/campaigns/update-status

Pause one campaign

bash
curl --request PUT "$NEXUS_BACKEND/login/campaigns/update-status" \
  --header "Authorization: Bearer $MEMBER_ACCESS_TOKEN" \
  --header "Content-Type: application/json" \
  --data '{"ids":[123],"status":3}'

Activate several campaigns

json
{
  "ids": [123, 124, 125],
  "status": 1
}
StatusMeaningMember behavior
0PendingMembers cannot approve or reject pending campaigns.
1ActiveRequires at least $1.00 available advertiser balance.
2SuspendedUsed by the member UI as removal/suspension.
3PausedStops delivery without suspending the campaign.
4ScheduledCampaign follows its configured start/schedule settings.

Errors and safe recovery

StatusTypical causeWhat to do
400Invalid operation or backend business rule.Read message, reload the campaign, and correct the request.
401Missing or expired member authentication.Obtain a new member access token.
402Insufficient balance while activating.Fund the advertiser account before retrying.
403Foreign campaign, wrong role, or forbidden operation.Confirm member ownership and permissions.
404CID missing or not owned by this member.Do not retry an unverified CID.
422Field-level campaign validation failed.Use the returned validation details and the current tenant settings.

Never retry a failed PUT with fewer fields. Reload the campaign, apply the intended changes again, and submit a newly validated complete payload.

Interactive API reference

Use the Advertiser OpenAPI reference to inspect schemas and responses. The workflow and conditional rules on this page remain the authoritative integration guide.

White-label Nexus API documentation