Links

Operations around Links management.

Endpoints

GET NEXT_PUBLIC_API_URL/links
POST NEXT_PUBLIC_API_URL/links
GET NEXT_PUBLIC_API_URL/links/:linkId
POST NEXT_PUBLIC_API_URL/links/:linkId
DELETE NEXT_PUBLIC_API_URL/links/:linkId

Returns all user links.

Parameters

ParameterTypeDescription
searchstring(optional) Search text.
pagenumber(optional, default 1) Determines page.
pageSizenumber(optional) Determines how many results to return.

Sample response

{
  "data": [
    {
      "id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
      "name": "Vision",
      "url": "https://example.com",
      "slug": "xxxxxxxx",
      "userId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
      "organizationId": null,
      "createdAt": "2025-10-27T18:49:39.383Z",
      "updatedAt": "2025-10-27T18:49:39.383Z",
      "deletedAt": null
    }
  ],
  "count": 1,
  "page": 1,
  "pageSize": 20
}

POST NEXT_PUBLIC_API_URL/links

Creates a link.

Parameters

ParameterTypeDescription
namestringThe link's name.
urlstringThe link's destination URL.
slugstringThe link's URL slug (minimum 8 characters).
organizationIdstring(optional) The ID of the organization the link will be created under.

Request body

{
  "name": "Vision",
  "url": "https://example.com",
  "slug": "vision123"
}

Sample response

{
  "id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "name": "Vision",
  "url": "https://example.com",
  "slug": "vision123",
  "userId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "organizationId": null,
  "createdAt": "2025-10-27T18:49:39.383Z",
  "updatedAt": "2025-10-27T18:49:39.383Z",
  "deletedAt": null
}

GET NEXT_PUBLIC_API_URL/links/:linkId

Gets a link by ID.

Sample response

{
  "id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "name": "Vision",
  "url": "https://example.com",
  "slug": "xxxxxxxx",
  "userId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "organizationId": null,
  "createdAt": "2025-10-27T18:49:39.383Z",
  "updatedAt": "2025-10-27T18:49:39.383Z",
  "deletedAt": null
}

POST NEXT_PUBLIC_API_URL/links/:linkId

Updates a link.

Parameters

ParameterTypeDescription
namestring(optional) The link's name.
urlstring(optional) The link's destination URL.
slugstring(optional) The link's URL slug (minimum 8 characters).

Request body

{
  "name": "Vision",
  "url": "https://example.com"
}

Sample response

{
  "id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "name": "Vision",
  "url": "https://example.com",
  "slug": "xxxxxxxx",
  "userId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "organizationId": null,
  "createdAt": "2025-10-27T18:49:39.383Z",
  "updatedAt": "2025-10-30T23:06:01.824Z",
  "deletedAt": null
}

DELETE NEXT_PUBLIC_API_URL/links/:linkId

Deletes a link.

Sample response

{
  "ok": true
}