---
title: "Apply keyword groupings transactionally"
method: POST
path: "/v3/topic-clusters/apply-groups"
tags: ["Topic Clusters"]
---

# Apply keyword groupings transactionally

`POST /v3/topic-clusters/apply-groups`

Creates any new topics and links/moves each keyword into its target topic in a single DB transaction (all-or-nothing).

## Request body

- object
  - `teamId` string, required
  - `track` boolean, nullable
  - `groups` object[], required
    - `topicId` string, nullable
    - `topicName` string, required
    - `keywords` object[], required
      - `keyword` string, required
      - `countryId` string, nullable
      - `languageId` string, nullable
      - `locationCriteriaId` number, nullable
      - `locationCanonicalName` string, nullable

## Response `200`

Default Response

- object
  - `success` boolean
  - `createdTopics` number
  - `added` number
  - `moved` number
  - `alreadyHere` number

## Other responses

- `400` — Default Response
- `500` — Default Response

---

[API](https://skmtc.net/snowseo/apis/snowseo-api.md) · [All operations](https://skmtc.net/snowseo/apis/snowseo-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/snowseo/snowseo-api/versions/aa8eaa9e34a0/schema)
