# Link

## create

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

This endpoint allows you to create new short link.

#### Request Body

| Name      | Type   | Description                                                                                             |
| --------- | ------ | ------------------------------------------------------------------------------------------------------- |
| longUrl   | string | long url to redirect                                                                                    |
| title     | string | link title to identify. no need to be unique.                                                           |
| domain    | string | if you have custom domains, you can set what domain will be given.                                      |
| linkGroup | string | if you have link groups, you can set name of link group and new link will be member of this link group. |
| password  | string | enable password protection if your license package contains.                                            |

{% tabs %}
{% tab title="200 Link successfuly is created" %}

```
{    
    "isSuccess": true,    
    "message": "Success Message",    
    "data": "https://mnts.ws/123456"
}
```

{% endtab %}

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

```
{    
    "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.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.
