> ## 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.

# Add or update a team member

> Adds a member by email. If no user with that email exists, one is created with the given password (required then); if the user exists, the password is ignored. If already a member, their role is changed. Admin of THAT workspace or super-admin (403 otherwise). Refuses with flash: invalid email, invalid role, missing password for a new user. 404 if the workspace does not exist.

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



## OpenAPI

````yaml /openapi.json post /workspaces/{ws_id}/team/add
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/add:
    post:
      tags:
        - Team & workspaces
      summary: Add or update a team member
      description: >-
        Adds a member by email. If no user with that email exists, one is
        created with the given password (required then); if the user exists, the
        password is ignored. If already a member, their role is changed. Admin
        of THAT workspace or super-admin (403 otherwise). Refuses with flash:
        invalid email, invalid role, missing password for a new user. 404 if the
        workspace does not exist.


        **Minimum role:** `admin` (`x-min-role`). **Destructive:** `false`
        (`x-destructive`).
      operationId: workspaces_add_member
      parameters:
        - in: path
          name: ws_id
          required: true
          schema:
            type: integer
      requestBody:
        content:
          application/json:
            schema:
              properties:
                display_name:
                  description: Display name (set only if the user has none).
                  type: string
                email:
                  description: Teammate email (lowercased).
                  type: string
                password:
                  description: >-
                    Starting password. Required only when the user does not
                    exist yet.
                  type: string
                role:
                  description: admin, edit or view. Default view.
                  type: string
              required:
                - email
              type: object
      responses:
        '200':
          description: >-
            Redirect to the team page; flash 'Added <email> as <role>.' or
            '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.