Your browser is no longer supported! Please upgrade your web browser now. Learn More

People

  1. Show a user
  2. Show all users
  3. Create new user
  4. Reset password for user
  5. Update user
  6. Delete existing user
  7. Toggle an existing user
Show a user

GET /people/#{user_id}

HTTP Response: 200 Success
<user>
  <id type="integer">54234</id>
  <email>Jane@Doe.com</email>
  <first-name>Jane</first-name>
  <last-name>Doe</last-name>
  <!-- If true the user will be added to all new projects automatically -->
  <has-access-to-all-future-projects type="boolean">
    false
  </has-access-to-all-future-projects>
  <!-- If present the user will bill out with this value on all
  future projects she is added to. To change existing rates
  You'll have to change the UserAssignment object -->
  <default-hourly-rate type="decimal">100</default-hourly-rate>
  <!-- If true the user will be able to login and record time entries -->
  <is-active type="boolean">true</is-active>
  <is-admin type="boolean">true</is-admin>
  <is-contractor type="boolean">true</is-contractor>
  <telephone></telephone>
  <department></department>
  <timezone>Eastern Time (US & Canada)</timezone>
  <updated-at type="datetime">2008-04-09T12:07:56Z</updated-at>
  <created-at type="datetime">2008-04-09T12:07:56Z</created-at>
</user>

Note: You may also pass a user's email address in place of a user_id.

Show all users

GET /people

HTTP Response: 200 Success
<users>
  <user>
    <id type="integer">54234</id>
    <email>Jane@Doe.com</email>
    <first-name>Jane</first-name>
    <last-name>Doe</last-name>
    <!-- If true the user will be added to all new projects automatically -->
    <has-access-to-all-future-projects type="boolean">
      false
    </has-access-to-all-future-projects>
    <!-- If present the user will bill out with this value on all
    future projects she is added to. To change existing rates
    You'll have to change the UserAssignment object -->
    <default-hourly-rate type="decimal">100</default-hourly-rate>
    <!-- If true the user will be able to login and record time entries -->
    <is-active type="boolean">true</is-active>
    <is-admin type="boolean">true</is-admin>
    <is-contractor type="boolean">true</is-contractor>
    <telephone></telephone>
    <department></department>
    <timezone>Eastern Time (US & Canada)</timezone>
    <updated-at type="datetime">2008-04-09T12:07:56Z</updated-at>
    <created-at type="datetime">2008-04-09T12:07:56Z</created-at>
   </user>
</users>

You can filter by updated_since. To show only the people that have been updated since "2010-09-25 18:30", pass the UTC date time value (URL encoded).

GET /people?updated_since=2010-09-25+18%3A30

HTTP Response: 200 Success
Create new user

POST /people

HTTP Response: 201 Created
Location: /people/#{new_user_id}

Sample post:

<user>
  <first-name>Edgar</first-name>
  <last-name>Ruth</last-name>
  <email>edgar@ruth.com</email>
  <timezone>Central Time (US &amp; Canada)</timezone>
  <is-admin type="boolean">false</is-admin>
  <telephone>444-444</telephone>
</user>

Upon creation, an email will be sent to the new user with instructions for setting a password.

Note: we accept only a limited set of values for the timezone attribute.

Reset password for user

POST /people/#{user_id}/reset_password

Harvest will send an email with instructions for resetting a password to the user. All other API calls will ignore changes to the password attribute.

Update user

PUT /people/#{user_id}

HTTP Response: 200 OK
Location: /people/#{user_id}

You can update selected attributes for a user. Note that updates to password are disregarded.

<user>
  <first_name>John</first-name>
  <last_name>Doe</last-name>
  <email>john@doe.com</email>
  <timezone>Central Time (US & Canada)</timezone>
  <is_admin type="boolean">true</is-admin>
  <telephone>212-555-1212</telephone>
</user>
Delete existing user

DELETE /people/#{user_id}

HTTP Response: 200 OK is returned if user does not have any hours logged.
Otherwise the user is not removable and HTTP Response: 400 Bad Request is returned. You can still archive the user to disable the user's login.
Toggle an existing user

POST /people/#{user_id}/toggle

This will archive an active user or activate an archived user. Note that activation is not performed if it results in more users allowed than the plan limit. Response is HTTP Response: 400 Bad Request or in case of success HTTP Response: 200 OK