# 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 %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.cloudplans.io/api-reference/organization-users.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
