# Organization Users

## List Users

<mark style="color:green;">`GET`</mark> /v1/organizations/users/list

\<Description of the endpoint>

**Headers**

| Name          | Value              |
| ------------- | ------------------ |
| Content-Type  | `application/json` |
| Authorization | `Bearer <token>`   |

**QueryString**

| Name         | Type   | Description         |
| ------------ | ------ | ------------------- |
| action=users | string | Name of the user    |
| `org_id`     | number | The Organization ID |

**Response**

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

```json
{
  "status": 200,
  "users": [
    {
      "email": "string",
      "role": "string",
      "state": "string"
    }
  ],
  "mfa": {
    "view": bool,
    "create": bool,
    "update": bool,
    "delete": bool,
    "usersmgmt": bool
  }
}
```

{% endtab %}
{% endtabs %}

## Add a new user

<mark style="color:green;">`POST`</mark> /v1/organizations/users/add?action=add\_user

\<Description of the endpoint>

**Headers**

| Name          | Value              |
| ------------- | ------------------ |
| Content-Type  | `application/json` |
| Authorization | `Bearer <token>`   |

**Body**

| Name     | Type   | Description         |
| -------- | ------ | ------------------- |
| org\_id  | string | The Organization ID |
| user\_id | string | The user email      |
| role     | string | The role            |
| state    | string | active \| inactive  |

**Response**

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

```json
{
  "status": 200
}
```

{% endtab %}
{% endtabs %}

## Edit organization user

<mark style="color:green;">`POST`</mark>  /v1/organizations/users/update?action=update\_user

\<Description of the endpoint>

**Headers**

| Name          | Value              |
| ------------- | ------------------ |
| Content-Type  | `application/json` |
| Authorization | `Bearer <token>`   |

**Payload**

| Name     | Type   | Description         |
| -------- | ------ | ------------------- |
| `org_id` | string | The Organization ID |
| user\_id | string | The user email      |
| role     | string | The role            |
| state    | string | active \| inactive  |

**Response**

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

```json
{
  "status": 200
}
```

{% endtab %}
{% endtabs %}

## Remove user from Organization

<mark style="color:green;">`POST`</mark> /v1/organizations/users/remove?action=remove\_user

\<Description of the endpoint>

**Headers**

| Name          | Value              |
| ------------- | ------------------ |
| Content-Type  | `application/json` |
| Authorization | `Bearer <token>`   |

**Body**

| Name      | Type   | Description         |
| --------- | ------ | ------------------- |
| `org_id`  | string | The Organization ID |
| `user_id` | string | The user email      |
| reason    | string | The reason          |

**Response**

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

```json
{
  "status": 200
}
```

{% endtab %}
{% endtabs %}
