Codebase API Documentation

User Management

You can invite users or view existing users and their current assignments through the API.

API URLs

Data Method URL
Show currently authenticated user GET /profile
List all users GET /users
List all roles GET /roles
Creating a new user POST /users

Object Properties

GET /users

<user>
  <company nil="true"></company>
  <access-level nil="true"></access-level>
  <last-activity-at nil="true"></last-activity-at>
  <api-key>aabbccddeeffgghhiijjkkllmmnnooppqq</api-key>
  <email-address>user@example.com</email-address>
  <id type="integer">1</id>
  <last-name>Wentworth</last-name>
  <first-name>Dan</first-name>
  <time-zone>London</time-zone>
  <username>dan</username>
  <assignments type="array">
    <assignment>
      <group-id></group-id>
      <icon type="integer">1</icon>
      <name>Awesome project</name>
      <overview nil="true"></overview>
      <start-page>overview</start-page>
      <status>active</status>
      <permalink>awesome-project</permalink>
    </assignment>
    <assignment>
      <group-id>Web Apps</group-id>
      <icon type="integer">1</icon>
      <name>Project Awesome</name>
      <overview nil="true"></overview>
      <start-page>overview</start-page>
      <status>active</status>
      <permalink>project-awesome</permalink>
    </assignment>
  </assignments>
  <enabled type="boolean">true</enabled>
</user>
  • company Company the user is assigned to
  • access-level Legacy field, always nil
  • last-activity-at Not currently recorded
  • api-key Users API key
  • email-address User's primary e-mail address
  • id User ID
  • first-name User's first name
  • last-name User's last name
  • time-zone User's time zone
  • username User's username
  • assignments A list of projects the user is currently assigned to

GET /roles

<role>
  <name>Trusted Users</name>
  <id type="integer">4</id>
  <default type="boolean">true</default>
  <permissions type="array">
    <permission>projects.read_all</permission>
  </permissions>
</role>
  • id Role ID
  • name Role name
  • default New users will automatically be added to this role unless otherwise specified
  • permissions an array of permissions given to this role.

Inviting a new user

To invite a new user you need only provide a users first name, last name, e-mail address and optionally a role-id if you wish them to be assigned to a role that isn't your default. Once submitted your new user will be e-mailed an invite link which they must follow to complete the signup process.

POST /users

<user>
  <first-name>Example</first-name>
  <last-name>User</last-name>
  <email-address>user@example.com</email-address>
  <role-id>1</role-id>
</user>