Tags can be assigned to packages to facilitate better package tracking and searching. One package can only have one active tag at a time.
Method Route POST/teams/{team_id}/tags
Name Type Required Description X-API-KEYString Yes API key Content-TypeString Yes Must be application/json
Name Type Required Description team_idString Yes The Team ID to bind the tag to
Name Type Required Description nameString Yes The name you want to give the new tag
curl -d ' {"name": "$NAME"} ' \
-H " X-API-KEY: $API_KEY " \
-H " Content-Type: application/json " \
-X POST https://api.massive.app/v1/teams/ $TEAM_ID /tags
After a successful request, this endpoint returns 201 Created:
"id" : " 01FZGG2QQQTJV9CJ1Q2ZNXVKCQ " ,
"team_id" : " 01FX8CYWMQAEGW8AYSNQRGAMRM " ,
"created_at" : " 2022-03-31T17:23:57.815Z " ,
"updated_at" : " 2022-03-31T13:23:57.815Z "
Property Description idThe ID of the newly created tag nameThe name you gave the tag team_idThe ID of the Team this tag belongs to activeWhether or not this tag is active created_atWhen this tag was created updated_atWhen this tag was last updated
Method Route GET/teams/{team_id}/tags
Name Type Required Description X-API-KEYString Yes API key
Name Type Required Description team_idString Yes The ID of the Team whose tags you are fetching
curl -H " X-API-KEY: $API_KEY " \
-X GET https://api.massive.app/v1/teams/ $TEAM_ID /tags
After a successful request, this endpoint returns 200 OK:
"id" : " 01FZGG2QQQTJV9CJ1Q2ZNXVKCQ " ,
"team_id" : " 01FX8CYWMQAEGW8AYSNQRGAMRM " ,
"created_at" : " 2022-03-31T17:23:57.815Z " ,
"updated_at" : " 2022-03-31T13:23:57.815Z "
To delete a tag, you will need its ID.
Method Route DELETE/tags/{tag_id}
Name Type Required Description X-API-KEYString Yes API key
Name Type Required Description tag_idString Yes The ID of the tag you wish to delete
curl -H " X-API-KEY: $API_KEY " \
-X DELETE https://api.massive.app/v1/tags/ $TAG_ID
After a successful request, this endpoint returns 204 No Content with no body.
Tags can be applied to multiple entities. This section covers how to apply tags to entities that support it.
Tags are received as a JSON object containing one or more of the following properties:
Name Type Description idString The ID of the tag you wish to apply nameString The name of the tag you wish to apply
If id is provided, the API checks your Team’s tags for a matching ID. If the tag does not exist, no tag will be attached and no error is returned.
If name is provided and id was either not provided or invalid, a tag will be found or created on your Team using the provided name.
The order of operations for applying tags:
If id was provided: get tag by ID. If found, use this tag. If not found, continue to name check.
If name was provided: check if your Team has a tag with this name. If it does, use this tag. If not, create a tag with the provided name and use it.
You can tag packages on creation or on update using the correct API endpoints.
Method Route POST/teams/{team_id}/packages
Name Type Required Description X-API-KEYString Yes API key Content-TypeString Yes Must be application/json
Name Type Required Description team_idString Yes The ID of the Team to create a package on
Name Type Required Description access_limitInteger No Override default number of downloads for the package descriptionString Yes Description of the package nameString Yes Name of the package passwordString No Password required to download the package recipientsString[] Yes Email address of recipient(s) tagTag No A tag object used to set the package’s tag
curl -d ' {"name":"$NAME","description":"$DESCRIPTION","recipients":["$RECIPIENTS"],"tag":{"name":"test tag"}} ' \
-H " X-API-KEY: $API_KEY " \
-H " Content-Type: application/json " \
-X POST https://api.massive.app/v1/teams/ $TEAM_ID /packages
After a successful request, this endpoint returns 201 Created with the package object including the applied tag.
Method Route PUT/packages/{package_id}
Name Type Required Description X-Package-TokenString Yes Package JSON Web Token with write access Content-TypeString Yes Must be application/json
Name Type Required Description package_idString Yes The ID of the package being updated
When updating a package, provide the complete package object. To update a package’s tag, include a tag object as described in the Tag Objects section above. To remove a tag from a package, remove the tag property from the request body.
curl -d ' {"tag":{"name":"new tag name"}} ' \
-H " X-Package-Token: $PACKAGE_TOKEN " \
-H " Content-Type: application/json " \
-X PUT https://api.massive.app/v1/packages/ $PACKAGE_ID