music nerd

OnboardingOnboarding chat turn

Onboarding

Onboarding chat turn

One turn of an artist's onboarding, streamed as server-sent events. The server owns the step order (profiles → vault → interview → publish): a turn for a step that is not current gets an error event and the real step. Handlers are idempotent, so a repeated or interrupted turn resumes rather than repeats. A turn stops at 55 seconds and says so, and the server finishes the work even if the client disconnects.

Each event is a data: line holding one JSON object with a kind: chat, progress, step, candidate, linked, unreachable, source, sources, text-delta, choices, draft, complete or error. A turn ends with step, draft, complete or error.

POST/api/onboarding/{artistId}/chat
POST/api/onboarding/aab92f80-f9e1-4299-aa33-7dd85c8de5d3/chat

One turn of an artist's onboarding, streamed as server-sent events. The server owns the step order (profiles → vault → interview → publish): a turn for a step that is not current gets an error event and the real step. Handlers are idempotent, so a repeated or interrupted turn resumes rather than repeats. A turn stops at 55 seconds and says so, and the server finishes the work even if the client disconnects.

This one can’t run in the browser. Copy the curl and run it from a terminal.

Authorization

Authorizationstringrequired

The signed-in user's access token. Copy it at https://musicnerd.net/access after signing in. The user must be the artist's approved claimant or a Music Nerd admin. Kept in this tab only.

Path

artistIdstringrequired

The artist's ID (a UUID). Staging and production IDs differ.

Body
cURL
curl --request POST \
  --url 'https://musicnerd-api.vercel.app/api/onboarding/aab92f80-f9e1-4299-aa33-7dd85c8de5d3/chat' \
  --header 'Content-Type: application/json' \
  --data '{
  "type": "open"
}'

Send the request to see the live response here.

Authorizations

Authorizationstringheaderrequired

Bearer authentication header of the form Bearer <token>. The signed-in user's access token. Copy it at https://musicnerd.net/access after signing in. The user must be the artist's approved claimant or a Music Nerd admin.

Path Parameters

artistIdstringrequired

The artist's ID (a UUID). Staging and production IDs differ.

Body

application/jsonrequired
oneOf · object 1

Start or resume. On a fresh claim this runs the whole auto-build: find profiles, search for sources, write the Lore and the About, and confirm every step.

typeanyrequired
oneOf · object 2

Confirm the profiles step, adding and removing links.

typeanyrequired
addedLinksarray<object>required

maxItems: 100

Item properties for addedLinks
urlstringrequired
removedSiteNamesarray<string>required

maxItems: 100

Item properties for removedSiteNames

string

oneOf · object 3

Apply link changes and search again, without confirming the step.

typeanyrequired
addedLinksarray<object>

maxItems: 100

Item properties for addedLinks
urlstringrequired
removedSiteNamesarray<string>

maxItems: 100

Item properties for removedSiteNames

string

oneOf · object 4

Approve or reject sources and add new ones; confirms the sources step.

typeanyrequired
decisionsarray<object>required

maxItems: 100

Item properties for decisions
sourceIdstringrequired

format: uuid

statusstring · enumrequired

Values: "approved", "rejected"

addedUrlsarray<string>required

maxItems: 100

Item properties for addedUrls

string

oneOf · object 5

Answer or skip one interview question.

typeanyrequired
questionKeystringrequired
answerstring | nullrequired

null skips the question.

questionstring

The question text, for grounded (social_…) questions.

oneOf · object 6

Generate the About from the doc, or write it yourself.

typeanyrequired
modestring · enumrequired

Values: "generate", "self"

docstringrequired
sourcesarray<object>
Item properties for sources

object

oneOf · object 7

Publish the About and save the doc; confirms the publish step.

typeanyrequired
docstringrequired
aboutstringrequired
sourcesarray<object>
Item properties for sources

object

expectedBiostring | nullrequired

The bio the draft started from; a different current bio is refused.

Response

text/event-stream

A stream of turn events.

string