Content
Methods of @cobuntu/embed for articles, branding, courses, city autocomplete and co-creation. Setup, sessions and errors are on the
client overview; each method links to its endpoint in the
REST API reference.
articles
articles.list
articles.list({ category?, subcategory?, limit?, offset? })
Route: GET /articles
Returns: { articles, pagination }
articles.get
articles.get(slugOrId)
Route: pages GET /articles
Returns: Article or null
branding, courses, places
branding
branding()
Route: GET /branding
Returns: Branding: { name, iconUrl, theme, communityUrl }. theme is the community's theme document as stored.
courses.list
courses.list({ category?, subcategory?, limit?, offset? })
Route: GET /courses
Returns: { courses: Product[], pagination }. 404 NOT_FOUND when Learning is off. A course detail is products.get(id).
places.cities
places.cities({ q, lang? })
Route: GET /places/cities
Returns: CityPrediction[] ({ placeId, description, mainText, secondaryText, countryCode }), at most 6. Never errors except 429; q under 2 characters answers [].
All three are READ_PUBLIC, so the publishable key works.
coCreation
coCreation.get
coCreation.get()
Route: GET /co-creation
Returns: CoCreation: { event, product, course }, each a CoCreationEntry
READ_PUBLIC, so the publishable key works. Signed out, every enabled surface
answers signin; call it on client.as(session) to get the member's real
state. Each entry is { enabled, requireApproval, feeModel, state, reason };
the event entry also carries allowMemberEventListings, memberEventFeeModel,
memberEventRequireApproval, platformFees: { events } (a fraction) and
payments: { connected, chargesEnabled } (the community's own Stripe):
state(CoCreationState):disabled,signin,join,lockedorallowed.reason:ok,role_grant(allowed through a community role),not_member,toggle_off,tier_locked, ornull.feeModel:FLAT,DYNAMICornull.
Errors: 404 COMMUNITY_NOT_FOUND, 403 WRONG_COMMUNITY. The answer is a hint
for what to show; the create flow itself stays the authoritative gate. See the
Co-creation banner guide.