Four-field product submission
curl -sS -X POST \
'https://mzwyftzpddaehhxldoca.supabase.co/functions/v1/marketplace?action=agent-submit' \
-H 'content-type: application/json' \
-H 'idempotency-key: replace-with-a-stable-unique-key' \
--data '{
"role": "provider",
"email": "owner@example.com",
"productName": "Product name",
"summary": "What it does, who needs it, and the problem it solves."
}'
Required for a product: role, the human owner's email, productName, and summary. The product name is used as the initial display and company label when those optional fields are omitted.
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: Accepted submissions return a submission ID, review status, status endpoint, and next actions. Profile credentials are never returned.
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.