Setup

REST endpoints behind the setup page: read each person's setup steps and the organization's, and record that a step was done, skipped or dismissed. Also the invitation events Fondaro keeps.

Overview

The setup page shows each person the steps that are theirs: an admin sees Your agency and You, a member sees You. Nothing about a step is stored except the choices a person makes about it. Whether a step is done is read from what the step itself produces: branding, leads, the team, the website, your own number, your inbox, your profile and the phone app.

The endpoints on this page use the dashboard's Clerk bearer token and resolve the organization from the request. Any member can read their own setup and record their own choices. The organization's steps, invitations and the "Already on for you" group are only in an admin's response.

Endpoints

Method & pathWhoPurpose
GET /me/setupAny memberYour steps and, for an admin, the organization's
POST /me/setup/eventsAny memberRecord that you did, skipped or dismissed a step

Read your setup

curl https://api.fondaro.com/me/setup \
  -H "Authorization: Bearer <clerk session token>"
{
  "role": "admin",
  "plan": { "kind": "crm", "trialing": true, "trialEndsAt": "2026-10-10T09:00:00.000Z" },
  "entitled": true,
  "teamMode": "team",
  "dismissed": false,
  "agency": [
    { "id": "agency", "status": "done", "hidden": false, "detail": null },
    { "id": "leads", "status": "done", "hidden": false, "detail": { "count": 5 } },
    { "id": "team", "status": "done", "hidden": false, "detail": { "count": 2, "invited": 1 } },
    { "id": "website", "status": "skipped", "hidden": false, "detail": null }
  ],
  "you": [
    { "id": "phone", "status": "done", "hidden": false, "detail": { "phoneNumber": "+34612345678" } },
    { "id": "email", "status": "open", "hidden": false, "detail": null },
    { "id": "profile", "status": "open", "hidden": false, "detail": { "photo": true, "languages": true, "areas": false } },
    { "id": "app", "status": "open", "hidden": false, "detail": null }
  ],
  "progress": { "done": 4, "total": 8 },
  "invitations": [
    { "clerkInvitationId": "orginv_2x...", "role": "org:member", "status": "pending", "invitedAt": "2026-09-26T09:05:00.000Z" }
  ],
  "kicked": [],
  "alreadyOn": { "ask": true, "smartRouting": true, "calling": false }
}

The response

FieldTypeNotes
roleadmin or memberFrom your Clerk organization role
plan.kindnone, crm, growth or crm_and_growthWhat the organization holds now
plan.trialing / plan.trialEndsAtboolean / string or nullThe free 14 days
entitledbooleanFalse before any plan: agency is null, you is empty and progress is 0 of 0
teamModesolo or teamSolo is one person and no invitation; the team step is then hidden
dismissedboolean"I'm done": an admin's dismissal for admins, your own for a member
agencystep[] or nullAdmins only; ads appears only with Growth
youstep[]Your own four steps
progress{ done, total }Visible steps only; drives the sidebar marker
invitationsarrayAdmins only, newest first, from the invitation events below
kicked{ name, at }[]Admins only: people removed in the last 30 days because the team was past its seats
alreadyOnobject or nullAdmins only: Ask Fondaro on, Smart routing on, Calling on

Steps

Each step is { id, status, hidden, detail }. status is done, open or skipped. A step is done when its fact exists; otherwise the latest event decides (done or skipped). Agency events count from any admin; personal events count only from you.

idGroupDone when
agencyAgencyThe agency name and both logos are set
leadsAgencyA lead exists, an import or CRM migration was committed, or a listing source is connected
teamAgencyTwo or more people on the team, or an invitation sent
websiteAgencyThe website exists
adsAgency (Growth)A Growth plan with at least one language chosen
phoneYouYour own number is verified and assigned to you
emailYouYour own mailbox is connected and working
profileYouA profile photo, your languages and your areas
appYouYou signed in on the phone app

Record a step

curl -X POST https://api.fondaro.com/me/setup/events \
  -H "Authorization: Bearer <clerk session token>" \
  -H "Content-Type: application/json" \
  -d '{ "step": "website", "action": "skipped" }'

Returns 204 No Content.

FieldTypeNotes
stepstringA step id above, or setup for the whole page. A short lowercase key (^[a-z][a-z0-9_-]{0,39}$); anything else is 400
actiondone, skipped or dismissedAnything else is 400

Every call writes one row; the person is always the caller, never the body. { "step": "setup", "action": "dismissed" } is "I'm done": from an admin it dismisses the page for the organization's admins, from a member only for that member. Nothing is ever deleted: the page reads the latest row per person and step, so a step skipped and later done reads as done.

Invitation events

Fondaro keeps a local record of the organization's invitations, because the setup page and the activation report need one and Clerk is not read on those paths. The Clerk webhook (POST /webhooks/clerk, signed, not for integrators) handles three events:

Clerk eventWhat Fondaro records
organizationInvitation.createdOne invitation_sent organization event
organizationInvitation.acceptedOne invitation_accepted organization event
organizationInvitation.revokedrevokedAt stamped on the sent row; no new row

Each row is keyed by the Clerk invitation id, so a redelivered webhook writes nothing new. The rows hold the invitation id, the role and when it was sent, never the invitee's email address. The endpoint must be subscribed to these three events in Clerk.