---
title: "Set Custom Scope Tree"
method: PUT
path: "/scope-tree"
tags: ["Business Configuration"]
---

# Set Custom Scope Tree

`PUT /scope-tree`

Stores a custom scope tree to override the synchronized Commerce scope tree.

## Headers

- `x-gw-ims-org-id` string, required

## Request body

- object
  - `scopes` CustomScopeInput[], required — Custom scopes to store. Each code+level combination must be unique across the entire recursive tree.
    - `id` string
    - `code` string, required
    - `label` string, required
    - `level` string
    - `is_editable` boolean, required
    - `is_final` boolean, required
    - `children` CustomScopeInput[]

## Response `200`

The stored custom scope tree result.

- object
  - `result` object, required
    - `message` 'Custom scope tree updated successfully', required
    - `timestamp` string, date-time, required
    - `scopes` CustomScopeOutput[], required
      - `id` string, required
      - `code` string, required
      - `label` string, required
      - `level` string, required
      - `is_editable` boolean, required
      - `is_final` boolean, required
      - `children` CustomScopeOutput[]

## Other responses

- `400` — The request body is invalid: the scopes array is missing or not an array, a scope is missing a required field or has an invalid type, a scope uses a reserved code (commerce or global), or two scopes share the same code and level.
- `401` — You are not authorized to access this resource. Ensure the IMS token and the x-gw-ims-org-id header are correctly set and valid.
- `403` — The access token is valid, but it is not allowed to access the requested organization or operation.
- `500` — An unexpected server error occurred.

---

[API](https://skmtc.dev/adobe/apis/app-management-api.md) · [All operations](https://skmtc.dev/adobe/apis/app-management-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/adobe/app-management-api/revisions/4b39b5956be9/schema)
