---
title: "Update, localize or remove page assignments"
method: POST
path: "/projects/{projectId}/assignments"
tags: ["Assignments"]
---

# Update, localize or remove page assignments

`POST /projects/{projectId}/assignments`

## Request

- Base URL: `https://studio.weaverse.io/api/v1/content`
- URL: `https://studio.weaverse.io/api/v1/content/projects/{projectId}/assignments`
- Auth: HTTP bearer

Runs one structural operation on this project's page assignments, selected by `op`. All operations are live writes (routing changes immediately, no draft or publish step).

Operations:

- `update` (`content:write`): changes `handle` and `locale` of 1-100 assignments by `id`. Every id must belong to this project; one foreign id refuses the whole batch with `404` and nothing moves. Returns the updated rows. A handle that another assignment already uses in that scope, or a custom page that would hold two handles in one scope (`details.handles`), returns `409 CONFLICT` and nothing moves.
- `localize` (`content:write`): creates a locale-specific copy of page `pageId` for `locale`, with the same type and handle and a copy of its SEO. Returns the new page.
- `unassign` (`content:delete`, `confirm` equal to `pageId`): removes up to 100 resource assignments (`assignmentIds`) from template page `pageId`. Only rows that template owns in this project are removed; other ids are ignored. The template's own wiring row and the page itself are never removed. Returns the number removed.
- `reset-localized` (`content:delete`, `confirm` equal to `assignmentId`): removes the localized assignment `assignmentId` of page `pageId` so the route falls back to the default page. A version of the content is kept for recovery.
- `rename-locale` (`content:delete`, `confirm` equal to the `projectId`): moves every assignment of the project from `fromLocale` to `toLocale`. Returns the number of rows moved.

A wrong `confirm` value returns `400 INVALID_PARAMS`.

Required scope: `content:write` (all operations); `unassign`, `reset-localized` and `rename-locale` also need `content:delete`

## Request body

- union
  - object: Rename/re-locale assignments of THIS project. Every id must belong to the URL project (a same-shop sibling project's id refuses the whole batch with 404; nothing moves).
    - `op` 'update', required
    - `updates` object[], required
      - `id` string, required
      - `locale` string, required
      - `handle` string, required
  - object: Remove resource assignments from a template page (content:delete + confirm). Only rows that template owns; its template-marker wiring row and the page itself are never removed.
    - `op` 'unassign', required
    - `pageId` string, required: The template page whose resource assignments are removed
    - `assignmentIds` string[], required
    - `confirm` string, required: Must equal pageId
  - object
    - `op` 'localize', required
    - `pageId` string, required
    - `locale` string, required
  - object
    - `op` 'reset-localized', required
    - `pageId` string, required
    - `assignmentId` string, required
    - `confirm` string, required: Must equal assignmentId
  - object
    - `op` 'rename-locale', required
    - `fromLocale` string, required
    - `toLocale` string, required
    - `confirm` string, required: Must equal the projectId

## Response `200`

Operation result

- object

## Other responses

- `401`: Missing or invalid credentials
- `403`: Foreign project or missing scope (INSUFFICIENT_SCOPE)
- `404`: Not found (never discloses other tenants)
- `409`: CONFLICT: a custom page would hold two handles in one scope (`details.handles`), or another assignment already uses the handle; nothing was changed

---

[API](https://skmtc.dev/weaverse/apis/weaverse-content-api.md) - [All operations](https://skmtc.dev/weaverse/apis/weaverse-content-api/llms.txt) - [OpenAPI document](https://skmtc.dev/weaverse/apis/weaverse-content-api/revisions/d189794169bb?raw)
