---
title: "Set a website editor’s role"
method: PUT
path: "/websites/{websiteId}/editors/{principalId}"
tags: ["Website editors"]
---

# Set a website editor’s role

`PUT /websites/{websiteId}/editors/{principalId}`

## Request

- Base URL: `https://api.cactal.ai/v1`
- URL: `https://api.cactal.ai/v1/websites/{websiteId}/editors/{principalId}`
- Auth: HTTP bearer

Sets the principal’s editor role on this single website, replacing any existing grant for that principal. `role` is `full` (full website editing) or `content` (content editing only). Principals who already inherit access through their organization role are rejected with a validation error. Use `websites.editors.add` to add someone by email instead of principal id.

## Path parameters

- `websiteId` string, required
- `principalId` string, required

## Request body

- object
  - `role` 'full' | 'content', required

## Response `200`

The saved editor grant.

- object
  - `websiteId` string, required: Id of the website the grant applies to.
  - `principalId` string, required: Id of the principal holding the grant.
  - `role` 'full' | 'content', required: `full` allows full website editing; `content` allows content editing only.
  - `createdAt` string, date-time, required: When the grant was created.

## Other responses

- `400`: Validation failed. The response `message` names the first invalid field.
- `401`: Missing, invalid, expired, or revoked API key.
- `403`: The authenticated principal lacks the required capability.
- `404`: The resource does not exist or is outside the principal’s access scope.
- `429`: Rate limit exceeded. Retry after the number of seconds in the `Retry-After` header.

---

[API](https://skmtc.dev/cactal/apis/cactal-api.md) · [All operations](https://skmtc.dev/cactal/apis/cactal-api/llms.txt) · [OpenAPI document](https://skmtc.dev/cactal/apis/cactal-api/revisions/9cd0fb5eacdd?raw)
