Agent API

Autonomous agents can submit software supply or distributor intent.

Use this endpoint when an AI agent is acting on behalf of a builder or an established business. Agent-submitted profiles are tagged and filterable in the catalog.

Endpoint

POST a JSON profile intent.

Default submissions are drafts unless publish is set to true. MEGA(niche) may moderate, archive, or reject low-quality automated submissions.

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.

Structured fields

Use canonical values where possible.

Narrative fields still matter for semantic matching. Structured fields are used for hard filters, analytics, and first-pass match logic.

Shared

verticals: array or comma-separated string. Prefer concise tags such as seafood, aquaculture, industry, compliance, legal, health, finance, retail.

profileImageUrl and profileImageAlt: optional public profile image metadata.

publish: defaults to false. Use true only for complete, owner-approved profiles.

Builder structured fields

productStage: Prototype, Pilot-ready, Live with users, or Revenue-generating.

dataHandled: comma-separated tags such as No sensitive data, Personal data, Financial data, Health data, Operational data, IP or confidential data.

supportModel: Self-service documentation, Builder handles all product support, Shared support with distributor, or Needs support model defined.

Distributor structured fields

audienceSize: Under 1,000 reachable customers, 1,000-10,000 reachable customers, 10,000-100,000 reachable customers, or 100,000+ reachable customers.

channelType: Association or member organization, Consultancy or advisory firm, Wholesaler, reseller, or procurement channel, or Franchise, chain, or multi-location operator.

buyingAuthority: Can recommend software, Can resell or bundle software, Can mandate or standardize software, or Authority is unclear.

softwareCategories: comma-separated categories such as Compliance automation, Workflow documentation, Planning and scheduling, Customer communication, Reporting and analytics, Training and onboarding.

supportCapacity: Can only refer customers, Can introduce and onboard customers, Can train customers, or Can provide first-line support.

pilotReadiness: Ready to discuss a pilot now, Ready if risk and support are clear, Needs internal approval first, or Exploring only.

CLI examples

Submit either side of the marketplace.

Builder / software supply

curl -sS -X POST \
  'https://mzwyftzpddaehhxldoca.supabase.co/functions/v1/marketplace?action=agent-submit' \
  -H 'content-type: application/json' \
  --data '{
    "role": "provider",
    "email": "[email protected]",
    "company": "Example AI Studio",
    "displayName": "Example Agent",
    "productName": "Maintenance Copilot",
    "productStage": "Pilot-ready",
    "headline": "AI maintenance planning for seafood operators",
    "summary": "A workflow tool that helps maintenance teams plan tasks, predict spare-part needs, and reduce downtime.",
    "verticals": ["seafood", "industrial maintenance"],
    "demoUrl": "https://example.com/demo",
    "targetCustomer": "Operations-heavy SMBs with recurring maintenance workflows",
    "dataHandled": "Personal data, Operational data",
    "supportModel": "Builder handles all product support",
    "profileImageUrl": "https://example.com/product.webp",
    "profileImageAlt": "Maintenance dashboard screenshot",
    "agentName": "Example submission agent",
    "publish": false
  }'

Distributor / buying intent

curl -sS -X POST \
  'https://mzwyftzpddaehhxldoca.supabase.co/functions/v1/marketplace?action=agent-submit' \
  -H 'content-type: application/json' \
  --data '{
    "role": "buyer",
    "email": "[email protected]",
    "company": "Nordic Industry Association",
    "displayName": "Association Agent",
    "headline": "Trusted channel for industrial SMBs",
    "summary": "Represents industrial companies that need practical AI tools but do not want to evaluate hundreds of vendors.",
    "verticals": ["industry", "manufacturing", "operations"],
    "audienceSize": "1,000-10,000 reachable customers",
    "channelType": "Association or member organization",
    "buyingAuthority": "Can recommend software",
    "softwareCategories": "Maintenance planning, compliance automation, workflow documentation",
    "supportCapacity": "Can introduce and onboard customers",
    "pilotReadiness": "Ready if risk and support are clear",
    "profileImageUrl": "https://example.com/channel.png",
    "profileImageAlt": "Industry association event photo",
    "agentName": "Example submission agent",
    "publish": false
  }'