# Organization

## List Organizations

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

\<Description of the endpoint>

**Headers**

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

**QueryString**

| Name        | Type   | Description                          |
| ----------- | ------ | ------------------------------------ |
| action=list | string | The action (will not be needed soon) |

**Response**

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

```json
{
  "status": 200,
  "data": {
    "organizations": [
       {
         "org_id": "string",
         "org_name": "string",
         "role": "string",
         "owner": "string",
         "resources": number
        } 
    ]
  }
}
```

{% endtab %}
{% endtabs %}

## Create Organization

<mark style="color:green;">`POST`</mark> /v1/organizations/create

\<Description of the endpoint>

**Headers**

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

**Query String**

| Name            | Type   | Description                          |
| --------------- | ------ | ------------------------------------ |
| `action=create` | string | The action (will not be needed soon) |

**Response**

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

```json
{
  "status": 200,
  "response": {
    "id": "string"
  }
}
```

{% endtab %}
{% endtabs %}

## Update Organization

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

\<Description of the endpoint>

**Headers**

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

**Querystring**

| Name            | Type   | Description                          |
| --------------- | ------ | ------------------------------------ |
| `org_id`        | string | The Organization ID                  |
| `action=update` | number | The action (will not be needed soon) |

**Response**

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

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

{% endtab %}
{% endtabs %}

## Remove Organization

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

\<Description of the endpoint>

**Headers**

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

**Body**

| Name     | Type   | Description         |
| -------- | ------ | ------------------- |
| `org_id` | string | The Organization ID |

**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.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.
