User PUT Resources


Set initial tag relations

PUT /users/:id/tag-relations

An Admin can use this endpoint to create relations between the specified tags and the specified user. This is especially useful to create an initial know-how map for new users, so Starmind can already show them relevant content upon their first login. These relations are not guaranteed to be preserved forever, as the Starmind algorithm automatically strengthens and weakens different connections based on the user's actions.

The user-tag relations can be created with three different initial weights: low, medium and high. If the given tag does not exist, it will be created. Existing user-tag relations will be updated. If the same tag is specified for different weights (high, medium, low), then only the highest weight will be taken into account. Specifying the same tag with different capitalizations in a single request will cause a validation error.

Parameter Type Default Required Description
high_weight_tags array of tag labels - between 2 and 255 characters.
medium_weight_tags array of tag labels - between 2 and 255 characters.
low_weight_tags array of tag labels - between 2 and 255 characters.

Json Payload

{
  "high_weight_tags": ["Detective", "Crimes"],
  "medium_weight_tags": ["Surveillance"],
  "low_weight_tags": ["Archery"]
}

Response

The response contains all tags that have been updated.

{
  "high_weight_tags": ["Detective", "Crimes"],
  "medium_weight_tags": ["Surveillance"],
  "low_weight_tags": ["Archery"]
}