Appearance
Short Links Overview
Sosyabot ships a built-in URL shortener. Use it to wrap long URLs inside posts, get per-tenant click analytics, and rotate destinations without re-editing posts.
Endpoints
GET /api/v1/short-links list (auth)
POST /api/v1/short-links create (auth)
GET /api/v1/short-links/:slug/stats per-link stats (auth)
DELETE /api/v1/short-links/:slug delete (auth)Model
typescript
{
slug: string, // unique
url: string, // target
user: ObjectId,
team_id: ObjectId | null,
click_count: number,
last_clicked_at: Date | null,
}Public path
The redirect path is configured via SHORT_LINK_BASE_URL (e.g. https://sosya.bot). Hits land at <base>/<slug>, log a click record, increment click_count, and 302 to url.