# Team

## Method & Permission

| API         | GET   | POST  | PUT | PATCH | DELETE |
| ----------- | ----- | ----- | --- | ----- | ------ |
| Team List   | Admin | Admin | -   | -     | -      |
| Team Detail | Admin | -     | -   | Admin | Admin  |

## Team List

<mark style="color:blue;">`GET`</mark> `{{ base_url }} /organizations/team/list/{level}/{sid}/{serializer}/`

#### Path Parameters

| Name       | Type   | Description      |
| ---------- | ------ | ---------------- |
| level      | string | organization     |
| sid        | string | organization sid |
| serializer | string |                  |

#### Headers

| Name  | Type   | Description |
| ----- | ------ | ----------- |
| token | string |             |

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

```yaml
# serializer = name
{
    "page_size": 10,
    "page_number": 1,
    "page_count": 1,
    "count": 1,
    "next": null,
    "previous": null,
    "add_permission": true,
    "results": [
        {
            "sid": "xxx",
            "name": "xxx"
        }
    ]
}

# serializer = list
{
    "page_size": 10,
    "page_number": 1,
    "page_count": 1,
    "count": 1,
    "next": null,
    "previous": null,
    "add_permission": true,
    "results": [
        {
            "sid": "xxx",
            "name": "xxx",
            "description": "Admin group to manage the Labii account.",
            "is_archived": false,
            "change_permission": true
        }
    ]
}

# serializer = detail
{
    "page_size": 10,
    "page_number": 1,
    "page_count": 1,
    "count": 1,
    "next": null,
    "previous": null,
    "add_permission": true,
    "results": [
        {
            "sid": "xxx",
            "name": "xxx",
            "description": "Admin group to manage the Labii account.",
            "members": [
                {
                    "sid": "xxx",
                    "name": "xxx"
                },
            ],
            "is_archived": false,
            "change_permission": true
        }
    ]
}
```

{% endtab %}
{% endtabs %}

## Team List

<mark style="color:green;">`POST`</mark> `{{ base_url }} /organizations/team/list/{level}/{sid}/{serializer}/`

#### Path Parameters

| Name       | Type   | Description      |
| ---------- | ------ | ---------------- |
| level      | string | organization     |
| sid        | string | organization sid |
| serializer | string |                  |

#### Headers

| Name  | Type   | Description |
| ----- | ------ | ----------- |
| token | string |             |

#### Request Body

| Name         | Type   | Description                         |
| ------------ | ------ | ----------------------------------- |
| name         | string |                                     |
| description  | string |                                     |
| is\_archived | string |                                     |
| members      | array  | array of organization personnel sid |

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

```yaml
{
    "sid": "xxx",
    "name": "xxx",
    "description": "Admin group to manage the Labii account.",
    "members": [
        {
            "sid": "xxx",
            "name": "xxx"
        },
    ],
    "is_archived": false,
    "change_permission": true
}
```

{% endtab %}
{% endtabs %}

## Team Detail

<mark style="color:blue;">`GET`</mark> `{{ base_url }} /organizations/team/detail/{sid}/`

#### Path Parameters

| Name | Type   | Description |
| ---- | ------ | ----------- |
| sid  | string |             |

#### Headers

| Name  | Type   | Description |
| ----- | ------ | ----------- |
| token | string |             |

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

```yaml
{
    "sid": "xxx",
    "name": "xxx",
    "description": "Admin group to manage the Labii account.",
    "members": [
        {
            "sid": "xxx",
            "name": "xxx"
        },
    ],
    "is_archived": false,
    "change_permission": true
}
```

{% endtab %}
{% endtabs %}

## Team Detail

<mark style="color:purple;">`PATCH`</mark> `{{ base_url }} /organizations/team/detail/{sid}/`

#### Path Parameters

| Name | Type   | Description |
| ---- | ------ | ----------- |
| sid  | string |             |

#### Headers

| Name  | Type   | Description |
| ----- | ------ | ----------- |
| token | string |             |

#### Request Body

| Name         | Type    | Description |
| ------------ | ------- | ----------- |
| name         | string  |             |
| description  | string  |             |
| members      | array   |             |
| is\_archived | boolean |             |

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

```yaml
{
    "sid": "xxx",
    "name": "xxx",
    "description": "Admin group to manage the Labii account.",
    "members": [
        {
            "sid": "xxx",
            "name": "xxx"
        },
    ],
    "is_archived": false,
    "change_permission": true
}
```

{% endtab %}
{% endtabs %}

## Team Detail

<mark style="color:red;">`DELETE`</mark> `{{ base_url }} /organizations/team/detail/{sid}/`

#### Path Parameters

| Name | Type   | Description |
| ---- | ------ | ----------- |
| sid  | string |             |

#### Headers

| Name  | Type   | Description |
| ----- | ------ | ----------- |
| token | string |             |

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

```
{}
```

{% 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.labii.com/api/methods/team.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.
