---
title: "Update an existing scope by ID"
method: PUT
path: "/api/v1/scopes/{id}"
tags: ["Scopes"]
---

# Update an existing scope by ID

`PUT /api/v1/scopes/{id}`

Required scope - write_scope

## Path parameters

- `id` number, required

## Request body

- PutScopeReq
  - `name` string
  - `note` string
  - `locales` object[]
    - `locale` string, required
    - `value` string, required

## Response `200`

- object
  - `scope` ScopeDetail
    - `id` number
    - `name` string
    - `note` string
    - `type` 'spa' | 's2s'
    - `createdAt` string
    - `updatedAt` string
    - `deletedAt` string, nullable
    - `locales` object[]
      - `id` number
      - `scopeId` number
      - `locale` string
      - `value` string
      - `createdAt` string
      - `updatedAt` string
      - `deletedAt` string, nullable

## Changes

- **2024-08-25** `4f326b0821e0` — 1 breaking, 7 warning, 1 info
  - the `scope` response's property type changed from `object` to no type for status `200`
  - removed the optional property `scope/createdAt` from the response with the `200` status
  - removed the optional property `scope/deletedAt` from the response with the `200` status
  - removed the optional property `scope/id` from the response with the `200` status
  - …5 more
- **2024-08-11** `11e2773b3a1e` — 1 breaking, 8 info
  - the `scope` response's property type changed from no type to `object` for status `200`
  - added the optional property `scope/createdAt` to the response with the `200` status
  - added the optional property `scope/deletedAt` to the response with the `200` status
  - added the optional property `scope/id` to the response with the `200` status
  - …5 more

[Change history](https://skmtc.dev/valuemelody/apis/melody-auth-s2s-api/changes/api/v1/scopes/:id/put.md)

---

[API](https://skmtc.dev/valuemelody/apis/melody-auth-s2s-api.md) · [All operations](https://skmtc.dev/valuemelody/apis/melody-auth-s2s-api/llms.txt) · [OpenAPI document](https://skmtc.dev/valuemelody/apis/melody-auth-s2s-api/revisions/ffd604cd7944?raw)
