Skip to content

Endpoints

https://smll.app/api

Some endpoints require an API key. Those endpoints are marked with an asterisk (*).

Get all links of the user.

Response

{
"link": {
"id": string,
"code": string,
"isEnabled": boolean,
"links": {
"url": string,
"password"?: string
}[],
"originalLink": string,
"shortenedLink": string,
"metrics": {
"views": number,
"year": number,
"month": number,
}[],
"tags": string[],
"createdAt": Date,
"isSmartLink": boolean,
"isProtectedByPassword": boolean,
"maxVisits"?: number,
"deleteAt"?: Date,
"activeAt"?: Date
}
}

POST /link

Create a link.

Body

{
"link": {
"links": [
{
"url": string,
"password"?: string
}
], // At least one link is required
"code"?: string,
"maxVisits"?: number,
"tags"?: string[],
"activeAt"?: Date,
"deleteAt"?: Date
}
}

Response

{
"link": {
"id": string,
"code": string,
"isEnabled": boolean,
"links": {
"url": string,
"password"?: string
}[],
"originalLink": string,
"shortenedLink": string,
"metrics": {
"views": number,
"year": number,
"month": number,
}[],
"tags": string[],
"createdAt": Date,
"isSmartLink": boolean,
"isProtectedByPassword": boolean,
"maxVisits"?: number,
"deleteAt"?: Date,
"activeAt"?: Date
}
}

POST /link/access/<link-code>

Get link of a shorted link.

Body

{
"password"?: string
}

Response

{
"link": string
}

Get a link by its code.

Response

{
"link": {
"id": string,
"code": string,
"isEnabled": boolean,
"links": {
"url": string,
"password"?: string
}[],
"originalLink": string,
"shortenedLink": string,
"metrics": {
"views": number,
"year": number,
"month": number,
}[],
"tags": string[],
"createdAt": Date,
"isSmartLink": boolean,
"isProtectedByPassword": boolean,
"maxVisits"?: number,
"deleteAt"?: Date,
"activeAt"?: Date
}
}

Update a link.

Body

{
"link": {
"links"?: [
{
"url": string,
"password"?: string
}
], // At least one link is required
"code"?: string,
"maxVisits"?: number,
"tags"?: string[],
"activeAt"?: Date,
"deleteAt"?: Date
}
}

Response

{
"success": boolean
}

Delete a link.

Response

{
"success": boolean
}