In this article, we describe how to send invitations to Flow365 learners and delete invitations via API.
To send an invitation to a Flow365 learner via API:
1. Go to https://api.365.systems/ and make sure you are authorized with the relevant API key.
2. In the Invitations section, select the POST /services/users/Invitations endpoint and select Try it out in the top right-hand corner.
3. In the request body, enter the following string parameters:
- email. A learner’s email is mandatory since an invitation goes to this address. The email must be unique, meaning it shouldn’t belong to an existing Flow365 learner.
- phone (optional). The phone number must be unique, meaning it shouldn’t belong to the already existing Flow365 learner.
- department (optional). The department to which a learner belongs.
- jobTitle (optional). The learner’s job title.
- displayName (optional). The learner’s full name that is displayed in Learn365. Learners can change their display name while activating their account.
4. Select Execute to run the request.
5. Go to the Response block to check the results:
- 200 code with the invitation details in its body indicates a successful response.
- In case of a validation error (for example, an email isn’t unique), the 400 response body contains the errors array explaining the issue.
- In case of other errors, the response body contains the error object with the code and message keys explaining the issue.
To delete an invitation to a Flow365 learner via API, you’ll need the invitation ID. There are two ways to find this:
- If you invite a learner via the POST /services/users/Invitations API, the response contains the id parameter.
- You can view the details, including the id parameter, of every pending invitation by sending the GET /services/users/api/Invitations request. For more information about this request, see this article.
To delete an invitation to a Flow365 learner via API:
1. Go to https://api.365.systems/ and make sure you are authorized with the relevant API key.
2. In the Invitations section, select the DELETE /services/users/Invitations endpoint and select Try it out in the top right-hand corner.
3. Enter the ID of the invitation in the id field.
4. Select Execute to run the request.
5. Go to the Response block to check the results:
- 204 code indicates a successful response.
- If there are no invitations with the ID you entered, the 404 code is displayed.
- In case of other errors, the response body contains the error object with the code and message keys explaining the issue.
Comments
Article is closed for comments.