microCMS
Documentation
  • Pricing
  • Blog
  • FAQ
  • Contact
  • Sign In
  • Get started for free
Navigation
Tutorial
Next.js
  • Integration with Next.js
  • Getting Started with App Router
  • Tutorial (App Router)
  • Getting Started with Pages Router
  • Tutorial (Pages Router)
Astro
  • Getting Started
  • Integration with Astro
  • Tutorial
Nuxt
  • Integration with Nuxt
  • Getting Started
  • Tutorial
Gatsby
  • Integration with Gatsby
  • Getting Started
  • Tutorial
JavaScript
  • Integration with JavaScript
  • Getting Started (Browser)
  • Getting Started (Server)
PHP
  • Integration with PHP
  • Getting Started
Ruby
  • Integration with Ruby
  • Getting Started
Go
  • Integration with Go
  • Getting Started with microCMS
Manual
  • Introduction
Account & Login
  • Account Registration
  • Login
  • Email Address Authentication
Services
  • Creating a Service
  • Service Configuration
  • Template
  • Service Deletion
Payment
  • Change of Pricing Plan
  • Registering and Changing Payment Methods
API
  • Creating and Managing APIs
  • API Settings
  • Export/Import of API Schema
Fields
  • Text Field
  • Text Area
  • Image
  • Multiple Images
  • Date
  • Boolean
  • Selectable Field
  • Content Reference
  • Multiple Content References
  • Number
  • File
  • Extended Field
  • Repetition
  • Custom
Contents
  • CSV Export of Content
  • Content Creation
  • Content Editing
  • Content Management
  • View
  • Content Status
  • Custom Status
  • Setting the Content ID
  • Automatically Assigned Values for Content
  • CSV Import of Content
  • API Preview
  • Examples of Using Query Parameters with API Preview
  • Integration Methods by Rendering Type
  • Screen Preview
  • Setting Up Webhooks for Content
Rich Editor
  • How to Use the Rich Editor
  • Rich Editor WRITE API
  • How to Use the Old Rich Editor
Reviews
  • Review
  • AI Review
Media
  • Media Management
  • Changing Media Filters and Display Order
  • Media Tag Configuration
  • Setting Up Media Webhooks
  • Custom Domain Settings for Media
Permission Management
  • Member Management
  • Roles (Permission Management in the Admin Panel)
Environments
  • Multiple Environments (Development Environment)
  • Merging API Settings Between Environments
Connection
  • Amazon S3 Integration
Logs
  • Audit Log
  • Data Transfer Volume
Security
  • Content Update History
  • IP Restrictions for Management Dashboard
  • IP Restrictions for APIs
Authentication
  • Setting Up Two-Factor Authentication
  • Mandatory Two-Factor Authentication
  • Single Sign-On
Specifications & Limitations
  • Recommended Environment
  • Limitations / Precautions
Content API
  • What is the Content API?
Basic Operations
  • GET /api/v1/{endpoint}
  • GET /api/v1/{endpoint}/{content_id}
  • POST /api/v1/{endpoint}
  • PUT /api/v1/{endpoint}/{content_id}
  • PATCH /api/v1/{endpoint}/{content_id}
  • DELETE /api/v1/{endpoint}/{content_id}
API Keys
  • API Key (API Authentication and Authorization Management)
  • Migration from the Old API (X-API-KEY, etc.)
Responses & Error Handling
  • Response format for each field in the GET API
  • Specifying Query Parameters in the GET API
  • Error Responses of the Content API
Management API (Beta)
  • POST /api/v1/roles
  • DELETE /api/v1/roles/{role_id}
  • GET /api/v1/roles/{role_id}
  • PATCH /api/v1/roles/{role_id}
  • GET /api/v1/roles
  • What is the Management API?
Content Operations
  • PUT /api/v1/contents/{endpoint}/{content_id}/reservation
  • GET /api/v1/contents/{endpoint}
  • GET /api/v1/contents/{endpoint}/{content_id}
  • PATCH /api/v1/contents/{endpoint}/{content_id}/status
  • PATCH /api/v1/contents/{endpoint}/{content_id}/createdBy
Media Operations
  • GET /api/v2/media
  • GET /api/v1/media
  • POST /api/v1/media
  • DELETE /api/v2/media
Member Operations
  • PATCH /api/v1/members/{member_id}
  • GET /api/v1/members
  • GET /api/v1/members/{member_id}
API Operations
  • POST /api/v1/apis
  • GET /api/v1/apis
  • GET /api/v1/apis/{endpoint}
Service Operations
  • GET /api/v1/service
Responses & Error Handling
  • Management API Error Responses
Image API
  • What is the Image API?
Parameters
  • Image Size
  • Quality
  • Resolution and Screen Size
  • Format
  • Text
  • Border
  • Padding
  • Shape
  • Download
  • Watermark
MCP Server
  • microCMS MCP
  • microCMS Document MCP Server
  • Top
  • Management API (Beta)

PATCH /api/v1/members/{member_id}

Last updated: 2026/11/17

This API updates the role assigned to a member.

Request Headers

X-MICROCMS-API-KEY

This is the authentication key required for requests.
Enable “Change member roles” in the Management API permissions, and include the key in the request headers when sending the request.

Caution

If the X-MICROCMS-API-KEY is exposed, third parties may be able to manipulate your Content without authorization. Please handle it with care. For details, see API Key (API Authentication and Permission Management).

Content-Type

Specifies the format of the data to send.
microCMS only supports JSON data, so specify application/json.

Path Parameters

member_id

Specify the ID of the member to update.
You can find the member ID on the member details page in the Administration console or in the response from the Get Member Information API (list, details).

Request Body

Specify the roles to assign to the member after the update.
You can find role IDs in roles[].id in the response from the Get Roles API (GET /api/v1/roles). You can find the role IDs currently assigned to the member in roleIds in the response from the Get Member API.

Property

Type

Required

Description

roleIds

array

Required

An array of Role IDs to assign after the update. Specify one or more Role IDs that exist in the target Service as an array of strings. Empty arrays ([]) and duplicate IDs are not allowed.

All assigned roles are replaced with the contents of the submitted roleIds. Include any existing role IDs you want to retain in roleIds when submitting.

Request Example

The following example replaces the roles assigned to a member with the two specified roles.

curl -X PATCH 'https://[サービスID].microcms-management.io/api/v1/members/[メンバーID]' \
  -H 'X-MICROCMS-API-KEY: [APIキー]' \
  -H 'Content-Type: application/json' \
  -d '{
    "roleIds": [
      "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
      "zzzzzzzz-zzzz-zzzz-zzzz-zzzzzzzzzzzz"
    ]
  }'

To add roles, specify all the role IDs you want to keep, along with the IDs of the roles you want to add. To remove roles, specify only the IDs of the roles you want to keep.

Response

Status Code

A 200 response is returned when the role is updated successfully.
For status codes returned in the event of an error, see Error Response.

Response Body

When the role is updated successfully, a response like the following is returned. The format is the same as the response from the Get Member API (GET /api/v1/members/{member_id}).

{
  "id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "name": "test-member",
  "email": "test@microcms.co.jp",
  "roleIds": [
    "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
    "zzzzzzzz-zzzz-zzzz-zzzz-zzzzzzzzzzzz"
  ],
  "mfa": true,
  "lastAccessedAt": "2026-01-01T00:00:00.000Z"
}

Error Response

The main errors returned by this API are as follows.

Status Code

Condition

400

The request body is invalid (for example, roleIds is missing, is null, has a type mismatch, or contains an undefined property)

400

roleIds is an empty array, contains duplicate role IDs, or includes a role ID in an unsupported format

400

A specified role does not exist in the target Service (including roles from another Service)

403

The request is made for an environment created using the Multiple Environments feature

404

The specified Member does not exist in the target Service

409

The specified Member has a pending invitation

409

After the update, no joined Member with the Administrator role would remain in the target Service

413

The request body exceeds 1 MiB

You can check the error details in message in the response body. For example, if you specify an empty array for roleIds, the following response is returned.

{
  "message": "\"roleIds\" must not be empty"
}

For other errors, see Management API Error Responses.

Restrictions

Member and Role Settings That Cannot Be Updated

You cannot update the roles assigned to members who have been invited but have not yet joined.
After the update, at least one joined member must remain an administrator. Invited members are not counted as administrators.

Use with Multiple Environments

Requests to environments created using the Multiple Environments feature are not supported.
Changing the roles assigned to members in the parent Service does not affect the roles assigned to members in child environments.

Concurrent Updates

If the same member is updated concurrently, the role settings saved last will be applied.
Delete and update roles sequentially; do not perform these operations concurrently.
If the administrator role is removed from multiple administrators at the same time, no joined administrators may remain. Remove the administrator role sequentially as well.

Contents

  • Request Headers
  • X-MICROCMS-API-KEY
  • Content-Type
  • Path Parameters
  • member_id
  • Request Body
  • Request Example
  • Response
  • Status Code
  • Response Body
  • Error Response
  • Restrictions
  • Member and Role Settings That Cannot Be Updated
  • Use with Multiple Environments
  • Concurrent Updates
  • Company
  • Legal Notice
  • Terms of Service
  • Privacy Policy

Copyright © microcms.io All rights reserved.