Skip to content

Add :account_slug prefix to account, my/pins and my/timezone API doc paths#2889

Open
rogeriopvl wants to merge 2 commits intobasecamp:mainfrom
rogeriopvl:docs-account-slug-prefix-for-account-and-my-pins-routes
Open

Add :account_slug prefix to account, my/pins and my/timezone API doc paths#2889
rogeriopvl wants to merge 2 commits intobasecamp:mainfrom
rogeriopvl:docs-account-slug-prefix-for-account-and-my-pins-routes

Conversation

@rogeriopvl
Copy link
Copy Markdown

@rogeriopvl rogeriopvl commented May 2, 2026

Nine paths in docs/api/sections/{account,exports,pins,identity}.md are documented without the :account_slug prefix, but the routes are mounted inside the per-account scope (see namespace :account and namespace :my in config/routes.rb). The other paths in the same files already use /:account_slug/...; this PR fixes the ones that don't.

File Documented as Should be
pins.md GET /my/pins GET /:account_slug/my/pins
account.md GET /account/settings GET /:account_slug/account/settings
account.md GET /account/join_code GET /:account_slug/account/join_code
account.md PUT /account/join_code PUT /:account_slug/account/join_code
account.md DELETE /account/join_code DELETE /:account_slug/account/join_code
account.md PUT /account/entropy PUT /:account_slug/account/entropy
exports.md POST /account/exports POST /:account_slug/account/exports
exports.md GET /account/exports/:id GET /:account_slug/account/exports/:id
identity.md PATCH /my/timezone PATCH /:account_slug/my/timezone

AI Use Disclaimer: this issue was found by an AI coding agent while working on a project that uses the Fizzy API.

The /account/* routes (settings, join_code, entropy, exports) and
/my/pins are mounted inside the per-account scope (see namespace
:account and namespace :my in config/routes.rb). They are reachable
in production as /:account_slug/account/... and /:account_slug/my/...
— the same convention the surrounding paths in these files already
follow (e.g. POST /:account_slug/cards/:card_number/pin, PUT
/:account_slug/boards/:board_id/entropy, POST
/:account_slug/users/:user_id/data_exports). Without the prefix the
client hits the root web app and gets 302'd to /session/menu, which
in turn yields 406 Not Acceptable when Accept: application/json is
set.
Copilot AI review requested due to automatic review settings May 2, 2026 09:06
Copy link
Copy Markdown

@claude claude Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the API documentation to consistently include the /:account_slug URL prefix for endpoints that are accessed within an account-scoped path.

Changes:

  • Fixes the documented path for GET /my/pins to GET /:account_slug/my/pins.
  • Fixes the documented paths for account settings/join code/entropy endpoints to include /:account_slug.
  • Fixes the documented paths for account exports create/show endpoints to include /:account_slug.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
docs/api/sections/pins.md Corrects the pins index endpoint to include the account slug prefix.
docs/api/sections/exports.md Corrects account export create/show endpoints to include the account slug prefix.
docs/api/sections/account.md Corrects account settings, join code, and entropy endpoints to include the account slug prefix.

Tip

If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

PATCH /my/timezone is mounted inside the per-account scope alongside
/my/pins (see namespace :my in config/routes.rb). It is reachable in
production as PATCH /:account_slug/my/timezone — without the prefix the
client hits the root web app and gets 302'd to /session/menu, which in
turn yields 406 Not Acceptable when Accept: application/json is set.

Same fix as the previous commit on this branch; this one was missed.
@rogeriopvl rogeriopvl changed the title Add :account_slug prefix to account and my/pins API doc paths Add :account_slug prefix to account, my/pins and my/timezone API doc paths May 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants