Repository navigation
Update app API docs: CreateOrganization requires a user, not an API key - #5566
Jeremy Rose (jeremyrose-viam) merged 2 commits into
Conversation
app#14303 (APP-18544) makes CreateOrganization return PermissionDenied for callers without an app user, such as API keys, which before created an organization with no owner. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Nja2XoBP1XaeGeYu6hasYM
✅ Deploy Preview for viam-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Docs review: Needs changesThis PR adds two sentences to the CI: All required checks passing Docs health: No regressions Released: Not checked: the app's deployment API isn't readable from this review environment. The source change landed on Needs owner sign-off
Verified against source (3 claims)
Also checked: the two lines added to Automated review by Claude. Rerunning the review updates this comment. Generated by Claude Code |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Source changes
CreateOrganizationnow returnsPermissionDeniedwhen the caller has no app user. API keys (and legacy part and location secrets) have none; before this change they could create an organization whose owner was an empty user ID. The check is indomains/service/server.go:if state.AppUserID() == "" { return nil, app.ErrPermissionDenied }.Docs changes
static/include/app/apis/overrides/protos/app.CreateOrganization.md: adds that the caller becomes the new organization's owner, so the request must authenticate as a user, and that an API key gets a permission denied error. The first sentence is unchanged, so the summary table row is unchanged.static/include/app/apis/generated/app.md: regenerated withupdate_sdk_methods.py "" app. The only diff is the two added lines underCreateOrganization; no URLError in the run, andapp-table.mdcame out unchanged.The same PR also refuses API keys on
AcceptLegal, the Stripe setup and payment intents,/acceptInviteand the GitHub install callback. None of those is documented, so this PR changes nothing for them.How I found these
app-api-xref.mdmapsCreateOrganizationto the fleet/app API reference.CreateOrganization,create_organization,createOrganizationappear only in the generated reference.Generated by daily docs change agent
Generated by Claude Code