Yoink uses a lightweight session system to associate download jobs with individual clients. When a client registers, it receives a uniqueDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/coah80/yoink/llms.txt
Use this file to discover all available pages before exploring further.
clientId that is passed on every subsequent job request. The server uses this identifier to enforce per-client concurrency limits (a maximum of 3 concurrent jobs), route progress events, and authorize cancel and finish-early requests. Sessions are entirely ephemeral — they are held in memory and expire automatically when idle.
Session Lifecycle
A typical session flows through four stages:- Connect —
POST /api/connectregisters a new client and returns aclientId. - Use — Include
clientIdas a query parameter on download, convert, compress, and other job requests. - Heartbeat — Call
POST /api/heartbeat/{clientId}every ~15 seconds to keep the session alive. - Expiry — If no heartbeat arrives within 60 seconds the session is automatically cleaned up and its job slots are released.
A heartbeat interval of 15 seconds is recommended — well within the 30-second heartbeat timeout and the 60-second session idle timeout. Browsers can use
setInterval to fire the heartbeat request in the background while a download is in progress.POST /api/connect
Registers a new client session and returns a UUIDclientId. No request body is required. The session is created immediately and the idle timer starts.
Request
200 OK
A UUID v4 string that uniquely identifies this client session. Store this value — it must be passed as the
clientId query parameter on all job submission requests.Each call to
/api/connect creates a new, independent session. If you call it multiple times, you will receive multiple clientId values, each with its own job-count quota. Reuse the same clientId for the lifetime of a browser tab or application instance.POST /api/heartbeat/
Resets the idle timer for an existing session and returns the number of currently active jobs associated with that client. Call this endpoint on a recurring interval (every 15 seconds is recommended) while the client has work in progress or is expecting to submit more jobs. If theclientId does not exist (session already expired), the heartbeat call re-registers it transparently, so a client that missed its window can recover by heartbeating again.
Path Parameters
The UUID returned by
POST /api/connect. Must match an active session.200 OK
true when the heartbeat was recorded successfully.The number of jobs currently tracked against this client session. Use this value to display a live job counter in your UI or to decide whether to submit additional jobs.
400 Bad Request
clientId path segment is missing or empty.
Session Timeouts
Two distinct timeout values govern session health:| Constant | Value | Effect |
|---|---|---|
HeartbeatTimeout | 30 seconds | Amount of time the server waits between heartbeats before marking the session as stale. |
SessionIdleTimeout | 60 seconds | Amount of time with no heartbeat activity before the session is fully evicted and its resources released. |
Per-Client Job Limits
The server enforces a hard limit of 3 concurrent jobs perclientId (MaxJobsPerClient). Attempting to submit a fourth job while three are already active returns an error response from the relevant job endpoint. The activeJobs field in heartbeat responses reflects this count in real time.