Skip to content

Packages

The MASV API allows authorized users to manage packages that have been sent and received under their account.

Users can retrieve a list of packages in a Team that meets specific criteria, subject to the MASV access policy.

This endpoint returns a list of packages that were sent to a Team. To retrieve a list of packages received from a Portal, see Listing Portal packages.

MethodRoute
GET/v1.1/teams/{team_id}/packages
NameTypeRequiredDescription
X-API-KEYStringYesAPI key
Content-TypeStringYesMust be application/json
NameTypeRequiredDescription
pageIntegerYesPage number. Default: 1
limitIntegerYesRecords per page, 1–50. Default: 50
sortStringNoSort ascending (fieldname) or descending (-fieldname). Accepted: name, created_at, size, usage_total_bytes, expiry, sender, status, teamspace_id
statusString[]NoFilter by state: new, finalized, expired, archived. Default: [finalized, expired]
nameStringNoSubstring match on package name
senderStringNoMatch sender email
tagsStringNoComma-separated tag IDs
created_at_startStringNoCreated after date. Format: ISO 8601
created_at_endStringNoCreated before date. Format: ISO 8601
teamspacesStringNoComma-separated Teamspace IDs
expiry_startStringNoExpires after date
expiry_endStringNoExpires before date
extra_storageBooleanNoFilter by extra storage usage
NameTypeRequiredDescription
team_idStringYesThe Team ID
Terminal window
curl -H "Content-Type: application/json" \
-H "X-API-KEY: $API_KEY" \
-X GET "https://api.massive.app/v1.1/teams/$TEAM_ID/packages?page=1&limit=3"

Returns 200 OK:

{
"metadata": {
"total": 34
},
"records": [
{
"access_limit": 3,
"access_token": "...",
"contains_virus": false,
"created_at": "2022-11-01T20:09:48.249Z",
"description": "Good day to you",
"expiry": "2022-11-06T20:09:48.175Z",
"id": "E1XGADMXPSLEE9NGH7WRWJ069D",
"name": "Delta's Team - 202211012009",
"sender": "[email protected]",
"size": 41610,
"state": "expired",
"total_files": 1
}
]
}
PropertyDescription
metadataContains total — the total number of matching packages
recordsArray of up to limit package objects
MethodRoute
PUT/v1/packages/{package_id}
NameTypeRequiredDescription
X-Package-TokenStringYesPackage access token
Content-TypeStringYesMust be application/json
NameTypeRequiredDescription
nameStringYesName for the package
Terminal window
curl -d '{"name": "$NAME"}' \
-H "X-Package-Token: $PACKAGE_TOKEN" \
-H "Content-Type: application/json" \
-X PUT https://api.massive.app/v1/packages/$PACKAGE_ID

Returns 200 OK with the updated package object.

MASV stores an uploaded package until its expiry time. When it expires, MASV deletes the package. Expired packages cannot be downloaded and links do not give access to the package.

MethodRoute
PUT/v1/packages/{package_id}/expiry
NameTypeRequiredDescription
X-Package-TokenStringYesPackage access token
Content-TypeStringYesMust be application/json
NameTypeRequiredDescription
expiryStringYesDate-time expiry. Format: ISO 8601
unlimited_storageBooleanNoIf true, omit expiry from the request. Default: false
Terminal window
curl -d '{"expiry": "$EXPIRY"}' \
-H "X-Package-Token: $PACKAGE_TOKEN" \
-H "Content-Type: application/json" \
-X PUT https://api.massive.app/v1/packages/$PACKAGE_ID/expiry

Returns 200 OK with the updated package object.

When MASV deletes a package, it deletes the package’s files and custom metadata from MASV storage. It keeps the package’s name, recipient list, and related information, and sets the package’s state to expired.

MethodRoute
DELETE/v1/packages/{package_id}
NameTypeRequiredDescription
X-Package-TokenStringYesPackage access token
Terminal window
curl -H "X-Package-Token: $PACKAGE_TOKEN" \
-X DELETE https://api.massive.app/v1/packages/$PACKAGE_ID

Returns 204 No Content.

Authorized users can archive or unarchive any package that was previously in an expired state. The unarchive endpoint puts the package back to an expired state.

MethodRoute
PUT/v1/packages/{package_id}/archive
PUT/v1/packages/{package_id}/unarchive
Terminal window
curl -H "X-Package-Token: $PACKAGE_TOKEN" \
-H "Content-Type: application/json" \
-X PUT https://api.massive.app/v1/packages/$PACKAGE_ID/archive

Returns 204 No Content.

Archive or unarchive multiple expired packages sent by the Team within a date range.

MethodRoute
PUT/v1/teams/{team_id}/archive
PUT/v1/teams/{team_id}/unarchive
NameTypeRequiredDescription
expiry_startStringYesEarliest package expiry date-time
expiry_endStringYesLatest package expiry date-time
Terminal window
curl -d '{"expiry_start": "$EXPIRY_START", "expiry_end": "$EXPIRY_END"}' \
-H "X-API-KEY: $API_KEY" \
-H "Content-Type: application/json" \
-X PUT https://api.massive.app/v1/teams/$TEAM_ID/archive

Returns 200 OK:

{
"total_updated": 51
}

Archive or unarchive multiple expired packages received through a Portal.

MethodRoute
PUT/v1/teams/{team_id}/inbox/archive
PUT/v1/teams/{team_id}/inbox/unarchive

Same body and response format as archiving sent packages above.

PropertyTypeDescription
access_limitIntegerDefault access limit for new links
access_tokenStringAccess token for managing the package
contains_virusBooleanWhether the package contains a virus
created_atStringCreation date-time (ISO 8601)
custom_expiryBooleanWhether a custom expiry was set
custom_metadata_idStringID of the associated form response
descriptionStringPackage description
expiryStringExpiry date-time (ISO 8601)
idStringUnique package ID
nameStringPackage name
passwordStringDefault password for new links (empty if none)
recipientsString[]Recipient email addresses
senderStringSender’s email address
sizeIntegerPackage size in bytes
stateStringStatus: new, finalized, expired, or archived
teamspaceObjectThe Teamspace the package belongs to
total_filesIntegerNumber of files in the package
unlimited_storageBooleanWhether unlimited storage is enabled
updated_atStringLast modified date-time
chunk_sizeIntegerChunk size in bytes for file uploads (0 if not specified)