Adobe Target AB Activity REST API does not round-trip additional metric configuration used by the UI | Community
Skip to main content
Level 2
April 17, 2026
Solved

Adobe Target AB Activity REST API does not round-trip additional metric configuration used by the UI

  • April 17, 2026
  • 6 replies
  • 111 views

I’m seeing a mismatch between the public Adobe Target Admin API for AB activities and the Adobe Target UI.

The issue is that additional metric configuration shown in Goals & Settings is not fully available in the public REST activity model.

Observed behavior

For additional metrics in the UI, Adobe Target stores extra per-metric state such as:

  • whether the metric is `conversion`, `engagement`, or `revenue`
  • for conversion metrics, the selected action such as:
    • `Viewed a page`
    • Viewed an mbox`
    • `Clicked on Mbox`

In the browser editor model, this appears as a separate structure like:

"successCriteria": [
  { "metricLocalId": 32767, "successCriteria": "conversion" },
  { "metricLocalId": 1100, "successCriteria": "engagement" },
  { "metricLocalId": 1027, "successCriteria": "conversion" }
]

But the public REST API does not expose this field:

GET /{tenant}/target/activities/ab/{id}

and also rejects it on update:

{
  "errorCode": "InvalidProperty.Json",
  "message": "Invalid Json. Unrecognized property name 'successCriteria'."
}

Why this is a problem

A metric can be configured and valid in the Target UI, but after a REST pull / REST push cycle the public activity representation is incomplete and broken.

Example: an additional metric that was configured in the UI later came back from the REST API as:

{
  "metricLocalId": 1027,
  "name": "Purchases from Specific Users",
  "mboxes": [],
  "clickTrackSelectors": []
}

So the public API no longer contains enough information to recreate the same UI state.

Minimal repro

  1. Create or edit an AB activity in the UI.
  2. Add an additional metric in Goals & Settings and configure it as:
  •    `Conversion`
  • `Viewed an mbox`
  • choose an mbox

3. Save the activity in the UI.
4. Fetch the activity via REST:

curl -s \
  -H "Authorization: Bearer $TOKEN" \
  -H "x-api-key: $API_KEY" \
  -H "Content-Type: application/vnd.adobe.target.v3+json" \
  "https://mc.adobe.io/$TENANT/target/activities/ab/$ACTIVITY_ID"

5. Observe that the response does not include any public field corresponding to the UI’s metric type selection (`conversion` / `engagement` / `revenue`) such as `successCriteria`.
6. Try to send that field back in a REST update:

curl -s -X PUT \
  -H "Authorization: Bearer $TOKEN" \
  -H "x-api-key: $API_KEY" \
  -H "Content-Type: application/vnd.adobe.target.v3+json" \
  --data '{
    "name": "API repro",
    "successCriteria": [
      { "metricLocalId": 1027, "successCriteria": "conversion" }
    ]
  }' \
  "https://mc.adobe.io/$TENANT/target/activities/ab/$ACTIVITY_ID"

7. REST rejects the field as unknown.

Question

Is the public Admin API expected to fully round-trip AB activity additional metrics created in the UI?

If yes, which documented public field corresponds to the UI’s per-metric type/state?

If no, then the public REST API currently cannot fully preserve AB additional metric configuration used by Goals & Settings.

Best answer by BENE

I was able to send a request that shows up well in the UI by building examples and round tripping the payload. I would expect the API to reject invalid payloads that lead to a broken UI though.

6 replies

BENEAuthor
Level 2
April 17, 2026
BENEAuthor
Level 2
April 17, 2026
Level 3
April 24, 2026

Hi ​@BENE,

 

The Target Admin API and the Target UI essentially speak two different "dialects" of the same logic. You are seeing this mismatch because the public REST API (v3) is designed to handle the functional delivery of a test, whereas the UI stores extra "presentation" data to make the Goals & Settings wizard look pretty.

Here is why the 404/Invalid Property error is happening and how to fix it:

1. The successCriteria Field is Internal-Only

The property you found in the browser debugger (successCriteria) belongs to the Private UI API.

  • The Problem: The Public REST API does not recognize this field. When you try to PUT it, the API gateway rejects it because it’s not in the official schema.

  • The Consequence: This is why your round-trip "breaks." You are pulling a simplified model and trying to push back a complex one that the API doesn't support.

2. How the API Defines Metric Types

In the public REST model, a metric’s "type" (Conversion, Engagement, Revenue) is inferred from the presence of specific properties rather than a single label.

UI Goal Type API Implementation Requirement
Conversion Must have mboxes or clickTrackSelectors populated.
Revenue Must have the unit property set to revenue.
Engagement Usually relies on viewedPages or a default count unit.

When your GET call returned "mboxes": [], it stripped the "Conversion" logic. If you PUT that same empty array back, the UI has no data to map to, so it displays the metric as unconfigured or "broken."

3. The Solution: "Hydrate" the Metrics

To successfully round-trip an activity without breaking the UI, you must manually populate the functional fields that the UI uses to "guess" the metric type.

Instead of sending successCriteria, send a fully-formed metrics object:

JSON

 

"metrics": [
{
"metricLocalId": 1027,
"name": "Purchases from Specific Users",
"mboxes": ["your_mbox_name"], // MUST NOT BE EMPTY
"unit": "count" // Tells Target to treat it as a conversion count
}
]

4. Is the Admin API "Incomplete"?

To answer your question directly: Yes. The public Admin API is not currently a "perfect mirror" of the UI.

  • The Intent: The API is designed for Activity Management (activating, renaming, scheduling).

  • The Gap: Deep Goals & Settings parity—specifically the metadata that tracks how a metric was selected (e.g., the "Viewed an mbox" dropdown state)—is not fully exposed in the public v3 schema.

BENEAuthor
Level 2
April 24, 2026

Seems like unit is not a real field:

 

curl -X PUT \
"https://mc.adobe.io/<tenant>/target/activities/ab/<activity_id>" \
-H "Authorization: Bearer <REDACTED>" \
-H "X-Api-Key: <REDACTED>" \
-H "Content-Type: application/vnd.adobe.target.v3+json" \
-H "Accept: application/vnd.adobe.target.v3+json" \
-d '{
"id": <activity_id>,
"name": "Untitled Activity <timestamp>",
"state": "saved",
"priority": 0,
"options": [
{
"optionLocalId": 0,
"name": "Default Content",
"offerId": 0,
"offerTemplates": []
}
],
"locations": {
"mboxes": [
{
"locationLocalId": 0,
"name": "adobeQA",
"audienceIds": []
}
],
"selectors": []
},
"experiences": [
{
"experienceLocalId": 0,
"name": "Experience A",
"audienceIds": [],
"visitorPercentage": 100,
"optionLocations": [
{
"locationLocalId": 0,
"optionLocalId": 0
}
]
}
],
"metrics": [
{
"metricLocalId": 3,
"name": "ADDITIONAL GOAL 1",
"mboxes": [
{
"name": "pageview_home",
"successEvent": "mbox_shown"
}
],
"clickTrackSelectors": [],
"unit": "count"
},
{
"metricLocalId": 4,
"name": "ADDITIONAL GOAL 2",
"engagement": "time_on_site",
"mboxes": [
{
"name": "adobeQA",
"successEvent": "mbox_shown"
},
{
"name": "target-global-mbox",
"successEvent": "mbox_shown"
}
],
"clickTrackSelectors": []
},
{
"metricLocalId": 5,
"name": "ADDITIONAL GOAL 3",
"mboxes": [
{
"name": "target-global-mbox",
"successEvent": "mbox_shown",
"audienceIds": [
<audience_id>
]
}
],
"clickTrackSelectors": []
},
{
"metricLocalId": 32767,
"name": "MY PRIMARY GOAL",
"conversion": true,
"action": {
"type": "count_once"
},
"mboxes": [],
"clickTrackSelectors": []
}
],
"reportingAudiences": [],
"reportingSource": "target",
"workspace": "<workspace_id>",
"propertyIds": [
<property_id>
],
"createdAt": "<created_at>",
"modifiedAt": "<modified_at>",
"modifiedByName": "<user_name>"
}'

recieves:

 

{
"httpStatus": 400,
"requestId": "<request_id>",
"requestTime": "<timestamp>",
"errors": [
{
"errorCode": "InvalidProperty.Json",
"message": "Invalid Json. Unrecognized property name 'unit'. Location: line - 1, column - <column>.",
"meta": {
"propertyName": "unit",
"line": 1,
"column": <column>
}
}
]
}

 

BENEAuthor
Level 2
April 24, 2026

Would it be possible to improve the Adobe Target API documentation and close some of the current gaps in API coverage?

For example, in the activity update API, some fields are either missing or insufficiently described. A concrete case is the unit field, which does not appear to be documented properly here:

This makes the API difficult to use reliably, because implementation ends up depending on trial and error rather than on a clear contract.

I was able to work around some of these issues myself and submitted a few documentation improvements here:

https://developer.adobe.com/target/administer/admin-api/#tag/Activities/operation/updateActivity_3
https://github.com/AdobeDocs/target-developers/blob/main/src/admin-api.json

But there still seem to be broader gaps that would be very valuable to address, for example:
 

 

 

This is especially important now that more teams are using AI/LLM-assisted tooling for implementation and operations. Those workflows depend heavily on APIs being well-documented, predictable, and fully supported. When fields are undocumented or behavior does not round-trip cleanly between API and UI, automation becomes fragile very quickly.

So from my perspective, the request is not only for better docs, but for stronger overall API support as a product investment. 

Is there any roadmap or planned work in this area?

Level 3
April 27, 2026

Hey ​@BENE ,

 

I’ve been digging deeper into the InvalidProperty.Json error you received for the unit field. It turns out I steered you slightly wrong earlier by including that property, and I want to clarify why that happened so we can fix the automation.

The Adobe Target Admin API behaves inconsistently: it is 'Asymmetric.' When you perform a GET, the API outputs internal metadata like unit and successCriteria to give you context. However, the PUT validator is strictly mapped to a sanitized OpenAPI schema that doesn't actually include those fields.

Essentially, the API hands you a key in the GET that it won't let you use to unlock the door in the PUT.

The Fix: To get the PUT call to succeed and satisfy the validator, we need to strip out all 'Read-Only' metadata that isn't part of the official public contract.

  1. Remove unit: count — Target doesn't need this label; it automatically infers that the metric is a 'Count' because of the mbox_shown event in your mboxes array.

  2. Remove system fields: Strip modifiedAt, createdAt, and modifiedByName.

  3. Ensure 'Hydrated' Mboxes: As long as the mboxes array contains a valid name and successEvent, the UI will correctly reconstruct the 'Goals & Settings' view on the next load.

By removing these 'Radioactive' fields that the gateway rejects, your payload will pass validation while maintaining full functional integrity in the Target UI.

Level 1
April 28, 2026

Thanks. Can you give me a recipe for cookies.

BENEAuthorAccepted solution
Level 2
May 5, 2026

I was able to send a request that shows up well in the UI by building examples and round tripping the payload. I would expect the API to reject invalid payloads that lead to a broken UI though.

Level 3
May 6, 2026

The core of the mismatch between the Adobe Target Admin API and the Target UI lies in the fact that the API gateway uses a strict OpenAPI (Swagger) schema for validation, while the UI relies on extra internal "metadata" to render its Goal & Settings wizard.

To successfully round-trip an activity without a 400 Bad Request or a "broken" UI, you must follow a "Clean & Hydrate" strategy.

The Solution: Sanitized JSON Payload

You must strip out all fields that the Public API considers "Read-Only" or "Internal," and ensure the functional triggers (mboxes) are explicitly defined.

JSON

 

{
"name": "Updated Activity Name",
"state": "saved",
"priority": 0,
"options": [
{
"optionLocalId": 0,
"name": "Default Content",
"offerId": 0
}
],
"metrics": [
{
"metricLocalId": 3,
"name": "ADDITIONAL GOAL 1",
"mboxes": [
{
"name": "pageview_home",
"successEvent": "mbox_shown"
}
],
"clickTrackSelectors": []
},
{
"metricLocalId": 32767,
"name": "MY PRIMARY GOAL",
"mboxes": [
{
"name": "target-global-mbox",
"successEvent": "mbox_shown"
}
],
"clickTrackSelectors": []
}
],
"reportingSource": "target"
}

Technical Root Cause & Fixes

1. Remove "Radioactive" Fields (The 400 Error)

The API gateway rejects fields that aren't in the official public contract. Before performing a PUT, you must delete the following from your JSON:

  • unit

  • successCriteria

  • conversion (at the metric level)

  • createdAt / modifiedAt / modifiedByName

2. Functional Inference (The UI Logic)

You do not need to tell the API that a metric is a "Count" or "Revenue" type. Target infers the unit and success criteria based on the successEvent inside the mboxes array:

  • mbox_shown $\rightarrow$ UI automatically renders as Conversion (Count).

  • order_total $\rightarrow$ UI automatically renders as Revenue.

3. Mbox Hydration (Fixing the Broken UI)

The reason the UI state appears incomplete after a REST push is usually because the mboxes array was empty or missing. For the UI to "reconstruct" the Goals & Settings view, it requires a functional trigger. By providing the name and successEvent in the mboxes array, the UI has the necessary "hook" to display the configuration correctly.