# Update a membership

PUT https://api.close.com/api/v1/membership/{id}/
Content-Type: application/json

You can update the field `role_id` and its value can be one of `'admin'`, `'superuser'`, `'user'` or `'restricteduser'` for the corresponding predefined role, or an ID of a [Role](/resources/roles/).

The field `auto_record_calls` is used to manage whether or not calls are automatically recorded. The initial value for a membership is `'unset'`. It can be updated to `'disabled'`, or `'enabled'`.

Reference: https://developer.close.com/api/resources/memberships/update

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: Close API
  version: 1.0.0
paths:
  /membership/{id}/:
    put:
      operationId: update
      summary: Update a membership
      description: >-
        You can update the field `role_id` and its value can be one of
        `'admin'`, `'superuser'`, `'user'` or `'restricteduser'` for the
        corresponding predefined role, or an ID of a [Role](/resources/roles/).


        The field `auto_record_calls` is used to manage whether or not calls are
        automatically recorded. The initial value for a membership is `'unset'`.
        It can be updated to `'disabled'`, or `'enabled'`.
      tags:
        - subpackage_memberships
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
        - name: Authorization
          in: header
          description: Basic authentication
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/memberships_update_Response_200'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                description: Any type
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                description: Any type
        '404':
          description: Not found
          content:
            application/json:
              schema:
                description: Any type
      requestBody:
        content:
          application/json:
            schema:
              description: Any type
servers:
  - url: https://api.close.com/api/v1
components:
  schemas:
    memberships_update_Response_200:
      type: object
      properties: {}
      description: Empty response body
      title: memberships_update_Response_200
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: basic
    OAuth2:
      type: http
      scheme: bearer

```