Create Agreement
POST {{apiPath}}/environments/{{envID}}/agreements
The POST /environments/{{envID}}/agreements endpoint creates a new agreement resource in the specified environment.
The request body must include a unique name property value, and it can also include the reconsentPeriodDays property, which is an optional property to specify the number of days before the user must provide consent to the terms of service again.
Prerequisites
- See Agreement Management for important overview information.
For property descriptions, see Agreements data model.
| Property | Type | Required? |
|---|---|---|
description | String | Optional |
enabled | Boolean | Required |
name | String | Required |
reconsentPeriodDays | Integer | Optional |
Request Body
{"name"=>"Agreement_2", "description"=>"Terms of service agreement", "reconsentPeriodDays"=>180, "enabled"=>false}
RESPONSES
status: Created
{"_links":{"self":{"href":"https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/agreements/49d7aa39-41a0-4a6d-bafd-84cc5abf98f5"},"environment":{"href":"https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6"}},"id":"49d7aa39-41a0-4a6d-bafd-84cc5abf98f5","environment":{"id":"abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6"},"name":"Agreement_2","description":"Terms of service agreement","reconsentPeriodDays":180,"enabled":false}