Skip to content

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:

FieldRequiredDescription
fileYesFile content.
dNoRecipient or destination user.
mNoEmail associated with the transfer.
cNoMobile phone associated with the transfer.
hNoExpected SHA-256 hash of the file.
nNoSender identification or email.
iNoAdditional information or tags for the transfer.

application/octet-stream headers (file in the raw body):

HeaderRequiredEquivalent to
X-STCPDIRECTLINK-FILENAMEYesFile name
X-STCPDIRECTLINK-DESTINATIONNod
X-STCPDIRECTLINK-EMAILNom
X-STCPDIRECTLINK-MOBILENoc
X-STCPDIRECTLINK-HASHNoh
X-STCPDIRECTLINK-EMAIL-FROMNon
X-STCPDIRECTLINK-INFONoi

Responses

HTTPMeaningBody
200File received.UploadResponse
400Invalid request or parameter.—
401Credential not accepted.—
403Operation 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).

ParameterInRequiredDefaultDescription
pagequeryNo0Results page. Missing or invalid values are treated as 0.

Responses

HTTPMeaningBody
200List of files.FileListResponse
401Credential 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

HTTPMeaningBody
200File content.application/octet-stream
400Missing credential.—
401Invalid or expired token.—
403The token belongs to another user, download is disabled or access was blocked.—
404File or link not found.—

Response headers

HeaderDescription
Content-TypeMIME type inferred from the file extension; application/octet-stream when unknown.
Content-Dispositionattachment; filename="<file-name>".
Content-LengthFile size, in bytes.
X-STCPDIRECTLINK-HASHSHA-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.

ParameterInRequiredDescription
pqueryWhen the link requires itDownload PIN. The other parameters come in the link and must not be changed.

Responses

HTTPMeaningBody
200File content.application/octet-stream
404File 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

HTTPMeaningBody
200PIN sent; the response contains the download link.DownloadPinResponse