> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mightynetworks.com/llms.txt
> Use this file to discover all available pages before exploring further.

# updateMembership

> Update a member's Membership — their join record in a Space, defaulting to the
Network membership. Role is the writable field; changing it requires a Host of
the target Space (the Network itself for Network memberships).

**Required scopes:** `host:write:network_members`, `host:write:network_spaces` (any one)



**mutation** `updateMembership(input: UpdateMembershipInput!): UpdateMembershipPayload`

## Arguments

**`input`**: `UpdateMembershipInput!` (required)

Parameters for UpdateMembership

## Returns

`UpdateMembershipPayload`

**`clientMutationId`**: `String`

A unique identifier for the client performing the mutation.

---

**`errors`**: `[String!]!`

---

**`membership`**: `Membership`

## Examples

```graphql Mutation
mutation UpdateMembership($input: UpdateMembershipInput!) {
  updateMembership(input: $input) {
    clientMutationId
    errors
    membership {
      accessPathPlans {
        edges {
          __typename
        }
        nodes {
          __typename
        }
        pageInfo {
          __typename
        }
      }
      accessPathSource
      id
      joinedAt
      lastActiveAt
      member {
        ambassadorLevel
        ambassadorLevelId
        avatarUrl
        badges {
          __typename
        }
        communityRole
        conversations {
          __typename
        }
      }
    }
  }
}
```

```json Variables
{
  "input": {
    "memberId": "id"
  }
}
```

```json Response
{
  "data": {
    "updateMembership": {
      "clientMutationId": "string",
      "errors": [
        "string"
      ],
      "membership": {
        "accessPathPlans": {
          "edges": [
            {
              "__typename": "PaymentPlanEdge"
            }
          ],
          "nodes": [
            {
              "__typename": "PaymentPlan"
            }
          ],
          "pageInfo": {
            "__typename": "PageInfo"
          }
        },
        "accessPathSource": "DIRECT",
        "id": "id",
        "joinedAt": "value",
        "lastActiveAt": "value",
        "member": {
          "ambassadorLevel": "string",
          "ambassadorLevelId": 1,
          "avatarUrl": "string",
          "badges": [
            {
              "__typename": "Badge"
            }
          ],
          "communityRole": "CONTRIBUTOR",
          "conversations": {
            "__typename": "PublicConversationConnection"
          }
        }
      }
    }
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.