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

# Change a member's role

> Sets a membership's role. Refuses to demote the only admin (flash). 400 if membership_id is missing or not a number, 404 if the membership is not in this workspace. Admin of that workspace or super-admin.

**Minimum role:** `admin` (`x-min-role`). **Destructive:** `false` (`x-destructive`).



## OpenAPI

````yaml /openapi.json post /workspaces/{ws_id}/team/role
openapi: 3.0.3
info:
  title: Sales Sequencer API
  version: '1'
  description: >-
    Every Sales Sequencer action over HTTP. Each call runs as the API key's
    creator, with that user's role, in the key's workspace. Auth: X-API-Key
    header.
servers:
  - url: https://api.salessequencer.com/api/v1
security:
  - key: []
paths:
  /workspaces/{ws_id}/team/role:
    post:
      tags:
        - Team & workspaces
      summary: Change a member's role
      description: >-
        Sets a membership's role. Refuses to demote the only admin (flash). 400
        if membership_id is missing or not a number, 404 if the membership is
        not in this workspace. Admin of that workspace or super-admin.


        **Minimum role:** `admin` (`x-min-role`). **Destructive:** `false`
        (`x-destructive`).
      operationId: workspaces_change_role
      parameters:
        - in: path
          name: ws_id
          required: true
          schema:
            type: integer
      requestBody:
        content:
          application/json:
            schema:
              properties:
                membership_id:
                  description: Membership id (from GET /workspaces/<id>/team).
                  type: integer
                role:
                  description: admin, edit or view.
                  type: string
              required:
                - membership_id
                - role
              type: object
      responses:
        '200':
          description: Redirect to the team page; flash 'Access updated.'
components:
  securitySchemes:
    key:
      in: header
      name: X-API-Key
      type: apiKey

````

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