1

I'am using the Active Collab API V5 to create User from our Service Desk - the creation of the User with the following POST works.

curl -k -v -h "Content-Type:application/json" -h "X-Angie-AuthApiToken:XXXXXXX" -X POST -d '{"type": "Member","email": "XXXXXXXX@XXXXXX", "password": "XXXXX"}' https://URL/api/v1/users

Is it possible to send the invite link automatically? Like the User creation on the web interface (Send invite link from People page).

I found this API Reference https://developers.activecollab.com/api-documentation/v1/people/users/invite.html but on this way its only possible to invite directly to projects.

Ilija
  • 4,105
  • 4
  • 32
  • 46

1 Answers1

0

System makes a distinction between account creation, and invitiation (which includes account creation, but does a bit more). Here's how to invite one user or more users:

curl -h "Content-Type:application/json" \
     -h "X-Angie-AuthApiToken:XXXXXXX" \
     -X POST -d '{"role": "Member","email_addresses": ["X@Y.COM", "Y@X.com"], "custom_permissions": ["can_manage_projects", "can_manage_finances"]}' \
      https://URL/api/v1/users/invite

Differences:

  • API end-point is different (/api/v1/users/invite),
  • Use role instead of type,
  • A list of more than one email address can be specified,
  • Custom permissions can be set,
  • You can't specify user's password. They will receive invitation email, and complete the process themselves.
Ilija
  • 4,105
  • 4
  • 32
  • 46