upload_file
Upload a file and get a link
Use this when the user wants to share a file, document, image or HTML page as a link. Publish a file and get a public Link in Seconds URL that opens in any browser (no sign-in for the viewer). If the user attached a file in the chat, pass it in `file` (any size the plan allows). Otherwise pass the file as text in `content` (HTML, Markdown, CSV, SVG, JSON...) or as base64 in `content_base64` (PDF, images, ZIP...), up to 3 MB; for bigger files use create_upload_url. The account's plan limits apply. Per-file limit: 250 MB on the Free plan, 500 MB on Pro and Lifetime. A bigger file is refused, so tell the user it is over the limit instead of asking for it. Programs and scripts (.exe, .msi, .dmg, .apk, .app, .bat, .sh, .jar, .dll and similar) are always blocked: say so and do not try to upload them.
Parametersfileslugtitlecontentfilenamecontent_typecontent_base64
create_upload_url
Start a large upload
For files too big to send inline: returns a short-lived upload URL (valid 10 minutes). PUT the raw file bytes to it with the given Content-Type header (for example with curl), then call finish_upload with the returned path. Per-file limit: 250 MB on the Free plan, 500 MB on Pro and Lifetime. A bigger file is refused, so tell the user it is over the limit instead of asking for it. Programs and scripts (.exe, .msi, .dmg, .apk, .app, .bat, .sh, .jar, .dll and similar) are always blocked: say so and do not try to upload them.
Parametersfilenamerequiredsize_bytesrequiredcontent_type
finish_upload
Finish a large upload
Call after PUTting the file to the URL from create_upload_url. Checks and scans the file, then returns its public link.
Parameterspathrequiredslugtitlefilenamerequiredcontent_type
List the links on this Link in Seconds account, newest first, with their URLs and status.
Parameterslimit
get_link_analytics
Analytics for one link
Read-only. Use this when the user asks whether someone opened a link, or how it did. How one of the account's links performed: views, unique visitors, time on the file, how far readers got (pages for PDFs, watch-through for video and audio, scroll depth for pages), countries, devices, traffic sources and the busiest hour, over a UTC window. Pass the slug or the full link URL.
Parametersslugrequiredrange
get_account_analytics
Analytics across all links
Read-only. The whole account's analytics over a UTC window: views, unique visitors, time on files, countries, devices, traffic sources, busiest hour and the top links.
Parametersrange