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

# Volunteers Abode API

## Login

<mark style="color:green;">`POST`</mark> `https://vabode.herokuapp.com/auth/login`

Volunteer / NGO login

#### Request Body

| Name     | Type   | Description              |
| -------- | ------ | ------------------------ |
| password | string | User password            |
| email    | string | Registered email address |

{% tabs %}
{% tab title="200 User logged in successfully" %}

```
{    "token": "<random_string>",    "message": "User added successfully!",    "id": "<string>"}
```

{% endtab %}

{% tab title="422 Could not find a cake matching this query." %}

```
{    "message": "Invalid email or password."}

```

{% endtab %}
{% endtabs %}

## Sign Up

<mark style="color:green;">`POST`</mark> `https://vabode.herokuapp.com/auth/signup`

Register a Volunteer / NGO admin&#x20;

#### Request Body

| Name     | Type   | Description                                     |
| -------- | ------ | ----------------------------------------------- |
| userName | string | User name                                       |
| email    | string | Email address                                   |
| password | string | User password                                   |
| userType | number | 0 - Volunteer, 1 - Social Worker, 2 - Volunteer |

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

```
{"token":"<random_string>", "message":"User added successfully!", "id":"<random_string"}
```

{% endtab %}

{% tab title="422 " %}

```
{"error":"Please enter valid credentials"}
```

{% endtab %}
{% endtabs %}
