User Agreements

Last modified on August 24, 2023 at 8:19 pm


The useragreements resource provides access to the end-user license agreements (EULAs) your users either have agreed to or will be required to agree to on first login. An agreement could be the standard DigitalChalk agreement if you have not changed your EULA configuration; a custom agreement specific to your organization; both, or neither. In addition to inspecting a user’s agreement status, you can also override the agreement. That is, you can manually force an agreeement to be accepted for a user, or remove their agreed status and force them to re-agree. The agreed property is the only modifiable property of the useragreement; all other fields are read-only.

Intead of being identified by an id property, user agreements are defined by their type. There are two possible types: standard, the DigitalChalk-defined agreement by which every DigitalChalk user is bound; and custom, which indicates a custom agreement your organization has defined to present to users. You can retrieve the full list of agreements by issuing a GET request to /dc/api/v5/users/{userId}/agreements, or you can work with a specific agreement by appending the type to the end of the path, e.g. /dc/api/v5/users/{userId}/agreements/standard.

Any user agreement defined in the system is required for the user to accept. That is, if you have disabled the standard DigitalChalk End-User License Agreement for your organization, then the standard user agreement will not exist for any user, and requests to /dc/api/v5/users/{userId}/agreements/standard will fail with status 404 Not Found.

A user agreement that has agreed=true will maintain the title and text of the agreement that the user was presented with, even if that agreement has subsequently been revised. You can check to see if the user has agreed to the latest version of the agreement by comparing the agreedDate property with the updatedDate property on the agreement resourece. For more information on agreements, see the Agreements Resource documentation.

Use Case Examples

GET Requests

Retrieve all useragreement dataGET /dc/api/v5/users/{userId}/agreementsRetrieve all useragreements that are required for the given user, or that they will need to agree to on next login
Retrieve data for a specific useragreementGET /dc/api/v5/users/{userId}/agreements/{type}Retrieve a specific useragreement by specifying an agreement type in the URL

PUT Requests

Force-agree to a specific useragreementPUT /dc/api/v5/users/{userId}/agreements/{type}Update the specified user agreement, manually setting agreed status
Clear the agreed status of a useragreementPUT /dc/api/v5/users/{userId}/agreements/{type}Update the specified user agreement, clearing the agreed status