Transfers
Related guides: Send files, Receive files, and Shared links.
POST /upload
Accepts a file from the authenticated user.
Access: session (Bearer token or cookie).
Body: multipart/form-data or application/octet-stream.
multipart/form-data fields:
| Field | Required | Description |
|---|---|---|
file | Yes | File content. |
d | No | Recipient or destination user. |
m | No | Email associated with the transfer. |
c | No | Mobile phone associated with the transfer. |
h | No | Expected SHA-256 hash of the file. |
n | No | Sender identification or email. |
i | No | Additional information or tags for the transfer. |
application/octet-stream headers (file in the raw body):
| Header | Required | Equivalent to |
|---|---|---|
X-STCPDIRECTLINK-FILENAME | Yes | File name |
X-STCPDIRECTLINK-DESTINATION | No | d |
X-STCPDIRECTLINK-EMAIL | No | m |
X-STCPDIRECTLINK-MOBILE | No | c |
X-STCPDIRECTLINK-HASH | No | h |
X-STCPDIRECTLINK-EMAIL-FROM | No | n |
X-STCPDIRECTLINK-INFO | No | i |
Responses
| HTTP | Meaning | Body |
|---|---|---|
200 | File received. | UploadResponse |
400 | Invalid request or parameter. | — |
401 | Credential not accepted. | — |
403 | Operation not allowed by the user or environment rules. | — |
POST /directlink/v2/upload HTTP/1.1
Host: api.example.com
Authorization: Bearer <access_token>
Content-Type: application/octet-stream
X-STCPDIRECTLINK-FILENAME: document.pdf
X-STCPDIRECTLINK-DESTINATION: <destination>
<file-bytes>GET /download/list and /download/list/backup
List the files available to the user in the main area (/download/list) or in the backup area (/download/list/backup).
Access: session (Bearer token or cookie).
| Parameter | In | Required | Default | Description |
|---|---|---|---|---|
page | query | No | 0 | Results page. Missing or invalid values are treated as 0. |
Responses
| HTTP | Meaning | Body |
|---|---|---|
200 | List of files. | FileListResponse |
401 | Credential not accepted. | — |
The main listing returns links to /download/file; the backup listing, to /download/file/backup.
GET /download/file and /download/file/backup
Download a listed file. You call them through the linkURL from the listing.
Access: secure link and Bearer token (in the Authorization header or in the session cookie) of the same user who made the listing. The link alone does not give access to the file.
Responses
| HTTP | Meaning | Body |
|---|---|---|
200 | File content. | application/octet-stream |
400 | Missing credential. | — |
401 | Invalid or expired token. | — |
403 | The token belongs to another user, download is disabled or access was blocked. | — |
404 | File or link not found. | — |
Response headers
| Header | Description |
|---|---|
Content-Type | MIME type inferred from the file extension; application/octet-stream when unknown. |
Content-Disposition | attachment; filename="<file-name>". |
Content-Length | File size, in bytes. |
X-STCPDIRECTLINK-HASH | SHA-256 hash provided when the file was uploaded (empty when none was provided). |
GET /download
Delivers a file from a shared secure link.
Access: secure link.
| Parameter | In | Required | Description |
|---|---|---|---|
p | query | When the link requires it | Download PIN. The other parameters come in the link and must not be changed. |
Responses
| HTTP | Meaning | Body |
|---|---|---|
200 | File content. | application/octet-stream |
404 | File or link not found. | — |
The response headers are the same as for /download/file.
GET /download/pin
Generates a PIN, sends it to the configured recipient, and returns the link to continue at /download.
Access: secure link issued by the service to start the PIN delivery.
Responses
| HTTP | Meaning | Body |
|---|---|---|
200 | PIN sent; the response contains the download link. | DownloadPinResponse |