Authenticate with the Marketing Cloud OAuth 2.0 client credentials flow and obtain both the access token and the REST base URL from the token response.
Identify the external key of the target Data Extension from the Marketing Cloud UI or via the asset REST API.
Upsert a single row by sending PUT {rest_base_url}/data/v1/customobjectdata/key/{data_extension_key}/rowset with a JSON body containing the row's field values — PUT will insert the row if the primary key is absent or update it if it exists.
To upsert multiple rows in one call, include an items array in the request body, each element representing one row's key-value field pairs.
Verify the upsert by querying the row with GET using the same endpoint path appended with the primary key value, and confirm the returned fields match what was sent.
Known gotchas
The primary key field of the Data Extension must be included in every upsert payload — omitting it causes the request to fail with a 400 error.
Data Extension external keys are distinct from internal object IDs; using an internal ID in the URL path will return a 404.
Synchronous upserts for very large row sets may time out — for bulk loads, consider the asynchronous Data Extension Rows API at /data/v1/async/dataextensions/.
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp