# API ## Create a short link ```http POST /api/shorten ``` ### Parameters | Name | Type | Description | |------------| --- |-----------------------------------------| | `link` | `string` | **Required**. The URL to shorten. | | `password` | `string` | **Optional**. The password of the link. | ### Response ```json { "status": 200, "data": { "original": "https://google.com", "shorten": "http://quecto.local/abc123" } } ``` (The type of the body is `multipart/form-data`) (Precise the domain name in the `config.js` file) ## Get a short link ```http GET /api/s/:code ``` ### Query | Name | Type | Description | |------------| --- |-----------------------------------------| | `password` | `string` | **Optional**. The password of the link. | ### Response ```json { "status": 200, "data": { "original": "https://google.com", "shorten": "http://quecto.local/abc123" } } ``` ## Know if this instance is a quecto instance ```http GET /api/quectoCheck ``` ### Response ```json { "status": 200, "data": { "quecto": true } } ```