Skip to content

Portals

Portals allow a public (or passcode protected) view on Assets within a set of folders.

Create a portal

Request

Create a new Portal, allowing public access to specified folders to anyone who has one of the Portal.slugs.

Security
bearerToken
Bodyapplication/jsonrequired
namestringrequired

Name of the Portal

Example:"Reseller portal"
slugstringrequired

A human readable unique identifier, used in the Dash portal URL

Example:"reseller-portal"
whitelistedFolderFieldOptionIdsArray of stringsrequired

The folder FieldOptions which portal users will have permission to view/download assets from. Users will also have permission on the descendants of the specified field options.

Example:
[ "4cb261ad-dffb-414e-89cf-6902e3031d44", "4e14dc90-eb7b-4fd2-87e5-e8968c236ec0" ]
welcomeMessageobjectrequired
showRecentlyAddedAssetsbooleanrequired

Whether this portal should include a preview of recently added assets

Example:true
passcodestring or null

A passcode that must be provided when viewing a portal. Note that this is NOT a password and as such is stored in plain text

Example:"LetMeInPlease"
assetPermittedActionsstring

Permissions users have on assets they are viewing

Default:"VIEW_AND_DOWNLOAD"
Enum:"VIEW""VIEW_AND_DOWNLOAD"
Example:"VIEW"
curl -i -X POST \
  https://api-v2.dash.app/portals \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "Reseller portal",
    "slug": "reseller-portal",
    "whitelistedFolderFieldOptionIds": [
      "4cb261ad-dffb-414e-89cf-6902e3031d44",
      "4e14dc90-eb7b-4fd2-87e5-e8968c236ec0"
    ],
    "welcomeMessage": {
      "title": "Welcome to our reseller portal",
      "body": "Take a look around our reseller portal and quickly find all the assets you need. Happy browsing!"
    },
    "showRecentlyAddedAssets": true,
    "passcode": "LetMeInPlease",
    "assetPermittedActions": "VIEW"
  }'

Responses

Success

Bodyapplication/json
resultobjectrequired
permittedActionsArray of objectsrequired
Response
{ "result": { "id": "55f9964c-095d-4b8b-bb5e-4118d2e76ad0", "accountId": "cfb665ca-ce35-4418-b9d5-70ee815db4bd", "name": "Reseller portal", "currentSlug": "reseller-portal", "slugs": [], "whitelistedFolderFieldOptionIds": [], "welcomeMessage": {}, "showRecentlyAddedAssets": true, "passcode": "LetMeInPlease", "assetPermittedActions": "VIEW", "createdByUserId": "google-oauth2|123456789012345678901", "dateCreated": "2021-02-17T09:24:01.417Z" }, "permittedActions": [ {} ] }