Skip to main content

Waitlist

When an agent is in coming_soon status, the catalog UI replaces the "Get started" CTA with a "Notify me" dialog that captures emails into the waitlist.

Schema (agent_waitlist)

ColumnTypeNotes
idUUIDPK
agentIdUUIDFK → agents
emailtext
createdAttimestamptz

Unique on (agentId, email).

Endpoints

VerbPathGuard
POST/agents/:agentId/waitlistpublic
GET/agents/:agentId/waitlist/mebearer (optional)

POST is idempotent — duplicate emails return 200 with the existing row. It also writes an interactions row of type notify_request for admin notification fan-out.

GET .../waitlist/me returns { notified: boolean }. For unauthenticated requests it returns { notified: false } without erroring — used by the frontend to know whether to render the "you're on the list" success state.

Frontend flow

NotifyDialog.tsx (in fleapo-marketplace/src/components/):

  1. Open dialog on coming-soon agent click.
  2. Pre-fill email from useMe() if authenticated.
  3. Validate via Zod (z.string().email()).
  4. Submit → set React Query cache key waitlistKey(agentId) to { notified: true }.
  5. Render success state.

Closing the loop

The marketplace doesn't auto-email the waitlist when status flips to active. Export the list manually:

SELECT email, created_at
FROM agent_waitlist
WHERE agent_id = '<agentId>'
ORDER BY created_at;

Then send via your email-of-choice. Future work: build an admin "notify waitlist" button.