Skip to content

Links

The MASV API allows authorized users to manage download links for their packages. All requests require authentication using a package token authorized to manage the package. This can be retrieved from the access_token property in the Package response.

Authorized users can create additional direct-download links or send a link to a specific email recipient after the upload has been finalized. To create a link, the package must be in the new or finalized state. Links created while the upload is in progress will remain inactive until the package is finalized.

MethodRoute
POST/packages/{package_id}/links
NameTypeRequiredDescription
X-Package-TokenStringYesPackage JSON Web Token
Content-TypeStringYesMust be application/json
NameTypeRequiredDescription
emailStringNoRecipient email address or empty for direct-download link
passwordStringNoPassword that user must enter before being able to view and download the package files
Terminal window
curl -d '{"email":"$EMAIL", "password":"$PASSWORD"}' \
-H "X-Package-Token: $PACKAGE_TOKEN" \
-H "Content-Type: application/json" \
-X POST https://api.massive.app/v1/packages/$PACKAGE_ID/links

After a successful request, this endpoint returns 201 Created:

{
"access_limit": 5,
"access_limit_enabled": true,
"active": true,
"download_secret": "bqkBtnPwvmkgJpHN",
"email": "[email protected]",
"expiry": "2020-12-04T13:14:01.038Z",
"id": "01EKX32ZSAPSCFC97W5Z423QKY",
"password": "****"
}
PropertyDescription
access_limitNumber of times a download can be initiated using this link before it becomes locked
access_limit_enabledWhether an access_limit is enforced
activeWhether the link can be used to download the package
idUnique identifier for the link record
download_secretA key provided with id to request a token to download the file
emailRecipient’s email (defaults to uploader email if not provided)
passwordIndicates if a password is attached to the link. **** means a password is required

Once the link has been created, an email will be sent to the recipient automatically (if provided) and it can be used to access the package on MASV via: https://get.massive.io/{link_id}?secret={download_secret}

Authorized users can retrieve a list of all links that belong to a package.

MethodRoute
GET/packages/{package_id}/links
NameTypeRequiredDescription
X-Package-TokenStringYesPackage JSON Web Token
Content-TypeStringYesMust be application/json
NameTypeRequiredDescription
package_idStringYesThe package ID returned during create package request
Terminal window
curl -H "X-Package-Token: $PACKAGE_TOKEN" \
-H "Content-Type: application/json" \
-X GET https://api.massive.app/v1/packages/$PACKAGE_ID/links

This endpoint returns 200 OK with an array of link objects.

Authorized users can disable a download link to prevent new downloads and remove access to package details from the download page. The link record will remain for historical purposes.

MethodRoute
DELETE/packages/{package_id}/links/{link_id}
NameTypeRequiredDescription
X-Package-TokenStringYesPackage JSON Web Token
Content-TypeStringYesMust be application/json
NameTypeRequiredDescription
package_idStringYesThe package ID
link_idStringYesThe link ID returned during create link request
Terminal window
curl -H "X-Package-Token: $PACKAGE_TOKEN" \
-H "Content-Type: application/json" \
-X DELETE https://api.massive.app/v1/packages/$PACKAGE_ID/links/$LINK_ID

This endpoint returns 204 No Content with an empty body. Any downloads in progress at the time of deletion may complete normally, but the download page will become inaccessible and new downloads cannot be started.