POST /customers/:id/attributes

Assigns the specified customer a collection of custom non-standard attributes. These attributes are displayed on the Invisible Collector site and can later be used to customize the notifications sent to this customer.

Common use cases may include:

New attributes will be added. Existing attributes will be updated.

This request is idempotent and fails if empty keys or values are provided.

uri = URI.parse("") http =, uri.port) http.use_ssl = true

request = request['Content-Type'] = 'application/json' request['Authorization'] = 'Bearer 4a415cc660e67d8f4d26d5a7f390183a86fc3a4524ded78dc2448e86c48b2739' request.body = data.to_json

response = http.request(request)

IcApiFacade apiFacade = new IcApiFacade("56a73507b66cd761caae7547ef2a66fc3a393746ba4bb9a91e303fcb3ceefb98");

String customerId = Map<String, String> customerAttributes = new TreeMap<>(); //set attributes Map<String, String> upToDateAttributes = apiFacade.setCustomerAttributes(customerId, customerAttributes);

var ic = new InvisibleCollector("56a73507b66cd761caae7547ef2a66fc3a393746ba4bb9a91e303fcb3ceefb98"); string customerId = … ; var newAttributes = new Dictionary<string, string> { { "attribute-1", "value-1" } } IDictionary<string, string> updatedCustomerAttributes = await ic.SetCustomerAttributesAsync(customerId, newAttributes);

attributes := map[string]string{ "go-attr-1": "go-val-1", "go-attr-3": "go-val-2", }

var channel = make(chan ic.AttributesPair) go iC.SetCustomerAttributes(channel, aCustomerModel.Id(), attributes) p := <-channel


This request can receive the following JSON data:

  "new_name_1": "attribute_1",
  "new_name_2": "attribute_2"

This request will return, for example, the following JSON response:

  "existing_name_1": "old_attribute_1",
  "new_name_1": "attribute_1",
  "new_name_2": "attribute_2"



Request body

The request is simply a map of key-value pairs.

Response body

The response is a map of all custom attributes this customer has.


This endpoint may return the following errors

HTTP Code Description
401 Unauthorized Invalid credentials were supplied
404 Not found The user doesn’t have any customer registered with that specific id.
422 Unprocessable Entity The request is syntactically correct but not a valid document JSON object or one the sanity checks failed