Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 66 additions & 0 deletions sections/account.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ Endpoints:

- [Get account](#get-account)
- [Update account name](#update-account-name)
- [Grant account ownership](#grant-account-ownership)
- [Revoke account ownership](#revoke-account-ownership)
- [Update account logo](#update-account-logo)
- [Remove account logo](#remove-account-logo)

Expand Down Expand Up @@ -128,6 +130,68 @@ curl -s -H "Authorization: Bearer $ACCESS_TOKEN" \
https://3.basecampapi.com/$ACCOUNT_ID/account/name.json
```

Grant account ownership
-----------------------

* `POST /account/people/2/ownership.json` will make the person with the given ID an account owner. Only account owners can use this endpoint — returns `403 Forbidden` for non-owners. Clients cannot be made owners.

**Required parameters**:

* `person_id` - the ID of the person to promote. The person must belong to the current account.

Returns `200 OK` with the updated [person][person] JSON representation. On success, the response will have `"owner": true`.

###### Example JSON Response
<!-- START POST /account/people/2/ownership.json -->
```json
{
"id": 1049715915,
"name": "Amy Rivera",
"email_address": "amy@honchodesign.com",
"owner": true
}
```
<!-- END POST /account/people/2/ownership.json -->

###### Copy as cURL

```shell
curl -s -H "Authorization: Bearer $ACCESS_TOKEN" \
-X POST \
https://3.basecampapi.com/$ACCOUNT_ID/account/people/2/ownership.json
```

Revoke account ownership
------------------------

* `DELETE /account/people/2/ownership.json` will remove account ownership from the person with the given ID. Only account owners can use this endpoint — returns `403 Forbidden` for non-owners. You cannot revoke your own ownership.

**Required parameters**:

* `person_id` - the ID of the person whose ownership should be revoked. The person must belong to the current account.

Returns `200 OK` with the updated [person][person] JSON representation. On success, the response will have `"owner": false`.

###### Example JSON Response
<!-- START DELETE /account/people/2/ownership.json -->
```json
{
"id": 1049715915,
"name": "Amy Rivera",
"email_address": "amy@honchodesign.com",
"owner": false
}
```
<!-- END DELETE /account/people/2/ownership.json -->

###### Copy as cURL

```shell
curl -s -H "Authorization: Bearer $ACCESS_TOKEN" \
-X DELETE \
https://3.basecampapi.com/$ACCOUNT_ID/account/people/2/ownership.json
```

Update account logo
-------------------

Expand Down Expand Up @@ -164,3 +228,5 @@ curl -s -H "Authorization: Bearer $ACCESS_TOKEN" \
-X DELETE \
https://3.basecampapi.com/$ACCOUNT_ID/account/logo.json
```

[person]: https://github.com/basecamp/bc3-api/blob/master/sections/people.md#get-person
Loading