Skip to main content
POST
/
map
/
maps
Update data for several keys
curl --request POST \
  --url https://eu-data.kameleoon.io/map/maps \
  --header 'Content-Type: application/json' \
  --header 'user-agent: <user-agent>' \
  --data '"<string>"'

Headers

user-agent
string
default:kameleoon-docs
required

Not always required. Kameleoon rejects an incoming request if the source is a bot or spider, based on IAB/ABC user-agent filtering rules. Kameleoon uses a single-pass method. You don't need to take specific action when sending requests from a web browser using a standard library (XHR). However, in other cases, set a custom value for the User-Agent request header to overwrite the default value the library sets.

Query Parameters

siteCode
string
required

The Kameleoon project ID.

ttlHours
integer<int32>
default:2208

The time-to-live in hours. The maximum value is 8784 (366 days).

Body

application/json

Save maps. The body size limit is 1 MB.

A JSON object { "<key>": <map> }, where <map> is a JSON object { "<field name>": <field value> }.

Limit every <key> to 100 characters.
Limit every <field name> to 1024 characters.

Body example with a "pretty" representation (not recommended):

{
"keyToUpdate": {
"field1": "newStringValue",
"field2": [
"newArrayValueElement1",
"newArrayValueElement2"
]
},
"keyToDelete": {
},
"someVisitorCode": {
"someMapProperty": {
"name1": 0,
"name2": [
"a",
"b",
"c"
]
},
"someBooleanProperty": true,
"someNumberProperty": 25
}
}


Body example with a "compact" representation (recommended):

{"keyToUpdate":{"field1":"newStringValue","field2":["newArrayValueElement1","newArrayValueElement2"]},"keyToDelete":{},"someVisitorCode":{"someMapProperty":{"name1":0,"name2":["a","b","c"]},"someBooleanProperty":true,"someNumberProperty":25}}

The body is of type string<UTF-8>.

Response

Kameleoon processed the URL query and accepted the request. The response returns no content.
Kameleoon processes the body asynchronously and has not checked the body syntax yet.