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


---

# 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.makeshorter.com/api-integration/link-group.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.
