---
search:
  tags:
    - Shops
    - POST
seo:
  description: >-
    Needs shops.write. The user must have a role in the seller; the… Reference
    for the POST /shops/{shop_id}/branches/{id}/users endpoint in the Bolder API
    v2.
sidebar:
  label: Assign a user to a branch
  badge: POST
title: Assign a user to a branch
type: openapi-operation
---
Needs `shops.write`. The user must have a role in the seller; the assignment records that role (`vendedor`,
`supervisor`...). Assigning twice is a no-op. Note that a full-scope token of a user with branches only sees the
orders fulfilled from those branches.

`POST /shops/{shop_id}/branches/{id}/users`

**Request body** (`application/json`, required)

- `user_id` (integer, required)

Request body example:

```json
{
  "user_id": 0
}
```

**Responses**

- `201` — The branch with its users
- `403` — Access denied
- `422` — Not a user of this shop
