From 0fb822c8cdbd927b1423018fdb3542c4ff250f40 Mon Sep 17 00:00:00 2001 From: rogeriopvl Date: Sat, 2 May 2026 08:29:02 +0100 Subject: [PATCH 1/2] Add :account_slug prefix to account and my/pins API doc paths MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- docs/api/sections/account.md | 10 +++++----- docs/api/sections/exports.md | 4 ++-- docs/api/sections/pins.md | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/api/sections/account.md b/docs/api/sections/account.md index 0360d094db..7984aeefbe 100644 --- a/docs/api/sections/account.md +++ b/docs/api/sections/account.md @@ -1,6 +1,6 @@ # Account -## `GET /account/settings` +## `GET /:account_slug/account/settings` Returns the current account. @@ -18,7 +18,7 @@ __Response:__ The `auto_postpone_period_in_days` is the account-level default in days (e.g. `30`). Cards are automatically moved to "Not Now" after this period of inactivity. Each board can override this with its own value. -## `GET /account/join_code` +## `GET /:account_slug/account/join_code` Returns the account's join code for inviting new users. The join code URL can be shared with people to let them join the account. @@ -36,7 +36,7 @@ __Response:__ A join code is `active` when `usage_count` is less than `usage_limit`. -## `PUT /account/join_code` +## `PUT /:account_slug/account/join_code` Updates the join code's usage limit. Requires admin role. @@ -58,7 +58,7 @@ __Response:__ Returns `204 No Content` on success. -## `DELETE /account/join_code` +## `DELETE /:account_slug/account/join_code` Resets the join code, generating a new one and invalidating the old code. Requires admin role. @@ -66,7 +66,7 @@ __Response:__ Returns `204 No Content` on success. -## `PUT /account/entropy` +## `PUT /:account_slug/account/entropy` Updates the account-level default auto close period. Requires admin role. diff --git a/docs/api/sections/exports.md b/docs/api/sections/exports.md index e6d2146760..10ea38b102 100644 --- a/docs/api/sections/exports.md +++ b/docs/api/sections/exports.md @@ -10,7 +10,7 @@ Possible export statuses are: Completed export files expire after 24 hours. When that happens, request a new export. -## `POST /account/exports` +## `POST /:account_slug/account/exports` Starts an account export for the current account. Only account admins and owners can create account exports. @@ -26,7 +26,7 @@ Returns `201 Created` with the export object: } ``` -## `GET /account/exports/:id` +## `GET /:account_slug/account/exports/:id` Returns the status of an account export created by the current user. diff --git a/docs/api/sections/pins.md b/docs/api/sections/pins.md index 19fecacb90..ec22df568b 100644 --- a/docs/api/sections/pins.md +++ b/docs/api/sections/pins.md @@ -18,7 +18,7 @@ __Response:__ Returns `204 No Content` on success. -## `GET /my/pins` +## `GET /:account_slug/my/pins` Returns the current user's pinned cards. This endpoint is not paginated and returns up to 100 cards. From 75f355ebd3787ef8dcb217d00773c1107a008aa9 Mon Sep 17 00:00:00 2001 From: rogeriopvl Date: Mon, 4 May 2026 07:52:21 +0100 Subject: [PATCH 2/2] Add :account_slug prefix to my/timezone API doc path MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- docs/api/sections/identity.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/api/sections/identity.md b/docs/api/sections/identity.md index 706fe66847..8edcc07a6b 100644 --- a/docs/api/sections/identity.md +++ b/docs/api/sections/identity.md @@ -45,7 +45,7 @@ __Response:__ } ``` -## `PATCH /my/timezone` +## `PATCH /:account_slug/my/timezone` Updates the current user's timezone. This affects how times are displayed in notification emails.