> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://contentful.com/developers/docs/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://contentful.com/developers/docs/_mcp/server.

# Update a space membership

PUT https://api.contentful.com/spaces/{space_id}/space_memberships/{space_membership_id}
Content-Type: application/json

Updates a space membership to change the user's roles or admin status. Only org admins, owners, and space admins can update memberships.

Reference: https://contentful.com/developers/docs/references/user-management-api/space-memberships/update-a-space-membership

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Path parameters

- `space_id` (string, required) — The space ID
- `space_membership_id` (string, required) — The space membership ID

### Body (application/json)

This endpoint expects a map from string to any.

- `map from string to any`

## Response

### 200

OK - Updated space membership

- `map from string to any`

## Examples

**Request**

```json
{
  "admin": false,
  "email": "user@example.com",
  "roles": [
    {
      "sys": {
        "id": "1ElgCn1mi1UHSBLTP2v4TD",
        "linkType": "Role",
        "type": "Link"
      }
    }
  ]
}
```

**Response**

```json
{
  "admin": false,
  "roles": [
    {
      "sys": {
        "id": "1ElgCn1mi1UHSBLTP2v4TD",
        "linkType": "Role",
        "type": "Link"
      }
    }
  ],
  "sys": {
    "createdAt": "2025-11-23T13:41:15Z",
    "id": "jn066pnp3hgr-7uqvFPPLzgtVaezGvjA9U6",
    "space": {
      "sys": {
        "id": "jn066pnp3hgr",
        "linkType": "Space",
        "type": "Link"
      }
    },
    "type": "SpaceMembership",
    "updatedAt": "2025-11-23T13:41:15Z",
    "user": {
      "sys": {
        "id": "7uqvFPPLzgtVaezGvjA9U6",
        "linkType": "User",
        "type": "Link"
      }
    },
    "version": 0
  }
}
```