createTenantSetting
Requires permission settings:tenant:create.
Creates a setting in a category the generic settings operations manage. A category that has its own update operation is refused. Needs settings:tenant:create.
Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.
Example:
- GraphQL
- cURL
mutation CreateTenantSetting($input: CreateTenantSettingInput!) {
createTenantSetting(input: $input) {
id
createdAt
category
dataType
description
enteredBy
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "mutation CreateTenantSetting($input: CreateTenantSettingInput!) {\n createTenantSetting(input: $input) {\n id\n createdAt\n category\n dataType\n description\n enteredBy\n }\n}",
"variables": {
"input": {
"category": "ACCOUNTING",
"dataType": "ARRAY",
"isActive": true,
"key": "string"
}
}
}
EOF
Variables:
{
"input": {
"category": "ACCOUNTING",
"dataType": "ARRAY",
"isActive": true,
"key": "string"
}
}
Response:
{
"data": {
"createTenantSetting": {
"id": "id",
"createdAt": "2025-01-15T00:00:00Z",
"category": "ACCOUNTING",
"dataType": "ARRAY",
"description": "string",
"enteredBy": "string"
}
}
}
createTenantSetting(
input: CreateTenantSettingInput!
): TenantSetting!
Arguments
createTenantSetting.input ● CreateTenantSettingInput! non-null input
The setting's category, key, value and data type, with an optional description, validation rule and active flag.
Type
TenantSetting object
A setting of the organization.