docs: document /api/artist/create endpoint#10
Conversation
Add documentation for the POST /api/artist endpoint that creates a new artist account and associates it with an owner account. Changes: - Add POST /api/artist endpoint with requestBody schema - Add CreateArtistRequest schema (name, account_id) - Add CreateArtistResponse schema with artist wrapper - Add CreatedArtist schema with full artist model - Add CreateArtistError schema for validation errors Returns 201 on success with the created artist object. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughAdded a new OpenAPI endpoint POST Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant API as API Server
participant DB as Database
Client->>API: POST /api/artists (CreateArtistRequest)
API->>DB: INSERT artist record (with account_id / organization_id)
DB-->>API: OK + created artist row (id, timestamps, metadata)
API-->>Client: 201 Created (CreateArtistResponse with CreatedArtist)
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
- Add api-reference/artists/create.mdx for POST /api/artist - Add endpoint to navigation in docs.json under Artists group Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@api-reference/openapi.json`:
- Around line 323-370: The OpenAPI POST /api/artist description mentions
optional organization linkage but the CreateArtistRequest schema lacks an
organization_id field; either add an optional organization_id property to the
CreateArtistRequest schema so the request supports linking an artist to an
organization, or edit the /api/artist operation description to remove/clarify
the organization linkage and instead document the correct flow (e.g., that
organization linking is done via a separate endpoint such as
/api/organizations/artists); update CreateArtistRequest (symbol:
CreateArtistRequest) or the /api/artist operation description accordingly so the
contract and description are consistent.
🧹 Nitpick comments (3)
api-reference/openapi.json (3)
2965-2972: Array schemas missingitemsdefinition.The
account_infoandaccount_socialsarray properties lackitemsdefinitions, which will cause issues with OpenAPI client generators and schema validators. Consider adding the item schema or referencing an existing schema.📝 Suggested fix
"account_info": { "type": "array", + "items": { + "type": "object" + }, "description": "Account info records" }, "account_socials": { "type": "array", + "items": { + "type": "object" + }, "description": "Linked social media accounts" }If these have a known structure, define proper schemas (e.g., reference existing
ArtistSocialforaccount_socials).
2961-2964: Missing type foronboarding_dataproperty.The
onboarding_datafield lacks atypespecification. For better client code generation and documentation clarity, consider specifying the expected type (e.g.,objectwithadditionalProperties: truefor arbitrary JSON data).📝 Suggested fix
"onboarding_data": { + "type": "object", + "additionalProperties": true, "nullable": true, "description": "Onboarding data" },
2975-2999: Consider addingrequiredarray to error schema for consistency.The
CreateArtistErrorschema doesn't specify required fields, unlike other error schemas in this spec (e.g.,ArtistsErrorResponserequires["status", "message"]). Adding arequiredarray improves client-side error handling predictability.📝 Suggested fix
"CreateArtistError": { "type": "object", + "required": ["status"], "properties": { "status": {
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
api-reference/openapi.json
🔇 Additional comments (2)
api-reference/openapi.json (2)
2859-2874: LGTM!The
CreateArtistRequestschema is well-defined with appropriate validation constraints (minLength: 1for name,format: uuidfor account_id) and clear descriptions.
2875-2883: LGTM!The response schema follows the established pattern of wrapping the created entity in a named property.
✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.
- Move POST method from /api/artist to /api/artists for consistency - Update MDX file to reference plural endpoint Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Consolidate artist-related endpoints under single Artists group - Remove redundant Artist navigation group Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add optional organization_id field to CreateArtistRequest schema - Allows linking new artist to an organization on creation Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Make account_id optional in POST /api/artists with org API key note - Move Chat endpoints to top of API reference navigation Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Links to quickstart#api-keys section for API key creation instructions Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Triaged all 22 line-level comments (cubic-dev-ai + coderabbit). 7 implemented, 10 rejected with reason, 5 already-resolved by earlier PR commits. Implemented: #4 (skills/music-industry-research.mdx) — corrected `/research/*` to `/api/research/*` so the path matches the rest of the docs. #5 / #8 (api-reference/openapi/content.json:619) — POST /api/content/create description said "Returns `{run_id}`" but the 202 response and schema return `runIds` (an array). Brought the description into sync with the response shape so generated clients and readers stop targeting the wrong field name. #6 (authentication.mdx) — Bearer-token guidance was scoped to Privy JWTs only, but MCP clients also pass an API key as a Bearer token (per /mcp). Broadened the guidance and the comparison table row to cover both cases. #7 (agents.mdx Authenticate section) — auth steps walked through the email-verification flow as if it applied universally, but the documented throwaway agent+...@recoupable.com path returns the API key immediately on signup with no code. Added an explicit note up front and inline in step 1 that the agent+ path skips steps 2 and 3. #9 (api-reference/openapi/content.json POST /api/content/video description) — the description listed `prompt` as a mode for "create a video from a text description", but the ContentCreateVideoRequest schema requires `image_url` and explicitly says "text-only prompt mode is not supported." Rewrote the description to lead with the image_url requirement and updated each mode's gloss to reflect what the model actually does (uses the image as first frame / style ref / etc.). #15 (quickstart.mdx) — `jq -r .api_key` silently returns "null" on error responses (invalid code, expired code, rate limit) and exports RECOUP_API_KEY=null, which fails confusingly downstream. Switched to `jq -er '.api_key'` so the pipeline exits non-zero when the field is missing or null. #21 (credits.mdx Check your tier section) — documented `GET /api/subscription/status` and an `isPro` field. Verified live: endpoint returns 404 on api.recoupable.com AND on chat.recoupable.com, and isPro doesn't appear in any OpenAPI spec. The handler exists in chat/app/api/subscription/status/route.ts but isn't reachable as documented. Replaced the curl block with guidance to check the chat dashboard, with a note that a programmatic status endpoint is on the roadmap. Rejected with reason (10 comments): - #1, #3 (mcp.mdx, agents.mdx > 100 lines): an arbitrary lint rule that doesn't apply to docs pages whose value is enumeration (tool catalogs, decision trees) - #10 (releases.json profileUrls schema): real engineering question about whether to encode constraints in the schema; not a docs-only fix - #11 (docs.json primary color #0a0a0a): intentional brand refresh per merged PR #168 - #13 (docs.json primary CTA /keys subpath): matches the "Get API Key" CTA copy, not a generic app entrypoint - #16-#20 (kebab-case skill titles): explicit user choice; titles match URL slugs and the npx-skills `--skill <name>` install command Already resolved by earlier PR commits (5 comments): - #2, #12 (Instagram nav entries): removed in 318a555 - #14 (MCP host vs REST host): resolved in 1634ba6 — both on api.recoupable.com now - #22 (credits.mdx host): resolved in 1634ba6 — bot's recommended direction would have been backwards
Summary
Test plan
🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Documentation
✏️ Tip: You can customize this high-level summary in your review settings.