From ebcf0630e17b4c07c09c5da18f293456541cda09 Mon Sep 17 00:00:00 2001 From: Rob Zolkos Date: Wed, 11 Mar 2026 17:50:40 -0400 Subject: [PATCH 1/2] Document my preferences API endpoints Add GET and PUT /my/preferences.json to the People section covering time zone, first week day, and time format preferences. --- sections/people.md | 60 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/sections/people.md b/sections/people.md index 82a116d..f33b6f5 100644 --- a/sections/people.md +++ b/sections/people.md @@ -9,6 +9,8 @@ Endpoints: - [Get pingable people](#get-pingable-people) - [Get person](#get-person) - [Get my personal info](#get-my-personal-info) +- [Get my preferences](#get-my-preferences) +- [Update my preferences](#update-my-preferences) Get all people -------------- @@ -266,3 +268,61 @@ See the [Get person](#get-person) endpoint for an example of the JSON response. ```shell curl -s -H "Authorization: Bearer $ACCESS_TOKEN" https://3.basecampapi.com/$ACCOUNT_ID/my/profile.json ``` + + +Get my preferences +------------------ + +* `GET /my/preferences.json` will return the current user's preferences. + +###### Example JSON Response + +```json +{ + "url": "https://3.basecampapi.com/195539477/my/preferences.json", + "app_url": "https://3.basecamp.com/195539477/my/preferences", + "time_zone_name": "America/Chicago", + "first_week_day": "Sunday", + "time_format": "twelve_hour" +} +``` + +###### Copy as cURL + +```shell +curl -s -H "Authorization: Bearer $ACCESS_TOKEN" https://3.basecampapi.com/$ACCOUNT_ID/my/preferences.json +``` + + +Update my preferences +--------------------- + +* `PUT /my/preferences.json` will update the current user's preferences. + +All parameters are optional. Only include the ones you want to change. + +* `person[time_zone_name]` - the user's time zone (e.g. `America/Chicago`, `London`, `UTC`). Accepts any valid Rails time zone name. +* `person[first_week_day]` - the first day of the week. Accepts: `Sunday`, `Monday`, `Tuesday`, `Wednesday`, `Thursday`, `Friday`, `Saturday`. +* `person[time_format]` - the time display format. Accepts: `twelve_hour`, `twenty_four_hour`. + +Returns `200 OK` with the updated [preferences](#get-my-preferences) JSON representation. + +###### Example JSON Request + +```json +{ + "person": { + "time_zone_name": "London", + "first_week_day": "Monday", + "time_format": "twenty_four_hour" + } +} +``` + +###### Copy as cURL + +```shell +curl -s -H "Authorization: Bearer $ACCESS_TOKEN" -H "Content-Type: application/json" \ + -d '{"person":{"time_zone_name":"London","first_week_day":"Monday","time_format":"twenty_four_hour"}}' -X PUT \ + https://3.basecampapi.com/$ACCOUNT_ID/my/preferences.json +``` From dc893cb282f1761acff3107cd21dab2f73e22f4a Mon Sep 17 00:00:00 2001 From: Rob Zolkos Date: Wed, 11 Mar 2026 17:58:12 -0400 Subject: [PATCH 2/2] Use JSON key names instead of Rails bracket notation for parameters --- sections/people.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sections/people.md b/sections/people.md index f33b6f5..52c58d7 100644 --- a/sections/people.md +++ b/sections/people.md @@ -299,11 +299,11 @@ Update my preferences * `PUT /my/preferences.json` will update the current user's preferences. -All parameters are optional. Only include the ones you want to change. +All parameters are optional. Only include the ones you want to change. These parameters should be sent inside the top-level `person` object in the JSON request body. -* `person[time_zone_name]` - the user's time zone (e.g. `America/Chicago`, `London`, `UTC`). Accepts any valid Rails time zone name. -* `person[first_week_day]` - the first day of the week. Accepts: `Sunday`, `Monday`, `Tuesday`, `Wednesday`, `Thursday`, `Friday`, `Saturday`. -* `person[time_format]` - the time display format. Accepts: `twelve_hour`, `twenty_four_hour`. +* `time_zone_name` - the user's time zone (e.g. `America/Chicago`, `London`, `UTC`). Accepts any valid Rails time zone name. +* `first_week_day` - the first day of the week. Accepts: `Sunday`, `Monday`, `Tuesday`, `Wednesday`, `Thursday`, `Friday`, `Saturday`. +* `time_format` - the time display format. Accepts: `twelve_hour`, `twenty_four_hour`. Returns `200 OK` with the updated [preferences](#get-my-preferences) JSON representation.