---
search:
  tags:
    - memberships
    - PATCH
seo:
  description: >-
    Update membership. Reference for the PATCH
    /workspaces/{organizationId}/memberships/{id} endpoint in the Pile API.
sidebar:
  label: Update membership
  badge: PATCH
title: Update membership
type: openapi-operation
---
`PATCH /workspaces/{organizationId}/memberships/{id}`

**Request body** (`application/json`)

- `role` (string, required)

Request body example:

```json
{
  "role": "string"
}
```

**Responses**

- `200` — Membership updated

Response example, 200:

```json
{
  "id": "string",
  "organizationId": "string",
  "userId": "string",
  "role": "string",
  "createdAt": "string"
}
```
