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

# Share a project

> # Payload

```json
{
    "projectId": "string",
    "userId": "string",
    "accessType": "string"
}
```

- `projectId`: Id of the project to be shared. **Required**.
- `userId`: Id of the user to share the project with. **Required**.
- `accessType`: Access level for the user to the project. Accepted values are admin|member. **Required**.

# Response

## 201 Created

```json
{
    "id": "string",
    "email": "string",
    "accessType": "string"
}
```

where:

- `id`: User Access to project identifier.
- `email`: User added to the project email.
- `accessType`: Access type added.

## 400 Bad Request

> User is already added to the project.

> Access type is not valid.

## 401 Unauthorized

> The user doesn't have permissions.

## 404 Not Found

> Target user is not found.

> Project is not found.

## 422 Unprocessable Entity

> `projectId` / `userId` / `accessType` are missing.

## 500 Internal Server Error

> Error occurred while processing the request.

# Payload

```json theme={null}
{
    "projectId": "string",
    "userId": "string",
    "accessType": "string"
}
```

* `projectId`: Id of the project to be shared. **Required**.
* `userId`: Id of the user to share the project with. **Required**.
* `accessType`: Access level for the user to the project. Accepted values are admin|member. **Required**.

# Response

## 201 Created

```json theme={null}
{
    "id": "string",
    "email": "string",
    "accessType": "string"
}
```

where:

* `id`: User Access to project identifier.
* `email`: User added to the project email.
* `accessType`: Access type added.

## 400 Bad Request

> User is already added to the project.

> Access type is not valid.

## 401 Unauthorized

> The user doesn't have permissions.

## 404 Not Found

> Target user is not found.

> Project is not found.

## 422 Unprocessable Entity

> `projectId` / `userId` / `accessType` are missing.

## 500 Internal Server Error

> Error occurred while processing the request.


## OpenAPI

````yaml POST /projects-api/v1/resourcesMappings/members
openapi: 3.0.3
info:
  title: SightX API
  version: 1.0.0
  description: >-
    SightX REST API documentation. Most responses are JSON; some export
    endpoints return files. API access is a paid add-on — contact
    sales@sightx.io for details.
servers:
  - url: https://auth.admin.sightx.io
    description: Authentication (Production)
  - url: https://auth.staging-admin.sightx.io
    description: Authentication (Staging)
security:
  - AuthorizationHeader: []
paths:
  /projects-api/v1/resourcesMappings/members:
    post:
      summary: Share a project
      description: >-
        # Payload


        ```json

        {
            "projectId": "string",
            "userId": "string",
            "accessType": "string"
        }

        ```


        - `projectId`: Id of the project to be shared. **Required**.

        - `userId`: Id of the user to share the project with. **Required**.

        - `accessType`: Access level for the user to the project. Accepted
        values are admin|member. **Required**.


        # Response


        ## 201 Created


        ```json

        {
            "id": "string",
            "email": "string",
            "accessType": "string"
        }

        ```


        where:


        - `id`: User Access to project identifier.

        - `email`: User added to the project email.

        - `accessType`: Access type added.


        ## 400 Bad Request


        > User is already added to the project.


        > Access type is not valid.


        ## 401 Unauthorized


        > The user doesn't have permissions.


        ## 404 Not Found


        > Target user is not found.


        > Project is not found.


        ## 422 Unprocessable Entity


        > `projectId` / `userId` / `accessType` are missing.


        ## 500 Internal Server Error


        > Error occurred while processing the request.
      operationId: share-a-project-post-projects-api-v1-resourcesmappings-members
      parameters:
        - name: Authorization
          in: header
          required: true
          description: Authorization token
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: true
            example:
              projectId: '{{projectId}}'
              userId: '{{userId}}'
              accessType: string
      responses:
        '200':
          description: Successful response
        '201':
          description: Share a project
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
              example:
                id: 5f47f0af250873000f8d7419
                email: test@jdjd.com
                accessType: member
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '500':
          description: Internal server error
      servers:
        - url: https://project.sightx.io
components:
  securitySchemes:
    AuthorizationHeader:
      type: apiKey
      in: header
      name: Authorization
      description: Access token obtained from the m2m-token endpoint.

````