create_portal
Create a portal for collecting files from external users with customizable access, branding, and security settings. Configure access codes, download passwords, file type restrictions, and more. Only name and subdomain are required.
Instructions
Create a new portal for collecting files from external users. Portals can be configured with access codes, download passwords, file type restrictions, custom branding, connected integrations, and more. Only 'name' and 'subdomain' are required - all other settings are optional.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Portal name | |
| subdomain | Yes | Portal subdomain (3-53 characters) | |
| access_level | No | Portal access level: 'regular' for public access, 'private' for restricted access | |
| access_list | No | Array of membership IDs for users with direct access to private portal. Use get_team_members to retrieve membership IDs | |
| has_access_code | No | Whether portal requires an access code to upload (if true, you also need to specify access_code parameter) | |
| access_code | No | Access code for portal (required if has_access_code is true) | |
| has_download_password | No | Whether portal packages require password to download (if true, you also need to specify download_password parameter) | |
| download_password | No | Download password (required if has_download_password is true) | |
| message | No | Welcome message displayed on portal | |
| disable_upload_receipt | No | Disable email receipt to uploader | |
| active | No | Whether portal is active and accepting uploads | |
| recipients | No | Email addresses that receive notifications for portal uploads | |
| cc_recipients | No | Email addresses that receive carbon copy notifications without download link | |
| primary_color | No | Primary color for portal branding (hex color code) | |
| background_url | No | URL of background image for portal | |
| logo_url | No | URL of logo image for portal | |
| teamspace_id | No | ID of teamspace to associate portal with | |
| custom_expiry_days | No | Custom expiry days for packages (-1 for unlimited) | |
| expiry | No | Portal expiry date (ISO 8601 format). This parameter is required when expiry_enabled: true | |
| expiry_enabled | No | Whether portal expiry is enabled. If set to true, need to also provide expiry parameter, e.g. expiry: '2027-01-01' | |
| file_type_restriction_enabled | No | Whether file type restrictions are enabled | |
| file_type_restriction_exclude | No | Whether to exclude (true) or include (false) specified file types | |
| file_types | No | Allowed/excluded file extensions prefixed with dots (e.g., ['.mp4', '.mov']) | |
| max_file_count | No | Maximum number of files per upload (0 for unlimited). Only works when package_size_restriction_enabled: true | |
| max_file_size | No | Maximum file size in bytes (0 for unlimited). Only works when package_size_restriction_enabled: true | |
| max_package_size | No | Maximum package size in bytes (0 for unlimited). Only works when package_size_restriction_enabled: true | |
| package_size_restriction_enabled | No | Whether package size restrictions are enabled. Set to true in order to set max_file_count, max_file_size or max_package_size | |
| user_authentication_required | No | Whether to restrict Portal upload to only team users with proper access. Users must authenticate to upload | |
| download_user_authentication_required | No | Whether users must authenticate to download | |
| package_name_format_enabled | No | Whether custom package naming format is enabled | |
| package_name_format | No | Custom package naming format configuration (required when package_name_format_enabled is true) | |
| terms_of_service_enabled | No | Whether terms of service acceptance is required to upload to the portal | |
| terms_of_service | No | Terms of service configuration (required when terms_of_service_enabled is true) |
Implementation Reference
- src/api/portals.ts:137-153 (handler)The actual handler function that creates a portal by sending a POST request to the MASV API /v1/teams/{teamId}/portals endpoint.
async function createPortal(params: CreatePortalParams) { const url = new URL(`${MASV_BASE_URL}/v1/teams/${MASV_TEAM_ID}/portals`); const headers = { "content-type": "application/json", "x-api-key": MASV_API_KEY, }; const r = await fetch(url.toString(), { method: "POST", headers, body: JSON.stringify(params), }); const data = await r.json(); return data; } - src/api/portals.ts:88-133 (schema)Zod schema defining all input parameters for create_portal, including name, subdomain, access settings, branding, expiry, file restrictions, and terms of service.
const CreatePortalSchema = z.object({ name: z.string().max(255).describe("Portal name"), subdomain: z.string().min(3).max(53).describe("Portal subdomain (3-53 characters)"), access_level: z .enum(["regular", "private"]) .describe("Portal access level: 'regular' for public access, 'private' for restricted access") .optional(), access_list: z.array(z.string()).describe("Array of membership IDs for users with direct access to private portal. Use get_team_members to retrieve membership IDs").optional(), has_access_code: z.boolean().describe("Whether portal requires an access code to upload (if true, you also need to specify access_code parameter)").optional(), access_code: z.string().max(72).describe("Access code for portal (required if has_access_code is true)").optional(), has_download_password: z.boolean().describe("Whether portal packages require password to download (if true, you also need to specify download_password parameter)").optional(), download_password: z.string().max(72).describe("Download password (required if has_download_password is true)").optional(), message: z.string().describe("Welcome message displayed on portal").optional(), disable_upload_receipt: z.boolean().describe("Disable email receipt to uploader").optional(), active: z.boolean().describe("Whether portal is active and accepting uploads").optional(), recipients: z.array(z.email()).describe("Email addresses that receive notifications for portal uploads").optional(), cc_recipients: z.array(z.email()).describe("Email addresses that receive carbon copy notifications without download link").optional(), primary_color: z.string().max(255).describe("Primary color for portal branding (hex color code)").optional(), background_url: z.string().describe("URL of background image for portal").optional(), logo_url: z.string().describe("URL of logo image for portal").optional(), teamspace_id: z.string().describe("ID of teamspace to associate portal with").optional(), custom_expiry_days: z.number().int().min(-1).max(65535).describe("Custom expiry days for packages (-1 for unlimited)").optional(), expiry: z.string().describe("Portal expiry date (ISO 8601 format). This parameter is required when expiry_enabled: true").optional(), expiry_enabled: z.boolean().describe("Whether portal expiry is enabled. If set to true, need to also provide expiry parameter, e.g. expiry: '2027-01-01'").optional(), file_type_restriction_enabled: z.boolean().describe("Whether file type restrictions are enabled").optional(), file_type_restriction_exclude: z.boolean().describe("Whether to exclude (true) or include (false) specified file types").optional(), file_types: z.array(z.string()).describe("Allowed/excluded file extensions prefixed with dots (e.g., ['.mp4', '.mov'])").optional(), max_file_count: z.number().int().describe("Maximum number of files per upload (0 for unlimited). Only works when package_size_restriction_enabled: true").optional(), max_file_size: z.number().int().describe("Maximum file size in bytes (0 for unlimited). Only works when package_size_restriction_enabled: true").optional(), max_package_size: z.number().int().describe("Maximum package size in bytes (0 for unlimited). Only works when package_size_restriction_enabled: true").optional(), package_size_restriction_enabled: z.boolean().describe("Whether package size restrictions are enabled. Set to true in order to set max_file_count, max_file_size or max_package_size").optional(), user_authentication_required: z.boolean().describe("Whether to restrict Portal upload to only team users with proper access. Users must authenticate to upload").optional(), download_user_authentication_required: z.boolean().describe("Whether users must authenticate to download").optional(), package_name_format_enabled: z.boolean().describe("Whether custom package naming format is enabled").optional(), package_name_format: z.object({ value: z.string().describe("Regex pattern used to enforce package name format (e.g., '^s\d{2}_e\d{2}$')"), label: z.string().describe("Label shown to users explaining the required package name format (e.g., 'Format For Videos')"), }).describe("Custom package naming format configuration (required when package_name_format_enabled is true)").optional(), terms_of_service_enabled: z.boolean().describe("Whether terms of service acceptance is required to upload to the portal").optional(), terms_of_service: z.object({ title: z.string().describe("Title of the terms of service"), description: z.string().describe("Description or content of the terms of service"), checkbox_label: z.string().describe("Label for the acceptance checkbox"), checkbox_url: z.string().describe("URL to full terms of service document or any other additional information"), }).describe("Terms of service configuration (required when terms_of_service_enabled is true)").optional(), }); - src/index.ts:352-368 (registration)Registration of the 'create_portal' tool with the MCP server, including description and input schema reference, with a handler that calls createPortal and wraps the result with mcpOk.
server.registerTool( "create_portal", { description: "Create a new portal for collecting files from external users. Portals can be configured with access codes, download passwords, file type restrictions, custom branding, connected integrations, and more. Only 'name' and 'subdomain' are required - all other settings are optional.", inputSchema: CreatePortalSchema.shape, }, async (args) => { try { const data = await createPortal(args); return mcpOk(data); } catch (error) { return mcpError(error); } }, ); - src/api/portals.ts:1-2 (helper)Imports for zod validation library and environment variables (MASV_BASE_URL, MASV_TEAM_ID, MASV_API_KEY) used by the createPortal handler.
import { z } from "zod"; import { MASV_BASE_URL, MASV_TEAM_ID, MASV_API_KEY, MASV_ALLOW_DELETE } from "./env.js"; - src/index.ts:38-49 (helper)Import statement bringing CreatePortalSchema and createPortal from src/api/portals.ts into the main entry point.
import { GetPortalsSchema, getPortals, GetPortalSchema, getPortal, CreatePortalSchema, createPortal, UpdatePortalSchema, updatePortal, DeletePortalSchema, deletePortal, } from "./api/portals.js";