This page is about an old version of Active Collab that's not developed anymore.
Click here to open the documentation for the latest version.

Working with Companies and Users

activeCollab offers several API commands designed to allow other applications to create and manage Company and User accounts inside the system.

About Companies #

This request lists all Company related fields available in activeCollab:

  • name (string) - company name. Value of this field is required and needs to be unique in the system,
  • office_address (string) - address of company headquarter,
  • office_phone (string) - office phone number,
  • office_fax (string) - office fax number,
  • office_homepage (string) - official company website,
  • note (string) - company note, if there is any.

You can find some additional commands available for handling Companies in the list of Object state related commands.

About User Accounts #

User account fields available via activeCollab API are:

  • email (string) - The user's email address. The value of this field is required when a User Account is created and must be properly formatted. There can be only one user associated with any given email address in the system.
  • password (string) - The user's password. A value for this field is required when a User Account is created. Minimal length of the password is 3 characters.
  • password_a (string) - The user's password repeated. A value for this field is required when a User Account is created
  • first_name (string) -The name of the user
  • last_name (string) - The last name of that user
  • type (string) - Name of the System Role that this user is having. Five values are possible: Administrator, Manager, Member, Subcontractor and Client. Extra permissions can be set by using custom_permissions property
  • title (string) - The user's title
  • phone_mobile (string) - The user's mobile phone contact information
  • phone_work (string) - The user's work phone contact information

Each System Role in activeCollab has a set of Custom Permissions. Here is the list of fields that you can use to add these these permissions via activeCollab API:

  • Administrator:

  • can_manage_finances - Manage Finances

  • can_manage_quotes - Manage Quotes

  • Manager:

  • can_manage_trash - Manage Trash

  • can_manage_people - Manage People
  • can_manage_projects - Manage Projects
  • can_manage_project_requests - Manage Project Requests
  • can_manage_documents - Manage Global Documents
  • can_use_status_updates - Use Status Updates
  • can_manage_finances - Manage Finances
  • can_manage_quotes - Manage Quotes

  • Member/Employee:

  • can_use_api - Use API and Feeds

  • can_see_company_notes - See Company Notes
  • can_see_project_budgets - See Project Budgets
  • can_add_projects - Create New Projects
  • can_use_documents - Use Global Documents
  • can_use_status_updates - Use Status Updates

  • Subcontractor:

  • can_use_api - Use API and Feeds

  • can_add_projects - Create New Projects
  • can_use_documents - Use Global Documents
  • can_use_status_updates - Use Status Updates

  • Client:

  • can_use_api - Use API and Feeds

  • can_request_projects - Submit Project Requests
  • can_use_documents - Use Global Documents
  • can_manage_client_finances - Receive and Pay Invoices.

If you wish to use some additional commands that are available for user accounts you can find them in the Object state related commands article.

people #

This request will list all active Companies that are defined in activeCollab People section.

Method: GET

Example response:

1
2
3
4
5
6
7
8
9
<companies>
  <company>
    <id>1</id>
    <name>
      <![CDATA[Owner Company]]>
    </name>
    ...
  </company>
</companies>

people/add-company #

This command will create a new Company. If operation was successful, system will return details of the newly created company.

Method: POST

Request example:

1
2
company[name]=Example Company
submitted=submitted

Example response:

1
2
3
4
5
6
7
<company>
  <id>5</id>
  <name>
    <![CDATA[Example Company]]>
  </name>
  ...
</company>

people/archive #

All archived companies in People section will be listed with this command.

Method: GET

Example response:

1
2
3
4
5
6
7
8
9
<companies>
  <company>
    <id>2</id>
    <name>
      <![CDATA[Example Client Company]]>
    </name>
    ...
  </company>
</companies>

people/:company_id #

This command Displays the properties of a specific Company available in activeCollab.

Method: GET

Example response:

1
2
3
4
5
6
7
<company>
  <id>2</id>
  <name>
    <![CDATA[Example Client Company]]>
  </name>
  ...
</company>

people/:company_id/edit #

With this command you can update properties of an existing Company. On success, updated company details are returned.

Method: POST

Request example:

1
2
company[name]=Updated via API
submitted=submitted

Response example:

1
2
3
4
5
6
7
<company>
  <id>2</id>
  <name>
    <![CDATA[Updated via API]]>
  </name>
  ...
</company>

people/:company_id/add-user #

This command creates a User Account in the selected Company. If successful, the function will display details of the newly created user account.

Restricion

Only Administrators and People Managers can set role_id value. If a user who creates the new account is not an Administrator or People Manager, the default role ID will be used.

Method: POST

Request example:

1
2
3
4
5
6
7
user[email]=api@example.com
user[password]=testing
user[password_a]=testing
user[type]=Client
user[custom_permissions][]=can_use_api
user[custom_permissions][]=can_manage_client_finances
submitted=submitted

Response:

1
2
3
4
5
<user>
  <id>...</id>
  <company_id>...</company_id>
  ...
</user>

people/:company_id/users/:user_id #

Shows details of a specific User Account will be displayed with this account.

Method: GET

Example response:

1
2
3
4
<user>
  <id>6</id>
  ...
</user>

people/:company_id/users/:user_id/edit-profile #

Updates details of an existing user by using this command.

Method: POST

Request example:

1
2
3
user[first_name]=Eli
user[last_name]=Frost
submitted=submitted

Example response:

1
2
3
4
5
6
7
<user>
  <id>6</id>
  <name>
    <![CDATA[Eli Frost]]>
  </name>
  ...
</user>