-
Notifications
You must be signed in to change notification settings - Fork 121
Document out of office API endpoints #387
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
robzolkos
wants to merge
2
commits into
basecamp:master
Choose a base branch
from
robzolkos:api-out-of-office
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+109
−0
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,104 @@ | ||
| Out of office | ||
| ============= | ||
|
|
||
| Endpoints: | ||
|
|
||
| - [Get out of office](#get-out-of-office) | ||
| - [Enable out of office](#enable-out-of-office) | ||
| - [Disable out of office](#disable-out-of-office) | ||
|
|
||
|
|
||
| Get out of office | ||
| ----------------- | ||
|
|
||
| * `GET /people/2/out_of_office.json` will return the out of office status for the person with the given ID. | ||
|
|
||
| When out of office is not enabled, `start_date` and `end_date` will be `null`. | ||
|
|
||
| ###### Example JSON Response | ||
| <!-- START GET /people/2/out_of_office.json --> | ||
| ```json | ||
| { | ||
| "person": { | ||
| "id": 1049715914, | ||
| "name": "David Heinemeier Hansson" | ||
| }, | ||
| "enabled": true, | ||
| "ongoing": true, | ||
| "start_date": "2026-03-10", | ||
| "end_date": "2026-03-17" | ||
| } | ||
| ``` | ||
| <!-- END GET /people/2/out_of_office.json --> | ||
| ###### Copy as cURL | ||
|
|
||
| ```shell | ||
| curl -s -H "Authorization: Bearer $ACCESS_TOKEN" https://3.basecampapi.com/$ACCOUNT_ID/people/2/out_of_office.json | ||
| ``` | ||
|
|
||
|
|
||
| Enable out of office | ||
| -------------------- | ||
|
|
||
| * `PUT /people/2/out_of_office.json` will enable or update out of office for the person with the given ID. | ||
|
|
||
| Admins on accounts with a Pro Pack can enable out of office on behalf of other people. Otherwise, you can only manage your own out of office. | ||
|
|
||
| This endpoint will return `200 OK` with the current JSON representation of the out of office if the update was a success. | ||
|
|
||
| **Required parameters**: | ||
|
|
||
| * `start_date` - the start date in ISO 8601 format (e.g. `2026-03-10`). | ||
| * `end_date` - the end date in ISO 8601 format (e.g. `2026-03-17`). | ||
|
|
||
robzolkos marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| ###### Example JSON Request | ||
|
|
||
| ```json | ||
| { | ||
| "out_of_office": { | ||
| "start_date": "2026-03-10", | ||
| "end_date": "2026-03-17" | ||
| } | ||
| } | ||
| ``` | ||
|
|
||
| ###### Example JSON Response | ||
| <!-- START PUT /people/2/out_of_office.json --> | ||
| ```json | ||
| { | ||
| "person": { | ||
| "id": 1049715914, | ||
| "name": "David Heinemeier Hansson" | ||
| }, | ||
| "enabled": true, | ||
| "ongoing": true, | ||
| "start_date": "2026-03-10", | ||
| "end_date": "2026-03-17" | ||
| } | ||
| ``` | ||
| <!-- END PUT /people/2/out_of_office.json --> | ||
| ###### Copy as cURL | ||
|
|
||
| ```shell | ||
| curl -s -H "Authorization: Bearer $ACCESS_TOKEN" -H "Content-Type: application/json" \ | ||
| -d '{"out_of_office": {"start_date": "2026-03-10", "end_date": "2026-03-17"}}' -X PUT \ | ||
| https://3.basecampapi.com/$ACCOUNT_ID/people/2/out_of_office.json | ||
| ``` | ||
|
|
||
|
|
||
| Disable out of office | ||
| --------------------- | ||
|
|
||
| * `DELETE /people/2/out_of_office.json` will disable out of office for the person with the given ID. | ||
|
|
||
| Admins on accounts with a Pro Pack can disable out of office on behalf of other people. Otherwise, you can only manage your own out of office. | ||
|
|
||
| This endpoint will return `204 No Content` if the disable was a success. Disabling when out of office is already off will also return `204 No Content`. | ||
|
|
||
| ###### Copy as cURL | ||
|
|
||
| ```shell | ||
| curl -s -H "Authorization: Bearer $ACCESS_TOKEN" -X DELETE \ | ||
| https://3.basecampapi.com/$ACCOUNT_ID/people/2/out_of_office.json | ||
| ``` | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.