Brand Perception

Edit Brand Perception Attribute Clusters

Changed on

Rename and delete the project's brand-perception attributes, move terms between attributes and unassign terms from theirs — the same edits the Manage attributes screen makes. The whole call is one transaction: if any edit is rejected nothing is applied. Edits apply in the order reassign, rename, unassign_terms, delete_cluster_ids regardless of how they are listed. Neither deleting an attribute nor unassign_terms permanently removes a term — both unassign it, so it stays visible under unassigned and can be moved into an attribute later. Scores re-aggregate on the next read, so no new scraping run is needed. Naming one term or attribute twice in a call is rejected, since the two edits would race. To add an attribute, use the create endpoint. Errors: 400 when a target is repeated, 404 when an attribute or term does not exist, 409 when a new name collides with another attribute.

post/brand-perception/attribute-clusters/edit

Request

  • Base URL
    https://api.peec.ai/customer/v1
  • URL
    https://api.peec.ai/customer/v1/brand-perception/attribute-clusters/edit
  • Auth
    • API key in header X-API-Key
    • or API key in query parameter api_key
    • or HTTP bearer

Request body

project_idstring

Required if using a company api key

delete_cluster_idsstring[]

Attributes to remove, even ones that still hold terms — their terms become unassigned rather than being deleted.

unassign_termsstring[]

Terms to unassign from their attribute, spelled exactly as the listing returns them (in members). A no-op for a term already in unassigned.

Example request

{
  "project_id": "or_f45b94ba-5e35-4982-93ed-285e72ee14eb",
  "renames": [
    {
      "cluster_id": "0199a4c1-9f3e-7c21-9f0f-2c0a5d3b1e42",
      "name": "Racing Heritage"
    }
  ],
  "delete_cluster_ids": [
    "0199a4c1-9f3e-7c21-9f0f-2c0a5d3b1e42"
  ],
  "unassign_terms": [
    "hand-built"
  ],
  "reassignments": [
    {
      "attribute": "hand-built",
      "cluster_id": "0199a4c1-9f3e-7c21-9f0f-2c0a5d3b1e42"
    }
  ]
}

Response

Success — every edit in the call was applied. Counts echo what was requested.

renamed_countnumber required
deleted_countnumber required
unassigned_terms_countnumber required
reassigned_countnumber required

Example response

{
  "renamed_count": 1,
  "deleted_count": 1,
  "unassigned_terms_count": 1,
  "reassigned_count": 3
}

Changes