Complete reference for slskdN's REST API.
All API endpoints are prefixed with /api/v0/ (API version 0).
Base URL: http://localhost:5000/api/v0/
slskdN supports multiple authentication methods:
- Default authentication method for web interface
- Session cookies set after login
- CSRF protection enabled for mutating operations
- Obtain JWT token via
/api/v0/sessionendpoint - Include in
Authorization: Bearer <token>header - No CSRF protection required
- Configure API key in settings
- Include in
X-API-Key: <key>header - No CSRF protection required
slskdN uses URL-based versioning: /api/v{version}/
- Current version:
v0 - Future versions:
v1,v2, etc. - Version specified in route:
[Route("api/v{version:apiVersion}/[controller]")]
{
"data": { ... },
"status": "ok"
}{
"type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
"title": "Bad Request",
"status": 400,
"detail": "Invalid request parameters",
"instance": "/api/v0/endpoint"
}Some validation endpoints preserve their existing string error body and add
the stable code in the X-Slskd-Error-Code response header. CORS exposes this
header when configured. Clients should use the code for localization; the
English string body remains available to clients that do not provide
translations. Unknown or raw server error text is not a stable UI message and
should be shown through a generic localized error in the Web UI.
Current stable validation codes:
| Code | English source message |
|---|---|
source-feed-import.source-text-required |
SourceText is required |
source-feed-import.limit-must-be-positive |
Limit must be greater than 0 |
songid.source-required |
SongID source is required. |
songid.request-invalid |
SongID request is invalid. |
songid.analysis-queue-failed |
SongID analysis could not be queued. |
GET /api/v0/application- Get application stateDELETE /api/v0/application- Shutdown application (admin only)
PUT /api/v0/server- Connect to SoulseekDELETE /api/v0/server- Disconnect from SoulseekGET /api/v0/server- Get server status
GET /api/v0/session- Get current sessionPOST /api/v0/session- Create session (login)DELETE /api/v0/session- End session (logout)
Room operations accept ordinary names in the existing /rooms/joined/{roomName} routes. For room names that contain /, use the query-addressed routes below so routing does not depend on encoded slashes in a path segment:
GET /api/v0/rooms/by-name?roomName=%2Fmu%2F- Get a joined roomGET /api/v0/rooms/by-name/messages?roomName=%2Fmu%2F&since=0- Read room messagesGET /api/v0/rooms/by-name/users?roomName=%2Fmu%2F- List room usersPOST /api/v0/rooms/by-name/messages?roomName=%2Fmu%2F- Send a room messagePOST /api/v0/rooms/by-name/ticker?roomName=%2Fmu%2F- Set a room tickerPOST /api/v0/rooms/by-name/members?roomName=%2Fmu%2F- Add a room memberDELETE /api/v0/rooms/by-name?roomName=%2Fmu%2F- Leave a room
Pass the full room name as the roomName query value; URL-encode it as normal for a query string. The existing routes remain available for compatibility. If a request supplies both a route name and a different roomName query value, the API returns 400 Bad Request.
POST /api/v0/searches- Start a new searchGET /api/v0/searches?limit=250&afterStartedAt=2026-08-20T12%3A00%3A00Z&afterId=00000000-0000-0000-0000-000000000001&source=wishlist- List a page of searchesGET /api/v0/searches/{id}- Get search detailsGET /api/v0/searches/{id}/responses- Get search responsesPUT /api/v0/searches/{id}- Update searchDELETE /api/v0/searches/{id}- Cancel/delete searchDELETE /api/v0/searches- Clear all searches
Search listing remains a plain JSON array. limit controls the maximum number
of rows, offset skips previously requested rows, and source optionally
filters to manual, wishlist, or auto-replace. To continue a changing
search list without shifting its page boundary, pass the last row's
startedAt as afterStartedAt and its id as afterId; supply both values
together and do not combine them with a nonzero offset. The default limit is
500. The Web UI starts with the live hub's capped 500-row snapshot, then uses
REST continuation pages of 250; if the hub is unavailable, its REST fallback
starts at 250. It merges page rows into the live list.
POST /api/v0/searches/{searchId}/items/{itemId}/download- Download search resultPOST /api/v0/searches/{searchId}/items/{itemId}/stream- Stream search result (Pod/Mesh only)
The search-result download action retains the originating search ID and query with the queued request. Both values are available to completed-destination templates.
GET /api/v0/telemetry/prometheus- Get Prometheus metrics as text or JSONGET /api/v0/telemetry/metrics- Get Prometheus metrics as text or JSONGET /api/v0/telemetry/prometheus/kpis- Get the selected metrics as JSONGET /api/v0/telemetry/metrics/kpi- Get the selected metrics as JSON
The two metrics endpoints accept repeatable include and exclude query
parameters. Each value is a regular expression matched against a metric-family
name; multiple includes are combined with OR, and any matching exclude removes
that family. For example, ?include=^slskd_&exclude=secret keeps application
metrics except names containing secret. Text and JSON responses use the same
filter rules. With no filter parameters, the existing complete output is
preserved.
Each parameter accepts at most 8 patterns, each no longer than 128 characters.
Patterns have a 100 ms match timeout. Empty or invalid patterns, excessive
counts or lengths, and filters that exceed the timeout return 400 Bad Request.
The scrape endpoint configured by metrics.url accepts the same query
parameters and continues to use its configured Basic authentication.
GET /api/v0/telemetry/reports/transfers/summary- Summarize completed transfers
The summary defaults to the seven days ending at the request time. Supply
start and end to choose another interval. Each direction is grouped by
final transfer state; successful rows report the count and totalBytes based
on bytes actually transferred.
POST /api/v0/transfers/downloads/{username}- Queue one or more downloadsGET /api/v0/transfers/downloads- List downloadsGET /api/v0/transfers/downloads/{username}/{id}- Get download detailsGET /api/v0/transfers/downloads/{username}/{id}/position- Get queue positionDELETE /api/v0/transfers/downloads/{username}/{id}- Cancel downloadGET /api/v0/transfers/changes- Read a transfer snapshot or incremental changesGET /api/v0/transfers/history- Read a stable page of successful history
Each queued file may include batchId, batchExternalId, searchId, and
searchText. These optional values are retained with the download request and
can be used by the global completed-destination template. Existing clients can
continue to omit them. A request-level destination query value chooses its
root and keeps its existing precedence over the global subdirectory template.
[
{
"filename": "Music/Album/Track.flac",
"size": 24823104,
"batchId": "c681ca67-a187-4d7f-8e6d-13699f468ad7",
"batchExternalId": "lidarr-album-481",
"searchId": "7b82c49b-39d7-4ac4-a61d-97144f7336bc",
"searchText": "Artist Album"
}
]See Transfer Operations for supported destination tokens, collision policy, filesystem-safety rules, and CLI/YAML configuration.
Transfer timestamp fields are serialized as UTC ISO 8601 values with a Z
suffix. Convert them to local time only for display; retain the UTC value for
sorting and comparisons.
The transfer changes response keeps its existing shape for unpaged requests.
For a bounded initial snapshot, add limit (1 through 500); direction may be
download or upload. The response includes hasMore and, when another page
exists, nextAfterRequestedAt and nextAfterId. Continue the same snapshot by
passing its cursor as asOf and both continuation values as
afterRequestedAt and afterId. Pages are ordered by request time, newest
first, with transfer ID as a stable tie-breaker. Both continuation values must
be supplied together and require the original asOf watermark. A continuation
keeps that snapshot boundary, so rows changed afterward arrive through the
incremental since query instead. The since and page parameters cannot be
combined.
Successful history has a separate stable page route. It accepts direction,
an optional asOf watermark, offset, and limit (1 through 500; default
250). The Web UI loads active and unsuccessful rows in bounded pages and loads
successful history separately. Its retry and cancel-all actions apply to loaded
rows; the completed-row clear action applies to the server list.
GET /api/v0/downloads/requests?state=active|completed|failed|cancelled- List request-level records, optionally filtered by stateGET /api/v0/downloads/requests/{id}- Get a request and its transfer attemptsPATCH /api/v0/downloads/requests/{id}/name- Rename its display label with{"name":"New label"}POST /api/v0/downloads/requests/{id}/cancel- Cancel the current attempt and mark the request cancelled
These endpoints operate on the stable user-facing request. The existing
/api/v0/transfers/downloads endpoints expose individual transfer attempts.
Terminal requests are removed by retention.transfers.removed only after their
download attempts have expired and been deleted. See Transfer Operations
for retention behavior and timestamp details.
GET /api/v0/transfers/uploads- List uploadsGET /api/v0/transfers/uploads/{username}/{id}- Get upload detailsDELETE /api/v0/transfers/uploads/{username}/{id}- Cancel upload
POST /api/v0/multisource/swarm- Start swarm downloadPOST /api/v0/multisource/swarm/async- Start swarm download (async)GET /api/v0/multisource/jobs/{jobId}- Get swarm job statusGET /api/v0/multisource/jobs- List active swarm jobs
GET /api/v0/traces/{jobId}/summary- Get swarm trace summary with peer contributions
GET /api/v0/fairness/summary- Get fairness/contribution summary
GET /api/jobs- List all jobs (filterable, sortable, paginated)GET /api/jobs/{id}- Get job detailsPOST /api/jobs/mb-release- Create MusicBrainz release jobPOST /api/jobs/discography- Create discography download jobPOST /api/jobs/label-crate- Create label crate download job
GET /api/v0/users- List usersGET /api/v0/users/{username}- Get user detailsGET /api/v0/users/{username}/group- Get user group membershipGET /api/v0/users/{username}/files- Browse user files
GET /api/v0/users/{username}/notes- Get user notesPOST /api/v0/users/{username}/notes- Create/update user noteDELETE /api/v0/users/{username}/notes- Delete user note
GET /api/v0/conversations- List saved private-message conversationsGET /api/v0/conversations/{username}- Get a private-message conversationPUT /api/v0/conversations/{username}- Acknowledge messages for a conversationPOST /api/v0/conversations/{username}- Send one private message to a userDELETE /api/v0/conversations/{username}- Delete a saved conversationPOST /api/v0/conversations/batch- Send one native Soulseek multi-recipient private message
Batch private-message request:
{
"usernames": ["alice", "bob"],
"message": "hello"
}Recipients are trimmed, deduplicated case-insensitively, and capped at 100 unique usernames by the runtime. slskdN persists one outbound local conversation row per recipient after the native send succeeds.
These endpoints expose native Soulseek server commands through explicit authenticated API calls. They are rate-limited through the Soulseek safety limiter and do not run automatically during normal search, browse, room, transfer, or one-to-one private-message workflows.
POST /api/v0/soulseek/interests- Add a liked interestDELETE /api/v0/soulseek/interests/{item}- Remove a liked interestPOST /api/v0/soulseek/hated-interests- Add a hated interestDELETE /api/v0/soulseek/hated-interests/{item}- Remove a hated interest
Interest request:
{
"item": "ambient"
}GET /api/v0/soulseek/recommendations- Get recommendations for the logged-in accountGET /api/v0/soulseek/recommendations/global- Get global recommendationsGET /api/v0/soulseek/users/{username}/interests- Get a user's liked and hated interestsGET /api/v0/soulseek/users/similar- Get users similar to the logged-in accountGET /api/v0/soulseek/items/{item}/recommendations- Get recommendations related to an item stringGET /api/v0/soulseek/items/{item}/similar-users- Get users associated with an item string
Recommendation response:
{
"recommendations": [
{ "item": "ambient", "score": 42 }
],
"unrecommendations": []
}User interests response:
{
"username": "alice",
"liked": ["ambient"],
"hated": ["noise"]
}Native recommendation item strings are discovery/search seeds, not verified catalog identities. API clients should keep review steps before download automation.
These endpoints expose durable opinion records used by Soulseek interest imports, operator annotations, peer trust, and pod affinity. Native Soulseek liked/hated interests remain public weak signals; explicit trust/distrust records are separate and can target users, files, content hashes, artists, albums, tracks, pods, sources, mesh peers, search terms, or other identifiers.
GET /api/v0/opinions- List opinion records with optional filtersGET /api/v0/opinions/summary- Summarize opinions for a subjectPOST /api/v0/opinions- Submit or replace an opinion recordDELETE /api/v0/opinions/{id}- Delete an opinion record
Summary request:
GET /api/v0/opinions/summary?subjectType=User&subjectId=alice&scope=globalOpinion request:
{
"issuer": "local:operator",
"subjectType": "User",
"subjectId": "alice",
"kind": "Trust",
"strength": 0.75,
"confidence": 0.9,
"scope": "global",
"source": "operator",
"reason": "Completed transfers and useful chat history",
"evidence": [
{ "type": "transfer", "value": "completed" }
]
}GET /api/v0/soulseek/mesh-rendezvous/status- Get rendezvous enablement, interest tag, and privacy textPOST /api/v0/soulseek/mesh-rendezvous/interest- Publish the publicslskdn-mesh-v1interest tagDELETE /api/v0/soulseek/mesh-rendezvous/interest- Remove the publicslskdn-mesh-v1interest tagGET /api/v0/soulseek/mesh-rendezvous/users- Load Soulseek similar-user rendezvous candidatesGET /api/v0/soulseek/mesh-rendezvous/discover- Load rendezvous candidates and probe runtime capability descriptorsGET /api/v0/soulseek/peer-capabilities- Return known runtime peer capability records
Rendezvous endpoints are disabled unless mesh.enable_soulseek_rendezvous / mesh.enableSoulseekRendezvous is enabled. Publishing the rendezvous interest intentionally makes the Soulseek account recognizable as a slskdN mesh participant. Runtime peer capability records come from signed slskdN capability descriptors exchanged over Soulseek peer-message connections when available.
Discovery response:
{
"interestTag": "slskdn-mesh-v1",
"users": [
{ "username": "mesh-peer", "rating": 10 }
],
"capabilityRecords": [
{
"username": "mesh-peer",
"peerId": "peer-id",
"features": ["mesh_sync", "swarm_download"],
"overlayPort": 50305,
"messageType": "Hello",
"nonce": "nonce",
"observedAt": "2026-05-05T00:00:00Z",
"signed": true
}
]
}GET /api/v0/pods- List podsGET /api/v0/pods/{podId}- Get pod detailsPOST /api/v0/pods- Create podPUT /api/v0/pods/{podId}- Update podDELETE /api/v0/pods/{podId}- Delete podPOST /api/v0/pods/{podId}/join- Join podPOST /api/v0/pods/{podId}/leave- Leave pod
GET /api/v0/pods/{podId}/channels/{channelId}/messages- Get messagesPOST /api/v0/pods/{podId}/channels/{channelId}/messages- Send message
GET /api/v0/collections- List collectionsGET /api/v0/collections/{id}- Get collection detailsPOST /api/v0/collections- Create collectionPUT /api/v0/collections/{id}- Update collectionDELETE /api/v0/collections/{id}- Delete collection
GET /api/v0/share-grants- List share grants (shared with me)GET /api/v0/share-grants/{id}- Get share grant detailsGET /api/v0/share-grants/{id}/manifest- Get collection manifestPOST /api/v0/share-grants/{id}/backfill- Backfill entire collection
GET /api/v0/mesh- Get mesh statusGET /api/v0/mesh/health- Get mesh health
GET /api/v0/dht/status- Get DHT status
GET /api/v0/hashdb/stats- Get database statisticsGET /api/v0/hashdb/schema- Get schema version
GET /api/v0/wishlist- List wishlist itemsPOST /api/v0/wishlist- Create wishlist itemPUT /api/v0/wishlist/{id}- Update wishlist itemDELETE /api/v0/wishlist/{id}- Delete wishlist itemPOST /api/v0/wishlist/{id}/run- Run wishlist search now
GET /api/v0/capabilities- Get peer capabilities
GET /api/v0/relay/streams/{contentId}- Stream content (range requests supported)
GET /api/v0/library-health- Get library health statusPOST /api/v0/library-health/scan- Start library health scan
GET /api/v0/options- Get configuration optionsPUT /api/v0/options- Update configuration (if remote config enabled)
Many list endpoints support pagination:
GET /api/v0/endpoint?limit=20&offset=0
Parameters:
limit: Number of items per page (default: varies by endpoint)offset: Number of items to skip (default: 0)
Response:
{
"count": 100,
"items": [ ... ],
"hasMore": true
}Some endpoints support filtering:
GET /api/v0/jobs?type=discography&status=running
Some endpoints support sorting:
GET /api/v0/jobs?sortBy=created_at&sortOrder=desc
Parameters:
sortBy: Field to sort bysortOrder:ascordesc
All endpoints return appropriate HTTP status codes:
200 OK: Success201 Created: Resource created204 No Content: Success, no content400 Bad Request: Invalid request401 Unauthorized: Authentication required403 Forbidden: Insufficient permissions404 Not Found: Resource not found409 Conflict: Resource conflict500 Internal Server Error: Server error501 Not Implemented: Feature not implemented
Some endpoints have rate limiting:
- Mesh gateway: 100 calls/minute per peer (default)
- Service calls: Configurable per service
Rate limit headers (when applicable):
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 95
X-RateLimit-Reset: 1640995200
slskdN does not currently expose Swagger/OpenAPI documentation. API discovery is done via:
- Source code: Controllers in
src/slskd/**/API/**Controller.cs - Route attributes:
[Route("api/v{version:apiVersion}/...")] - HTTP methods:
[HttpGet],[HttpPost],[HttpPut],[HttpDelete]
By feature:
- Search:
src/slskd/Search/API/Controllers/ - Transfers:
src/slskd/Transfers/API/Controllers/ - Pods:
src/slskd/PodCore/API/Controllers/ - Collections:
src/slskd/Sharing/API/
By route pattern:
# Find all controllers
grep -r "\[Route" src/slskd/**/API/**Controller.cs
# Find specific endpoint
grep -r "searches" src/slskd/**/API/**Controller.csFrontend uses API client libraries in src/web/src/lib/:
api.js- Base API clientsearches.js- Search operationstransfers.js- Download/upload operationsjobs.js- Job managementslskdn.js- Combined stats and utilities
Example usage:
import * as searchesLib from '../lib/searches';
const results = await searchesLib.startSearch('query', {
providers: ['pod', 'scene'],
filters: { minBitrate: 320 }
});Some features use SignalR for real-time updates:
- Search results: Real-time search result streaming
- Transfer progress: Real-time download/upload progress
- Events: System events and notifications
Connection:
import { HubConnectionBuilder } from '@microsoft/signalr';
const connection = new HubConnectionBuilder()
.withUrl('/hubs/events')
.build();
await connection.start();curl -X POST http://localhost:5000/api/v0/searches \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <token>" \
-d '{
"query": "artist album",
"filters": {
"minBitrate": 320
}
}'curl -X POST "http://localhost:5000/api/v0/searches/{searchId}/items/{itemId}/download" \
-H "Authorization: Bearer <token>"curl http://localhost:5000/api/v0/multisource/jobs/{jobId} \
-H "Authorization: Bearer <token>"curl "http://localhost:5000/api/jobs?type=discography&status=running&limit=20&offset=0" \
-H "Authorization: Bearer <token>"- Use API libraries: Don't call endpoints directly from components
- Handle errors: Always handle API errors gracefully
- Return safe values: API libs should return empty arrays, not undefined
- Use pagination: Don't fetch all data at once
- Respect rate limits: Don't spam API endpoints
- Use appropriate auth: JWT for API clients, cookies for web UI
- v0: Current version (initial API)
Future versions will maintain backward compatibility where possible.
See Also:
- Getting Started - User guide
- How It Works - Architecture overview
- Configuration - Configuration options