Updating the Terms & Conditions via API
You will need a user that has admin rights to write the new version of the T&Cs
Get an Auth Token using this guideline: How to get a Token for our APIs
Use this command to set it:
curl --location 'https://gateway.<baseUrl>/chat/graphql' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {TOKEN}' \
--data '{"query":"mutation createTermsAndConditions($termsAndConditions: String!) {\n createTermsAndConditions(termsAndConditions: $termsAndConditions) {\n id\n text\n isUniqueTermsAndConditions\n createdBy\n createdAt\n companyId\n }\n}","variables":{"termsAndConditions":"just a test\nmulti line\n# Titles work as well and markdown"}}'
You can use any markdown in the terms and conditions, as described here: Basic Syntax | Markdown Guide
Setting the Terms & Conditions to an empty string will completely remove the Terms and Conditions upon login.
Author | @Andreas Hauri |
---|
© 2024 Unique AG. All rights reserved. Privacy Policy – Terms of Service