---
title: "Assign scope"
method: POST
path: "/user-scope/assign"
tags: ["User scope"]
---

# Assign scope

`POST /user-scope/assign`

Assigns a scope of permitted properties to a user. Replaces any existing scope. Use `assignAll: true` to grant access to all properties, or provide specific `listingIds`.

## Request body

- object
  - `userId` string, required — User ID
  - `assignAll` boolean — Assign all properties to this user. If used, do not provide listingIds.
  - `listingIds` string[] — Array of specific listing IDs to assign (replaces existing assignments).

## Response `200`

Assignment completed successfully

- object
  - `allAssigned` boolean — True if all listings in the account are assigned to this user. When true, assignedListingIds will not be present.
  - `assignedListingIds` string[] — Array of listing IDs that were successfully assigned. Only present when allAssigned is false or undefined. Note: Either allAssigned or assignedListingIds will always be present.

## Other responses

- `201`
- `400` — Bad request — invalid user ID or listing IDs

---

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