Skip to content

Portals

Portal Creation

Authorized users can create portals under any team they belong to (subject to access policy).

POST /teams/{team_id}/portals

HEADERS
Name Type Required Description
X-User-Token String Yes User JSON Web Token
Content-Type String Yes Must be application/json
BODY
Name Type Required Description
name String Yes Name of the portal to create
subdomain String Yes Subdomain of the portal to create
message String Yes Message displayed on the portal upload page
recipients Array of Strings Yes Email(s) that will receive notifications for portal uploads
access_code String No Access code to be able to access portal upload page
has_access_code Boolean No Enable/disable access code for portal page
active Boolean Yes Enable/disable portal page
logo_url String No URL for logo to be displayed on portal page
background_url String No URL for background image of the portal page
primary_color String No HTML hex code for primary color used on portal page
REQUEST
curl -H "X-User-Token: $USER_TOKEN" -H "Content-Type: application/json" -X POST https://api.massive.app/v1/teams/$TEAM_ID/portals -d '{"name": "$NAME", "message": "$MESSAGE", "subdomain": "$SUBDOMAIN", "recipients": ["$R1_EMAIL","$R2_EMAIL"], "access_code": "$ACCESSCODE"}'

Where:

  • $USER_TOKEN is the auth token returned during auth request (refer to Authorization: Login section of this document)
  • $TEAM_ID is the team ID returned during auth request (refer to Authorization: Login section of this document)

After a successful request where a portal has been created, this endpoint will return an HTTP response with a status code of 201 Created and a body similar to the one below.

{
  "active": true,
  "id": "01CTDNW11G67NKHQW5JE8TP2TJ",
  "message": "Hello world!",
  "name": "My portal",
  "recipients": [
    "[email protected]",
    "[email protected]"
  ],
  "subdomain": "customesub"
}

Where:

  • id is the created portal ID.

Listing Portals

Authorized users can list all portals under any team they belong to (subject to access policy).

GET /teams/{team_id}/portals

HEADERS
Name Type Required Description
X-User-Token String Yes User JSON Web Token
REQUEST
curl -H `X-User-Token: $USER_TOKEN` -X GET https://api.massive.app/v1/teams/$TEAM_ID/portals

Where:

  • $USER_TOKEN is the auth token returned during auth request (refer to Authorization: Login section of this document)
  • $TEAM_ID is the team ID returned during auth request (refer to Authorization: Login section of this document)

After a successful request, this endpoint will return an HTTP response with a status code of 200 OK and a body similar to the one below.

[
    {
        "id": "01CNH24NGPTJTMXWWM2J8E2V8V",
        "message": "Hello world!",
        "name": "My portal",
        "subdomain": "myportal",
        "has_access_code": false,
        "recipients": [
            "[email protected]",
            "[email protected]"
        ]
    },
    {
        "id": "01CNEM9H2AG0MVH33X0EVDY8AQ",
        "message": "Hello world, again!",
        "name": "My other portal",
        "subdomain": "myotherportal",
        "has_access_code": false,
        "recipients": [
            "[email protected]"
        ]
    },
    ...
]

Listing Portal Packages

Authorized users can list packages uploaded to any portal under their team(s) subject to access policy). The listing will only include packages that have been completed.

GET /portals/{portal_id}/packages

HEADERS
Name Type Required Description
X-User-Token String Yes User JSON Web Token
REQUEST
curl -H "X-User-Token: $USER_TOKEN" -X GET https://api.massive.app/v1/portals/$PORTAL_ID/packages

Where:

  • $USER_TOKEN is the auth token returned during auth request (refer to Authorization: Login section of this document)
  • $PORTAL_ID is the portal ID returned during create request (refer to Portals: Creating Team Portals of this document) or listing of team portals request.(refer to Portals: Listing Team Portals of this document)

After a successful request, this endpoint will return an HTTP response with a status code of 200 OK and a body similar to the one below.

[
  {
    "id": "01CNH4M62513B3FT70FXNFS6YS",
    "created_at": "2018-08-22T11:39:07.717-04:00",
    "updated_at": "2018-08-22T11:39:10.271-04:00"
    "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1MzU1NTgxMDksImx2bCI6ImYiLCJzdWIiOiIwMUNOSDRNNjI1MTNCM0ZUNzBGWE5GUzZZUyIsInR5cCI6InBhY2thZ2UifQ.T1tTJkqcaaptWtHg59Ta94LcYl8DomtnY8ieYVdqP_I",
    "completed": true,
    "name": "Test package #1",
    "description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit",
    "sender": "[email protected]",
  },
  {
    "id": "01CNH4WNNKZC5FWVG1V100JTXH",
    "created_at": "2018-08-22T11:43:45.843-04:00",
    "updated_at": "2018-08-22T11:43:47.111-04:00"
    "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1MzU1NTgxMDksImx2bCI6ImYiLCJzdWIiOiIwMUNOSDRXTk5LWkM1RldWRzFWMTAwSlRYSCIsInR5cCI6InBhY2thZ2UifQ.Y2gI_a_utNNlU_nujZch0zLIDdZ5EDMtQpohIFifvXA",
    "completed": true,
    "name": "Another package",
    "description": "At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium",
    "sender": "[email protected]",
  }
]

Where:

  • id is the package ID, which is needed to interact with the package (like downloading or deleting)
  • created_at and updated_at are the date/time at which the package was created and last updated
  • access_token is the auth token required to interact with the package (like downloading or deleting)
  • completed whether this package has been uploaded completely or not. Packages in transit will have this value set to false

Listing Portal Package Files

Authorized users can list package files uploaded to any portal under their team(s) subject to access policy). The listing will include all files that are a part of the uploaded package.

GET /packages/{package_id}/files

HEADERS
Name Type Required Description
X-Package-Token String Yes Package JSON Web Token
REQUEST
curl -H "X-Package-Token: $PACKAGE_TOKEN" -X GET https://api.massive.app/v1/packages/$PACKAGE_ID/files

Where:

  • $PACKAGE_ID is the ID of the package (refer to Portals: Listing Packages of this document)
  • $PACKAGE_TOKEN is the package access token (refer to Portals: Listing Packages of this document)

After a successful request, this endpoint will return an HTTP response with a status code of 200 OK and a body similar to the one below.

[
  {
    "id": "01CNH4M62EFJFX5F7XTC9GZWDF",
    "kind": "file",
    "name": "photo.jpg",
    "path": "/some/directory",
    "size": 193022
    "last_modified": "2018-08-22T11:39:10.280-04:00",
  },
  {
    "id": "01CNH4M86PKYWPKSK8EWEFEQPS",
    "kind": "file",
    "name": "my-image.png",
    "path": "/anotherpath",
    "size": 72012
    "last_modified": "2018-08-22T11:39:10.280-04:00",
  },
  {
    "id": "01CNH4M8J88WSVS7P3NMB1HG42",
    "kind": "zip_windows",
    "name": "windows.zip"
    "last_modified": "2018-08-22T11:39:10.280-04:00",
  },
  {
    "id": "01CNH4M8JMXHTWCTTS8R2PJFVE",
    "kind": "zip_mac",
    "name": "mac.zip"
    "last_modified": "2018-08-22T11:39:10.292-04:00",
  },
  ...
]

Where:

  • id is the file ID
  • kind is the type of file, can be one of:
    • file: a regular file uploaded by the sender
    • directory: an empty directory as part of a directory structure
    • zip_windows: a zip file generated by MASV that contains all files/directories with preserved structure, compatible with Windows and Linux operating systems
    • zip_mac: a zip file generated by MASV that contains all files/directories with preserved structure but the zip format is only compatible with Mac OS
  • name is the file or directory name
  • path is the relative path in file system where if the file belongs inside a directory structure
  • size is the file size in bytes, if applicable
  • last_modified is the file's last modification date in the uploader's filesystem