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

# Create a workspace member

> Creates a new workspace member.



## OpenAPI

````yaml https://api.steuerboard.com/v1/openapi post /workspaces/{id}/members
openapi: 3.1.1
info:
  version: 0.1.0
  title: Steuerboard API
servers:
  - url: https://api.steuerboard.com/v1
security:
  - bearerAuth: []
tags:
  - name: auth
    description: Authentication and identity endpoints
    x-displayName: Auth
  - name: collect
    description: Public collect session endpoints
    x-displayName: Collect
  - name: collect.sessions
    description: Collect Sessions endpoints
    x-displayName: Collect Sessions
  - name: health
    description: Service health endpoints
    x-displayName: Health
  - name: admin.clients
    description: Admin endpoints for managing clients
    x-displayName: Clients
  - name: admin.users
    description: Admin user management endpoints
    x-displayName: Admin Users
  - name: files
    description: File management endpoints
    x-displayName: Files
  - name: tasks
    description: Task management endpoints
    x-displayName: Tasks
  - name: workspaces
    description: Workspace management endpoints
    x-displayName: Workspaces
  - name: workspace.members
    description: Workspace member management endpoints
    x-displayName: Workspace Members
  - name: webhooks
    description: Webhook event payloads and contracts
    x-displayName: Webhooks
  - name: users
    description: User management endpoints
    x-displayName: Users
externalDocs:
  description: Find out more about Steuerboard API
  url: https://docs.steuerboard.com
paths:
  /workspaces/{id}/members:
    post:
      tags:
        - workspace.members
      summary: Create a workspace member
      description: Creates a new workspace member.
      operationId: createWorkspaceMember
      parameters:
        - schema:
            type: string
            format: cuid
            description: The ID of the item
            example: cmf41ajzv003706un4i99q19z
          required: true
          in: path
          name: id
        - schema:
            type: string
            format: cuid
            description: The ID of the client
            example: cmf41ajzv003706un4i99q19z
          required: true
          name: x-client-id
          in: header
      requestBody:
        description: Workspace member create
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WorkspaceMemberCreate'
      responses:
        '201':
          description: Workspace member created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkspaceMember'
        '400':
          description: Missing client ID
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/bad_request'
                  - properties:
                      status_code:
                        type: integer
                        enum:
                          - 400
                      type:
                        type: string
                        enum:
                          - bad_request
                      code:
                        type: string
                        enum:
                          - missing_client_id
                      message:
                        type: string
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/auth_error'
        '403':
          description: Missing scope
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/auth_error'
                  - properties:
                      status_code:
                        type: integer
                        enum:
                          - 403
                      type:
                        type: string
                        enum:
                          - auth_error
                      code:
                        type: string
                        enum:
                          - missing_scope
                      message:
                        type: string
        '422':
          description: The validation error(s)
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  error:
                    type: object
                    properties:
                      issues:
                        type: array
                        items:
                          type: object
                          properties:
                            code:
                              type: string
                            path:
                              type: array
                              items:
                                anyOf:
                                  - type: string
                                  - type: number
                            message:
                              type: string
                          required:
                            - code
                            - path
                      name:
                        type: string
                    required:
                      - issues
                      - name
                    example:
                      name: ValidationError
                      issues:
                        - code: invalid_type
                          path:
                            - userId
                          message: Required
                required:
                  - success
                  - error
        '429':
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/rate_limit'
        '500':
          description: Internal server error
          content: {}
components:
  schemas:
    WorkspaceMemberCreate:
      type: object
      properties:
        userId:
          type: string
          format: cuid
          description: Identifier of the user that should be added to the workspace.
          example: cmf41ajzv003706un4i99q1a0
      required:
        - userId
    WorkspaceMember:
      type: object
      properties:
        createdAt:
          type: string
          format: date-time
          description: >-
            The date and time when the workspace membership was created.
            ISO-8601 format (YYYY-MM-DDTHH:MM:SSZ).
          example: '2024-05-14T08:30:00Z'
        updatedAt:
          type: string
          format: date-time
          description: >-
            The date and time when the workspace membership was last updated.
            ISO-8601 format (YYYY-MM-DDTHH:MM:SSZ).
          example: '2024-06-01T12:00:00Z'
        workspaceId:
          type: string
          format: cuid
          description: The identifier of the workspace the member belongs to.
          example: cmf41ajzv003706un4i99q19z
        isMuted:
          type: boolean
          description: Whether the member has muted notifications for the workspace.
          example: false
        userId:
          type: string
          format: cuid
          description: Identifier of the user that is a member of the workspace.
          example: cmf41ajzv003706un4i99q1a0
        user:
          type: object
          properties:
            id:
              type: string
              format: cuid
              description: Identifier of the user.
              example: cmf41ajzv003706un4i99q1a0
            email:
              type: string
              format: email
              description: Email address of the user.
              example: frida@example.com
            firstName:
              type:
                - string
                - 'null'
              description: First name of the user, if available.
              example: Frida
            lastName:
              type:
                - string
                - 'null'
              description: Last name of the user, if available.
              example: Meyer
            image:
              type:
                - string
                - 'null'
              description: Profile image URL of the user, if available.
              example: null
          required:
            - id
            - email
            - firstName
            - lastName
            - image
          description: Optional user object with denormalised information for convenience.
      required:
        - createdAt
        - updatedAt
        - workspaceId
        - isMuted
        - userId
    bad_request:
      type: object
      properties:
        status_code:
          type: integer
          enum:
            - 410
        type:
          type: string
          enum:
            - bad_request
        code:
          type: string
          enum:
            - collect_token_expired
        message:
          type: string
      required:
        - status_code
        - type
        - code
        - message
    auth_error:
      type: object
      properties:
        status_code:
          type: integer
          enum:
            - 401
        type:
          type: string
          enum:
            - auth_error
        code:
          type: string
          enum:
            - unauthorized
        message:
          type: string
      required:
        - status_code
        - type
        - code
        - message
    rate_limit:
      type: object
      properties:
        status_code:
          type: integer
          enum:
            - 429
        type:
          type: string
          enum:
            - rate_limit
        code:
          type: string
          enum:
            - too_many_requests
        message:
          type: string
      required:
        - status_code
        - type
        - code
        - message
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: Bearer token authentication

````