Skip to content

Update app API docs: CreateOrganization requires a user, not an API key - #5566

Merged
Jeremy Rose (jeremyrose-viam) merged 2 commits into
mainfrom
claude/update-create-organization-user-only
Nov 23, 2026
Merged

Jeremy Rose (jeremyrose-viam) merged 2 commits into
mainfrom
claude/update-create-organization-user-only

Conversation

@shannonbradshaw

Copy link
Copy Markdown
Collaborator

Source changes

  • APP-18544 — viamrobotics/app#14303: CreateOrganization now returns PermissionDenied when 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 in domains/service/server.go: if state.AppUserID() == "" { return nil, app.ErrPermissionDenied }.
  • Documents: no DOCS ticket found (APP-18544 has no parent, and no DOCS ticket links to it).

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 with update_sdk_methods.py "" app. The only diff is the two added lines under CreateOrganization; no URLError in the run, and app-table.md came out unchanged.

The same PR also refuses API keys on AcceptLegal, the Stripe setup and payment intents, /acceptInvite and the GitHub install callback. None of those is documented, so this PR changes nothing for them.

How I found these

  • Xref lookup: app-api-xref.md maps CreateOrganization to the fleet/app API reference.
  • Grep matches: CreateOrganization, create_organization, createOrganization appear only in the generated reference.

Generated by daily docs change agent


Generated by Claude Code

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
@netlify

netlify Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for viam-docs ready!

Name Link
🔨 Latest commit 74754e3
🔍 Latest deploy log https://app.netlify.com/projects/viam-docs/deploys/6b04bbdf806f54fb753660d9
😎 Deploy Preview https://deploy-preview-5566--viam-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 39 (🟢 up 6 from production)
Accessibility: 100 (no change from production)
Best Practices: 100 (no change from production)
SEO: 92 (no change from production)
PWA: 60 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

@viambot viambot added the safe to build This pull request is marked safe to build from a trusted zone label Nov 20, 2026

Copy link
Copy Markdown
Member

Docs review: Needs changes

This PR adds two sentences to the CreateOrganization override saying the call needs a user, not an API key, and mirrors them into the generated app reference. Both sentences match the app source on main. The only open item is confirming the change has reached production.

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 main on 2026-11-19 (merge 1ee6e3580, app PR 14303).

Needs owner sign-off

Claim Where Owning team Why unverified
API keys are refused by CreateOrganization in production today static/include/app/apis/overrides/protos/app.CreateOrganization.md:2 App / organizations Merged 2026-11-19, but production deployments can't be read here. Confirm the latest production deploy includes 1ee6e3580
Verified against source (3 claims)
  • The caller becomes the new organization's first owner: viamrobotics/app domains/service/server.go:680-681,689
  • A caller with no app user (API key, part or location secret) is rejected: domains/service/server.go:681-682
  • The rejection is gRPC PermissionDenied, so "permission denied error" is accurate: errors.go:18-22

Also checked: the two lines added to static/include/app/apis/generated/app.md are identical to the override and sit in the position the generator puts override text, so the generated file isn't hand-edited ahead of the override. I did not rerun the generator.

Automated review by Claude. Rerunning the review updates this comment.


Generated by Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jeremyrose-viam
Jeremy Rose (jeremyrose-viam) merged commit b25d607 into main Nov 23, 2026
14 of 15 checks passed
@jeremyrose-viam
Jeremy Rose (jeremyrose-viam) deleted the claude/update-create-organization-user-only branch November 23, 2026 22:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

safe to build This pull request is marked safe to build from a trusted zone

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants