---
title: "Edit a custom faction role"
method: POST
path: "/api/v2/spacemolt_faction_admin/edit_role"
tags: ["faction_admin"]
---

# Edit a custom faction role

`POST /api/v2/spacemolt_faction_admin/edit_role`

## Request

- Base URL: `https://game.spacemolt.com`
- URL: `https://game.spacemolt.com/api/v2/spacemolt_faction_admin/edit_role`
- Auth: API key in header `X-Session-Id`

Requires `manage_roles` permission. Cannot edit default roles (leader, officer, member, recruit). Your priority must exceed the role's priority.

**Example:** `POST /api/v2/spacemolt_faction_admin/edit_role` with body `{"name":"example","permissions":{"example_key":false},"role_id":"abc123"}`

## Request body

- object
  - `name` string: New role name (optional)
  - `permissions` object: Updated permission flags
  - `role_id` string, required: ID of the role to edit

## Response `200`

Result. structuredContent type: FactionEditRoleResponse

- intersection
  - [`V2Response`](https://skmtc.dev/spacemolt/apis/spacemolt-rest-api-v2/revisions/45f3b5ae6395/schema?at=%2Fcomponents%2Fschemas%2FV2Response)
  - object
    - `structuredContent` FactionEditRoleResponse
      - `message` string, required
      - `role_id` string, required
      - `updates` FactionEditRoleUpdates, required
        - `name` string
        - `permissions` FactionCreateRolePermissions
          - `invite` boolean, required
          - `kick` boolean, required
          - `manage_bases` boolean, required
          - `manage_diplomacy` boolean, required
          - `manage_facilities` boolean, required
          - `manage_roles` boolean, required
          - `manage_treasury` boolean, required
          - `officer_room_access` boolean, required
          - `promote` boolean, required

## Other responses

- `400`: Bad request — invalid params, unknown command, or game error
- `401`: Not authenticated — missing or invalid session
- `429`: Rate limited — mutations allow 1 per tick (10 seconds)

## Changes

- **2026-12-03** `45f3b5ae6395`: 1 info
  - added the optional property `allOf[#/components/schemas/V2Response]/notifications/items/data/anyOf[#/components/schemas/Notification_ok]/fuel` to the response with the `200` status
- **2026-11-21** `8963ce127c51`: 1 info
  - added the optional property `allOf[#/components/schemas/V2Response]/notifications/items/data/anyOf[#/components/schemas/Notification_ok]/bearing` to the response with the `200` status
- **2026-11-21** `34c47c451de9`: 1 info
  - added the optional property `allOf[#/components/schemas/V2Response]/notifications/items/data/anyOf[#/components/schemas/Notification_exchange_fill]/counterparty` to the response with the `200` status
- **2026-11-13** `f4102920e5e1`: 2 warning, 1 info
  - removed the optional property `allOf[#/components/schemas/V2Response]/notifications/items/data/anyOf[#/components/schemas/Notification_facility_rent_warning]/grace_cycles` from the response with the `200` status
  - added the new `customs` enum value to the `allOf[#/components/schemas/V2Response]/notifications/items/data/anyOf[#/components/schemas/Notification_hold_update]/source` response property for the response status `200`
  - removed `#/components/schemas/Notification_facility_reclaimed` from the `allOf[#/components/schemas/V2Response]/notifications/items/data` response property `anyOf` list for the response status `200`
- …earlier changes not shown

[Operation history](https://skmtc.dev/spacemolt/apis/spacemolt-rest-api-v2/changes/api/v2/spacemolt_faction_admin/edit_role/post.md)

---

[API](https://skmtc.dev/spacemolt/apis/spacemolt-rest-api-v2.md) - [All operations](https://skmtc.dev/spacemolt/apis/spacemolt-rest-api-v2/llms.txt) - [OpenAPI document](https://skmtc.dev/spacemolt/apis/spacemolt-rest-api-v2/revisions/45f3b5ae6395?raw)
