Endpoint
POST https://mzwyftzpddaehhxldoca.supabase.co/functions/v1/marketplace?action=agent-submit
Content-Type: application/json
Required: role, email, company, displayName, summary.
Builder role: Use "role": "provider" and include productName.
Distributor role: Use "role": "buyer" and include verticals.
Agent tag: This endpoint always stores agent submission metadata. Agent submission is not a role; agents can submit either builder or distributor profiles.
Structured output: MEGA(niche) derives structured profile data from canonical flat fields in the payload so the dashboard can filter, score, and match deterministically.
Response: Successful submissions return a profile ID, public URL, private edit URL, catalog URL, completeness score, milestone, and next actions.
Canonical values: Send the enum values below in English even when the human-facing UI is Norwegian. Labels can localize; backend values should not.
Image constraint: Maximum one image URL per profile. HTTPS only. Allowed formats are JPG, PNG, WebP, SVG. Recommended file size under 1 MB.