socket.help

Temporary file sharing, private links and one-time downloads

Upload a file up to 10 MiB with the socket.help API, share it privately or publicly, limit downloads with maxDownloads, and create one-time download links.

Updated 27 October 2026

What file sharing does

File sharing stores one file temporarily and gives you a download link. Use it to hand a build artifact, log or test fixture to a person or another system without setting up storage. Files are private by default, expire after one hour unless you choose otherwise, and can be limited to a number of downloads, including a single one.

Upload a file

POST /api/files with the raw bytes as the body and Content-Type: application/octet-stream. Put the URL-encoded filename (up to 150 characters, no directories) in X-File-Name. The file must be nonempty and at most 10 MiB.

Upload query parameters
ParameterDefaultRules
visibilityprivatepublic or private
maxDownloads100 anonymously, 1,000 with an accountInteger from 1 to that same maximum; 1 creates a one-time link
ttlSeconds3600From 60 to your plan’s maximum retention
persistentfalsetrue requires an active paid plan
Upload a private one-time file
curl -X POST 'https://socket.help/api/files?maxDownloads=1' \
  -H 'Content-Type: application/octet-stream' \
  -H 'X-File-Name: report.txt' \
  --data-binary @report.txt

# 201 Created
{
  "id": "FILE_ID",
  "managementToken": "MANAGEMENT_TOKEN",
  "expiresAt": "2026-10-27T13:00:00.000Z",
  "visibility": "private",
  "accessVersion": "ACCESS_VERSION",
  "accessToken": "ACCESS_TOKEN",
  "name": "report.txt",
  "size": 5,
  "downloadUrl": "https://socket.help/files/FILE_ID",
  "remainingDownloads": 1
}

Download a file

GET /files/{id} returns the file as an attachment (application/octet-stream with a Content-Disposition filename). Each successful GET uses one download. Private files need the access token in X-Access-Token or Authorization: Bearer; workspace credentials with resources:read can also download their own private files.

Two requests do not use a download: HEAD /files/{id}, which returns the size in Content-Length, and GET /files/{id}/info, which returns id, name, size, expiresAt, visibility and remainingDownloads. Requests with a missing or wrong access token also use no download.

Check, then download
curl https://socket.help/files/FILE_ID/info \
  -H "X-Access-Token: $ACCESS_TOKEN"

curl -o report.txt https://socket.help/files/FILE_ID \
  -H "X-Access-Token: $ACCESS_TOKEN"

One-time and limited downloads

When the final allowed download completes, the stored contents are deleted and their storage is released. Later downloads return 404 with "File unavailable, expired, or download limit reached." The file’s metadata stays readable with GET /api/files/{id} (remainingDownloads is 0) until you delete it or it expires.

Manage a file

GET /api/files/{id} returns name, size, visibility, accessVersion, expiresAt, uses, downloadUrl and remainingDownloads. DELETE /api/files/{id} removes the file immediately. A management token cannot download a private file; downloads always need the access token or workspace access.

  • Downloads are always forced attachments with a sandboxing Content-Security-Policy.
  • Files are not scanned for malware. Share only files you trust.
  • When too many file transfers are in progress, the API returns 503 with Retry-After: 5.
  • Through MCP, upload_temporary_file and download_temporary_file handle files up to 64 KiB as Base64. Use HTTP for larger files.

Frequently asked questions

How do I create a one-time download link?

Upload with ?maxDownloads=1. The first successful download removes the file contents; later requests get 404. HEAD requests and GET /files/{id}/info do not use the download.

What is the largest file I can share?

10 MiB per file on every plan, as long as it fits within your plan’s total storage: 32 MiB anonymously, 64 MiB on Free, 512 MiB on Pro and 2 GiB on Team.

Can the recipient open the file in the browser?

Downloads are served as attachments. A private file needs its access token in a request header, so recipients use the receiver page on the website or a client such as curl rather than a bare link.

Does a failed download attempt use up the download limit?

No. Requests without valid access are rejected before a download is counted.