---
title: "Group two or more activities as one recorded session"
method: POST
path: "/activities/merge"
tags: ["Activities"]
---

# Group two or more activities as one recorded session

`POST /activities/merge`

## Request

- Base URL: `https://bodylab.lol/api/v1`
- URL: `https://bodylab.lol/api/v1/activities/merge`
- Auth: HTTP bearer

For a pair the automatic matcher left separate: ambiguous (more than one plausible match) or never considered (mismatched sport types, or a summary whose time window doesn't overlap). Requires the same sport family; which one ends up counted follows the matcher's own ranking.

## Headers

- `X-Client-Platform` string
- `X-Client-Version` string

## Request body

- object
  - `activityIds` string[], required: Two or more activities to group as one session — each may already be the counted row of its own group.

## Response `200`

OK

- object
  - `groupId` string, required: The id of the activity now counted for the merged group.

## Other responses

- `401`: Error: UNAUTHORIZED.
- `404`: Error: NOT_FOUND.
- `422`: Error: INCOMPATIBLE_ACTIVITIES.

---

[API](https://skmtc.dev/bodylab/apis/body-lab-api.md) · [All operations](https://skmtc.dev/bodylab/apis/body-lab-api/llms.txt) · [OpenAPI document](https://skmtc.dev/bodylab/apis/body-lab-api/revisions/544c201eaf88?raw)
