Transfers
Share
Generate an instantly shareable URL for a single file.
POST
/
share
curl -X POST https://api.byteport.com/share \
-H "Authorization: Bearer bp_xxxxxxxxx" \
-H "User-Agent: my-app/1.0" \
-H "Content-Type: application/json" \
-d '{
"file": "Production Bucket/reports/Q1.pdf",
"password": "hunter2"
}'
{
"url": "https://byteport.link/s/abc123"
}
Returns an instantly shareable URL to any single file. Byteport does not cache
or prefetch — if the source is offline, the URL will be unable to pull the
file and will instead show a fallback message.
Body parameters
string
required
Filename to share. Regex supported, but the request will return a specific
error code if it matches to more than one source file.
string
Text password required to unlock the provided URL.
Example
curl -X POST https://api.byteport.com/share \
-H "Authorization: Bearer bp_xxxxxxxxx" \
-H "User-Agent: my-app/1.0" \
-H "Content-Type: application/json" \
-d '{
"file": "Production Bucket/reports/Q1.pdf",
"password": "hunter2"
}'
{
"url": "https://byteport.link/s/abc123"
}
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Response
Shareable URL returned
curl -X POST https://api.byteport.com/share \
-H "Authorization: Bearer bp_xxxxxxxxx" \
-H "User-Agent: my-app/1.0" \
-H "Content-Type: application/json" \
-d '{
"file": "Production Bucket/reports/Q1.pdf",
"password": "hunter2"
}'
{
"url": "https://byteport.link/s/abc123"
}

