---
title: "Assign a User to a User Group"
method: POST
path: "/accountmanager.assigngroup/{userId}"
tags: ["User Admin"]
---

# Assign a User to a User Group

`POST /accountmanager.assigngroup/{userId}`

## Request

- Base URL: `https://companynode.pricefx.com/pricefx/companypartition`
- URL: `https://companynode.pricefx.com/pricefx/companypartition/accountmanager.assigngroup/{userId}`
- Auth: one of:
  - HTTP basic
  - API key in header `X-PriceFx-jwt`
- TypeScript: <https://skmtc.dev/pricefx/apis/the-pricefx-backend-api/docs/accountmanager.assigngroup/:userId/post.ts> (a function with typed inputs; its response is checked against the schema)

Assigns a User Group to the specified user.

## Request body

- object
  - `data` object, required
    - `assign` boolean, required: Set to `true` to add the user to the User Group. Set `false` to remove the user from the group.
    - `typedId` string, required: `TypedId` of the User Group you want to assign or revoke. Either `typedId` or `uniqeName` is required.
    - `uniqueName` string, required: `uniqeName` of the User Group you want to assign or revoke. Either `typedId` or `uniqeName` is required.

## Response `200`

OK

- object
  - `response` object
    - `node` string
    - `csrfToken` string
    - `data` unknown
    - `status` number

---

[API](https://skmtc.dev/pricefx/apis/the-pricefx-backend-api.md) - [All operations](https://skmtc.dev/pricefx/apis/the-pricefx-backend-api/llms.txt) - [OpenAPI document](https://skmtc.dev/pricefx/apis/the-pricefx-backend-api/revisions/23d941b00ac0?raw)
