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

# Add member to project

> Add a user as a member of the project. Requires project admin role.



## OpenAPI

````yaml api-docs/app-team/arc.json post /v1/arc/projects/:id/members/:userId
openapi: 3.1.1
info:
  title: Arc API
  version: 1.0.0
  description: >-
    Arc API supporting the k0rdent Enterprise arc console for managing
    Kubernetes clusters and applications
servers:
  - url: http://localhost:4005
    description: Local Development
security: []
paths:
  /v1/arc/projects/:id/members/:userId:
    post:
      tags:
        - Projects
        - Members
      summary: Add member to project
      description: Add a user as a member of the project. Requires project admin role.
      parameters:
        - schema:
            type: string
          required: true
          name: id
          in: path
        - schema:
            type: string
          required: true
          name: userId
          in: path
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                role:
                  type: string
                  enum:
                    - admin
                    - member
                    - viewer
                  default: member
      responses:
        '201':
          description: Member added successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - true
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                      projectId:
                        type: string
                      userId:
                        type: string
                      role:
                        type: string
                        enum:
                          - admin
                          - member
                          - viewer
                      createdAt:
                        type: string
                        nullable: true
                        format: date-time
                    required:
                      - id
                      - projectId
                      - userId
                      - role
                      - createdAt
                  meta:
                    type: object
                    properties:
                      requestId:
                        type: string
                      timestamp:
                        type: string
                    required:
                      - requestId
                      - timestamp
                required:
                  - success
                  - data
                  - meta
        '400':
          description: Bad request - User is already a member
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      details:
                        type: object
                        additionalProperties:
                          nullable: true
                    required:
                      - code
                      - message
                  meta:
                    type: object
                    properties:
                      requestId:
                        type: string
                      timestamp:
                        type: string
                    required:
                      - requestId
                      - timestamp
                required:
                  - success
                  - error
                  - meta
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      details:
                        type: object
                        additionalProperties:
                          nullable: true
                    required:
                      - code
                      - message
                  meta:
                    type: object
                    properties:
                      requestId:
                        type: string
                      timestamp:
                        type: string
                    required:
                      - requestId
                      - timestamp
                required:
                  - success
                  - error
                  - meta
        '403':
          description: Forbidden - Requires project admin role
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      details:
                        type: object
                        additionalProperties:
                          nullable: true
                    required:
                      - code
                      - message
                  meta:
                    type: object
                    properties:
                      requestId:
                        type: string
                      timestamp:
                        type: string
                    required:
                      - requestId
                      - timestamp
                required:
                  - success
                  - error
                  - meta
        '404':
          description: Project not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      details:
                        type: object
                        additionalProperties:
                          nullable: true
                    required:
                      - code
                      - message
                  meta:
                    type: object
                    properties:
                      requestId:
                        type: string
                      timestamp:
                        type: string
                    required:
                      - requestId
                      - timestamp
                required:
                  - success
                  - error
                  - meta
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      details:
                        type: object
                        additionalProperties:
                          nullable: true
                    required:
                      - code
                      - message
                  meta:
                    type: object
                    properties:
                      requestId:
                        type: string
                      timestamp:
                        type: string
                    required:
                      - requestId
                      - timestamp
                required:
                  - success
                  - error
                  - meta

````