> For the complete documentation index, see [llms.txt](https://akshaypilankar.gitbook.io/mycontract/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://akshaypilankar.gitbook.io/mycontract/client-api/account-related-apis.md).

# Account related apis

## Signup

<mark style="color:green;">`POST`</mark> `https://api.mycontract.co:3001/v1/:adminId/client/signup`

This endpoint allows you to signup as client.

#### Path Parameters

| Name    | Type   | Description       |
| ------- | ------ | ----------------- |
| adminId | string | Admin's unique id |

#### Request Body

| Name      | Type   | Description       |
| --------- | ------ | ----------------- |
| email     | string | user's email      |
| password  | string | user's password   |
| firstName | string | user's first name |
| lastName  | string | user's last name  |

{% tabs %}
{% tab title="200 " %}

```javascript
{
    "status": true,
    "message": "signup successful"
}
```

{% endtab %}

{% tab title="409 " %}

```javascript
{
    "status": false,
    "message": "email is already taken"
}
```

{% endtab %}
{% endtabs %}

## Login

<mark style="color:green;">`POST`</mark> `https://api.mycontract.co:3001/v1/client/login`

This endpoint allows you to login as client.

#### Request Body

| Name     | Type   | Description          |
| -------- | ------ | -------------------- |
| email    | string | User's email address |
| password | string | User's password      |

{% tabs %}
{% tab title="200 " %}

```
{
    "status": true,
    "token": // JWT token
}
```

{% endtab %}

{% tab title="302 " %}

```
{
    "token": false,
    "message": "Hello! Active your Account! Check Your email for Activation Link."
}
```

{% endtab %}
{% endtabs %}

## Project list

<mark style="color:blue;">`GET`</mark> `https://api.mycontract.co:3001/v1/client/projects`

#### Headers

| Name          | Type   | Description |
| ------------- | ------ | ----------- |
| Authorization | string | JWT token   |

{% tabs %}
{% tab title="200 " %}

```
{
    "status": true,
    "data": []
}
```

{% endtab %}

{% tab title="400 " %}

```
{ 
    status: false, 
    message: "error occurred" 
}
```

{% endtab %}
{% endtabs %}

<mark style="color:blue;">`GET`</mark> `https://api.mycontract.co:3001/v1/client/details`

#### Headers

| Name          | Type   | Description |
| ------------- | ------ | ----------- |
| Authorization | string | JWT token   |

{% tabs %}
{% tab title="200 " %}

```
{
    "status": true,
    "data": {
        "name": bob parker,
        "email": "bob@xyz.com",
        "verification": "notInitiated",
        "accountStatus": true,
        "package1": 0,
        "package2": 0,
        "isd_code": +1,
        "mobile": 9876543210,
        "ProjectConfiguration": [],
        "XDCEBalance": 0,
        "ETHBalance": 0
    }
}
```

{% endtab %}

{% tab title="400 " %}

```
{ 
    status: false,
    message: "error occurred"
 }
```

{% endtab %}
{% endtabs %}

<mark style="color:blue;">`GET`</mark> `https://api.mycontract.co:3001/v1/client/password/reset`

#### Request Body

| Name  | Type   | Description        |
| ----- | ------ | ------------------ |
| email | string | user email address |

{% tabs %}
{% tab title="200 " %}

```
{
    "error": "email sent",
    "status": true
}
```

{% endtab %}
{% endtabs %}
