---
title: "POST /api/public/apps/group"
method: POST
path: "/api/public/apps/group"
tags: ["Public Apps"]
---

# POST /api/public/apps/group

`POST /api/public/apps/group`

The group call lets you assign or unassign a user to a group, along with optionally adding traits to the group.

## Headers

- `authorization` string, required

## Request body

- union
  - object
    - `messageId` string, required — Unique identifier for the message, used as an idempotency key for safe retries. Can provide a UUID.
    - `timestamp` string — ISO 8601 formatted timestamp of when the event occurred. If not provided, the current server time will be used.
    - `groupId` string, required
    - `assigned` boolean
    - `traits` object — Traits of the group.
    - `context` object — Provides metadata about the user submitting the event and the context in which the event occurred.
    - `userId` string, required — Unique identifier for the user. Should be the id of the user in your system. Only applicable to logged in users.
  - object
    - `messageId` string, required — Unique identifier for the message, used as an idempotency key for safe retries. Can provide a UUID.
    - `timestamp` string — ISO 8601 formatted timestamp of when the event occurred. If not provided, the current server time will be used.
    - `groupId` string, required
    - `assigned` boolean
    - `traits` object — Traits of the group.
    - `context` object — Provides metadata about the user submitting the event and the context in which the event occurred.
    - `anonymousId` string, required — Identifier for a logged out user. It can be any pseudo-unique identifier, for example a session Id or a UUID.

## Response `200`

Default Response

---

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