Skip to content

Latest commit

 

History

History
228 lines (192 loc) · 7.27 KB

people.md

File metadata and controls

228 lines (192 loc) · 7.27 KB

People

Endpoints:

Get all people

  • GET /people.json will return all people visible to the current user.
Example JSON Response
[
  {
    "id": 1007299143,
    "attachable_sgid": "BAh7CEkiCGdpZAY6BkVUSSIrZ2lkOi8vYmMzL1BlcnNvbi8xMDA3Mjk5MTQzP2V4cGlyZXNfaW4GOwBUSSIMcHVycG9zZQY7AFRJIg9hdHRhY2hhYmxlBjsAVEkiD2V4cGlyZXNfYXQGOwBUMA==--919d2c8b11ff403eefcab9db42dd26846d0c3102",
    "name": "Victor Cooper",
    "email_address": "[email protected]",
    "personable_type": "User",
    "title": "Chief Strategist",
    "bio": "Don't let your dreams be dreams",
    "created_at": "2016-09-09T22:58:27.559Z",
    "updated_at": "2016-09-09T22:58:31.296Z",
    "admin": true,
    "owner": true,
    "time_zone": "America/Chicago",
    "avatar_url": "https://3.basecamp-static.com/195539477/people/BAhpBEcqCjw=--c632b967cec296b87363a697a67a87f9cc1e5b45/avatar-64-x4",
    "company": {
      "id": 1033447817,
      "name": "Honcho Design"
    }
  }
]
Copy as cURL
curl -s -H "Authorization: Bearer $ACCESS_TOKEN" https://3.basecampapi.com/$ACCOUNT_ID/people.json

Get people on a project

  • GET /projects/1/people.json will return all active people on the project with the given ID.

See the Get all people endpoint for an example of the JSON response.

Copy as cURL
curl -s -H "Authorization: Bearer $ACCESS_TOKEN" https://3.basecampapi.com/$ACCOUNT_ID/projects/1/people.json

Update who can access a project

  • PUT /projects/1/people/users.json allows granting new and existing people access to a project, and revoking access from existing people.

Parameters: Requests should include at least one of the following parameters.

  • grant - an array of people IDs.
  • revoke - an array of people IDs.
  • create - an array of new people with name and email_address properties, and optional title and company_name properties.
Example JSON Request
{
  "grant": [
    1007299151
  ],
  "revoke": [
    1007299150
  ],
  "create": [
    {
      "name": "Victor Copper",
      "email_address": "[email protected]",
      "title": "Prankster",
      "company_name": "Hancho Design"
    }
  ]
}
Copy as cURL
curl -s -H "Authorization: Bearer $ACCESS_TOKEN" -H "Content-Type: application/json" \
  -d '{"grant":[2],"revoke":[3,4]}' -X PUT \
  https://3.basecampapi.com/$ACCOUNT_ID/projects/1/people/users.json
Example JSON Response
{
  "granted": [
    {
      "id": 1007299151,
      "attachable_sgid": "BAh7CEkiCGdpZAY6BkVUSSIrZ2lkOi8vYmMzL1BlcnNvbi8xMDA3Mjk5MTUxP2V4cGlyZXNfaW4GOwBUSSIMcHVycG9zZQY7AFRJIg9hdHRhY2hhYmxlBjsAVEkiD2V4cGlyZXNfYXQGOwBUMA==--c2c6955487d989510c7cba74f95fb804ac9d0c7a",
      "name": "Amy Rivera",
      "email_address": "[email protected]",
      "personable_type": "User",
      "title": "Central Web Coordinator",
      "bio": "I never said most of the things I said",
      "created_at": "2016-09-09T22:58:28.471Z",
      "updated_at": "2016-09-09T22:58:28.471Z",
      "admin": false,
      "owner": false,
      "time_zone": "America/Chicago",
      "avatar_url": "https://3.basecamp-static.com/195539477/people/BAhpBE8qCjw=--44a343c4ec0f62daf82484ec3539efc8c74a336a/avatar-64-x4"
    },
    {
      "id": 1007299179,
      "attachable_sgid": "BAh7CEkiCGdpZAY6BkVUSSIrZ2lkOi8vYmMzL1BlcnNvbi8xMDA3Mjk5MTc5P2V4cGlyZXNfaW4GOwBUSSIMcHVycG9zZQY7AFRJIg9hdHRhY2hhYmxlBjsAVEkiD2V4cGlyZXNfYXQGOwBUMA==--5b7aee1ec5cf2236ccda51788e506f82c6b208a0",
      "name": "Victor Copper",
      "email_address": "[email protected]",
      "personable_type": "User",
      "title": "Prankster",
      "bio": null,
      "created_at": "2016-09-09T21:48:42.516Z",
      "updated_at": "2016-09-09T21:48:42.669Z",
      "admin": false,
      "owner": false,
      "time_zone": "Etc/UTC",
      "avatar_url": "https://3.basecamp-static.com/195539477/people/BAhpBGsqCjw=--4d718d305d97766ff1c41f0976c209897a495900/avatar-64-x4",
      "company": {
        "id": 1033447820,
        "name": "Hancho Design"
      }
    }
  ],
  "revoked": [
    {
      "id": 1007299150,
      "attachable_sgid": "BAh7CEkiCGdpZAY6BkVUSSIrZ2lkOi8vYmMzL1BlcnNvbi8xMDA3Mjk5MTUwP2V4cGlyZXNfaW4GOwBUSSIMcHVycG9zZQY7AFRJIg9hdHRhY2hhYmxlBjsAVEkiD2V4cGlyZXNfYXQGOwBUMA==--9856de8e8169dda9e2c441b7184985194b2d2296",
      "name": "Steve Marsh",
      "email_address": "[email protected]",
      "personable_type": "User",
      "title": "Legacy Directives Strategist",
      "bio": "You can do it!",
      "created_at": "2016-09-09T22:58:28.369Z",
      "updated_at": "2016-09-09T22:58:28.369Z",
      "admin": false,
      "owner": false,
      "time_zone": "America/Chicago",
      "avatar_url": "https://3.basecamp-static.com/195539477/people/BAhpBE4qCjw=--b544b6a710bd76020abc076fc041895954025116/avatar-64-x4",
      "company": {
        "id": 1033447817,
        "name": "Honcho Design"
      }
    }
  ]
}

Get pingable people

  • GET /circles/people.json will return all people on this Basecamp account who can be pinged.

See the Get all people endpoint for an example of the JSON response.

Note: This endpoint is currently not paginated.

Copy as cURL
curl -s -H "Authorization: Bearer $ACCESS_TOKEN" https://3.basecampapi.com/$ACCOUNT_ID/circles/people.json

Get person

  • GET /people/2.json will return the profile for the user with the given ID.
Example JSON Response
{
  "id": 1007299169,
  "attachable_sgid": "BAh7CEkiCGdpZAY6BkVUSSIrZ2lkOi8vYmMzL1BlcnNvbi8xMDA3Mjk5MTY5P2V4cGlyZXNfaW4GOwBUSSIMcHVycG9zZQY7AFRJIg9hdHRhY2hhYmxlBjsAVEkiD2V4cGlyZXNfYXQGOwBUMA==--8d8252a8a833e327749aec047863a6246d6891dd",
  "name": "Zach Settles",
  "email_address": "[email protected]",
  "personable_type": "User",
  "title": "Customer Paradigm Supervisor",
  "bio": "Procrastination is the art of keeping up with yesterday",
  "created_at": "2016-09-09T22:58:30.350Z",
  "updated_at": "2016-09-09T22:58:30.350Z",
  "admin": false,
  "owner": false,
  "time_zone": "America/Chicago",
  "avatar_url": "https://3.basecamp-static.com/195539477/people/BAhpBGEqCjw=--f278ae7c0479355c2aa772cb3155e925954de561/avatar-64-x4"
}
Copy as cURL
curl -s -H "Authorization: Bearer $ACCESS_TOKEN" https://3.basecampapi.com/$ACCOUNT_ID/people/2.json

Get my personal info

  • GET /my/profile.json will return the current user's personal info.

See the Get person endpoint for an example of the JSON response.

Copy as cURL
curl -s -H "Authorization: Bearer $ACCESS_TOKEN" https://3.basecampapi.com/$ACCOUNT_ID/my/profile.json