All guides
User

Create an API key and register a webhook

Issue a token for your integration and configure an endpoint to receive supported short-link events. This page is for the person connecting software, not for ordinary manual link creation.

Step-by-step guide

Before you start

  • Your plan must allow API/webhook features. Use an endpoint you control, and keep real API keys out of shared screenshots and documents.
Open this feature
  1. Open /portal/short-links/api on your site.

How to use it

Create and use an API key

  1. Open /portal/short-links/api. Enter a recognizable API key name, such as Reporting integration.
  2. Select Create. Copy the displayed token privately and save it in your integration’s protected settings.
  3. Use the page’s documented endpoints with an Authorization: Bearer header. A token belongs in the header, not a public link or browser address.
  4. Check the API response and then the Links list for the returned record. Use Revoke on an old key only when the integration should lose that access.

Add an event endpoint

  1. In the webhook form, enter Name and your receiving Endpoint URL.
  2. Choose Link created, Link clicked or both, according to the events your receiver handles. Select Add webhook.
  3. Use Pause or Activate to control the endpoint’s active state.
  4. Review the version-specific compatibility note and confirm the signing secret/request format with the administrator. Then inspect your receiver’s logs for a controlled subscribed event. A saved endpoint does not prove successful delivery.

Create one practice link with an API client

This request creates an active link. Use a controlled destination, replace the example site/token and do not repeat a successful POST just to inspect it again.

  1. In your API client, choose POST and use https://YOUR_SITE/api/short-links, replacing YOUR_SITE with this installation’s actual hostname.
  2. Add Authorization: Bearer YOUR_API_KEY and Content-Type: application/json. Replace the token privately; do not put it in the URL.
  3. Select a raw JSON body, replace the example destination and send the following object once.
{
  "name": "Support page",
  "destination_url": "https://example.com/support"
}

On a successful create, this version returns HTTP 201 with a data object. Inspect id, short_url, destination_url and status, then open the returned short URL and confirm the matching record in Links.

For a read-only follow-up, use GET https://YOUR_SITE/api/short-links with the same Bearer header. A failed/uncertain response should be investigated before retrying a create request.

Fields and examples

Field or choiceHow to use it
API key nameA recognizable internal name; maximum 120 characters in this version.
Bearer tokenKeep it private. The application stores a token hash; retain the plain token when it is shown rather than assuming the list can reveal it later.
Endpoint URLYour receiving endpoint, not a link destination. It must satisfy the form’s URL validation.
EventsLink created and Link clicked select different event types; subscribe only to events your receiver can process.

Check your finished result

  • Confirm the authenticated API response and intended workspace record.
  • Check receiving logs for the subscribed event and verify its signature using the application’s documented format.

Problems and fixes

What you seeWhat to do next
API request is unauthorizedCheck the Bearer header, copied token and whether the key was revoked.
No webhook arrivesCheck active state, selected event, plan/feature availability and receiver logs.
Key name or webhook limit rejectedReview the named validation/plan limit instead of repeatedly creating entries.

Technical reference

Role-scoped source references

Pinned commit: ca125291cce57358ac4842e50928bc31fc6eab07

Source-only route information
MethodSource-default route
LIVEWIRE/portal/short-links/api
Unmapped fields — not user instructions

These fields belong to this role’s source handler, but their screen labels were not confirmed.

Source keyHandler
keyNamemodules/AppShortLinkApi/Livewire/ShortLinkApiSettings.php
namemodules/AppShortLinkApi/Livewire/ShortLinkApiSettings.php
urlmodules/AppShortLinkApi/Livewire/ShortLinkApiSettings.php