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