Managing Legal Agreements on the Platform

The platform includes these types of legal agreements:

  • Platform signup legal agreement
  • API legal agreement
  • License legal agreement

The type of legal agreement most commonly used is the API legal agreement. The information below will help you manage legal agreements associated with your API.

Platform Signup Legal Agreement

The platform allows only one end-user signup legal agreement.

You will first need to upload the legal agreement using the Content API, and then make it the default platform legal agreement using the Legals service.

For detailed instructions, refer to POST /api/legals. For an example, refer to Example: Adding a Platform Signup Legal Agreement.

API Legal Agreements

Your API can have one or more legal agreements that you can require users to accept as part of requesting a contract with your API.

API legal agreements can be HTML or text files.

There are several steps to setting up a legal agreement for your API. The steps must be followed in sequence, as shown below, using the operations listed.

Note: To check what legal agreement documents you already have in place for your API, use the GET /api/apis/versions/{APIVersionID}/legals operation. To make sure you see all agreements, including drafts and inactive agreements, include these optional parameters: Drafts=true and Inactive=true.

To set up a legal agreement for an API
  1. Create the legal agreement in the legals folder of the filesystem for your API on the platform.

    Operation: POST /content/{path} (with application/x-www-form-urlencoded content-type) in the Content service (you could also use POST /content/{path} (with multipart/form-data content-type).

    Note: your legal agreement should go in the /legals folder for your API. The content path should be something like: /api/{APIID}/legal/eula.txt. See an example.

  2. Publish the legal agreement. This adds it to the Table of Contents for the folder. In the user interface, you cannot activate the legal agreement until you publish it by clicking the Publish button in the File Manager.

    Operation: POST /content/{path} in the Content service. Send the updated TOC JSON file in the body. For example:

    Content: {"toc":["eula.txt"],"sequence":["eula.txt","EULA_draft.txt"],"displayNames":{}}

    In the above example, two EULA versions were uploaded, but only eula.txt was published.

  3. Activate the legal agreement. Once it's activated, developers see it and are required to accept it when requesting access to your API.

    Operation: POST /api/apis/versions/{APIVersionID}/legals

Other things you can do with legal agreements

Once you have your API legal agreements set up, you can use additional operations to perform additional functions relating to managing API legals. All operations relating to management of API legal agreements are shown in the table below.

To perform this function... Use this operation...
Modify name and/or description of the legal agreement (these values are displayed to users when the legal agreement is presented for acceptance) PUT /api/apis/versions/{APIVersionID}/legals/{LegalDocumentID}/details
Modify the state of the legal agreement, between active and inactive states PUT /api/apis/versions/{APIVersionID}/legals/{LegalDocumentID}/state
Retrieve a summary of information about the legal agreements for your API GET /api/apis/versions/{APIVersionID}/legals
Delete the association between a specific legal agreement document and an API version (first make sure it is in an inactive state) DELETE /api/apis/versions/{APIVersionID}/legals/{LegalDocumentID}
Delete the actual document (first make sure it is in an inactive state, then delete the association between the legal agreement and the API, before deleting the document) DELETE /content/delete

Back to top

Related Topics