kutt - v4.0.0
    Preparing search index...

    Function updateKuttLinkV2

    • Updates a short link using the Kutt v2 API.

      Parameters

      • linkId: string

        The link's unique ID.

      • link: TUpdateLinkV2

        The short-link address, destination URL, and optional changes.

      • options: TAPIOptions = {}

        Per-request base URL, API key, and timeout in milliseconds. Omitted settings use KUTT_CONFIG.

      Returns Promise<TLinkV2>

      The updated link, with createdAt and updatedAt converted to Date objects.

      HTTPError If the API returns an unsuccessful HTTP response.

      If the request fails, times out, or the response cannot be decoded.

      import { updateKuttLinkV2 } from "kutt";

      const link = await updateKuttLinkV2(
      "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      { address: "article", target: "https://example.com/updated-article", expireIn: "2 days" },
      { apiKey: "YOUR_API_KEY" },
      );