> For the complete documentation index, see [llms.txt](https://docs.makeshorter.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.makeshorter.com/api-integration/link-group.md).

# Link Group

## list

<mark style="color:blue;">`GET`</mark> `https://api.makeshorter.com/v1/linkgroup/list/:page`

This endpoint gives all active link groups. Pagination allows to return only 50 items for each result.

#### Path Parameters

| Name | Type   | Description                                                                     |
| ---- | ------ | ------------------------------------------------------------------------------- |
| page | number | page number. If page number is 2, request gives items for 50-100. Default is 1. |

{% tabs %}
{% tab title="200 Retruns list of link groups." %}

```
{
    "isSuccess": true,
    "message": "Success Message",
    "data": [
        {
            "id": "00000000-0000-0000-0000-000000000000",
            "name": "Link Group Name",
            "description": "Link Group Description"
        }
        ...
    ]
}
```

{% endtab %}

{% tab title="400 Request gets error" %}

```
{
    "isSuccess": false,
    "message": "Error Message",
    "data": null
}
```

{% endtab %}
{% endtabs %}

## create

<mark style="color:green;">`POST`</mark> `https://api.makeshorter.com/v1/linkgroup/create`

This endpoint creates new link group and returns it

#### Request Body

| Name        | Type   | Description            |
| ----------- | ------ | ---------------------- |
| description | string | Link group description |
| name        | string | Link group name        |

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

```
{
    "isSuccess": true,
    "message": "Success Message",
    "data": 
        {
            "id": "00000000-0000-0000-0000-000000000000",
            "name": "Link Group Name",
            "description": "Link Group Description"
        }
}
```

{% endtab %}

{% tab title="400 " %}

```
{
    "isSuccess": false,
    "message": "Error Message",
    "data": null
}
```

{% endtab %}
{% endtabs %}

## update

<mark style="color:green;">`POST`</mark> `https://api.makeshorter.com/v1/linkgroup/update`

This endpoint update existing link group.

#### Request Body

| Name        | Type   | Description                |
| ----------- | ------ | -------------------------- |
| description | string | Link group new description |
| name        | string | Link group new name        |
| id          | string | Link group id              |

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

```
{
    "isSuccess": true,
    "message": "Success Message",
    "data": 
        {
            "id": "00000000-0000-0000-0000-000000000000",
            "name": "Link Group New Name",
            "description": "Link Group New Description"
        }
}
```

{% endtab %}

{% tab title="400 " %}

```
{
    "isSuccess": false,
    "message": "Error Message",
    "data": null
}
```

{% endtab %}
{% endtabs %}

## delete

<mark style="color:red;">`DELETE`</mark> `https://api.makeshorter.com/v1/linkgroup/:id`

#### Path Parameters

| Name | Type   | Description   |
| ---- | ------ | ------------- |
| id   | string | Link Group id |

{% tabs %}
{% tab title="200 Link group is deleted " %}

```
{
    "isSuccess": true,
    "message": "Success Message",
    "data": null
}
```

{% endtab %}

{% tab title="400 " %}

```
{
    "isSuccess": false,
    "message": "Error Message",
    "data": null
}
```

{% endtab %}
{% endtabs %}
