Change a account setting
Changes one typed account-wide setting (internal client only).
ACCOUNT-WIDE CONFIGURATION WRITE. A setting is a typed configuration value (number, date, enum, text) that applies to the whole account, as opposed to an on/off feature (PUT /v1/feature). Only callable with a JWT issued to the OAuth client 'uitestmobile'. Every call writes — there is no "unchanged" short-cut — after validation.
Use it to:
- Internal UI / test automation (client 'uitestmobile') configuring a test account
Not for:
- Integrations: the operation rejects every other OAuth client (400).
- On/off feature flags →
PUT /v1/feature
Rules across fields:
- R1: With an e-conomic integration active: InvoiceSetting_NumberOfDecimals must be 2 and InvoiceSetting_RoundTotals must be no rounding; InvoiceSetting_ExportType = export-and-e-mail needs InvoiceSetting_ExportEmail set.
Behaviour:
- Safe to retry only under a condition.
- Duplicates: Not short-circuited: re-sending the same value rewrites it and raises the events again.
- Side effect: Setting-specific post actions, e.g. CustomerDefaultCountry, TimeRegistrationPotentialTypeColumn, DefaultTimeSheetViewForNewUsers; FlexTruncationDate 1 (Today) / 2 (Yesterday) raises the events that create / delete today's flex postings for employees.
See also: PUT /v1/feature
Not yet documented: behaviour → consistency; behaviour → idempotent; examples (success).
curl -X PUT "https://app3.timelog.com/your-account/api/v1/setting" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-d '{
"ID": 123,
"Value": "null"
}'
import requests
import json
url = "https://app3.timelog.com/your-account/api/v1/setting"
headers = {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN"
}
data = {
"ID": 123,
"Value": "null"
}
response = requests.put(url, headers=headers, json=data)
print(response.json())
const response = await fetch("https://app3.timelog.com/your-account/api/v1/setting", {
method: "PUT",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN"
},
body: JSON.stringify({
"ID": 123,
"Value": "null"
})
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
"bytes"
"encoding/json"
)
func main() {
data := []byte(`{
"ID": 123,
"Value": "null"
}`)
req, err := http.NewRequest("PUT", "https://app3.timelog.com/your-account/api/v1/setting", bytes.NewBuffer(data))
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Authorization", "Bearer YOUR_API_TOKEN")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
require 'net/http'
require 'json'
uri = URI('https://app3.timelog.com/your-account/api/v1/setting')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Put.new(uri)
request['Content-Type'] = 'application/json'
request['Authorization'] = 'Bearer YOUR_API_TOKEN'
request.body = '{
"ID": 123,
"Value": "null"
}'
response = http.request(request)
puts response.body
"null"
{
"error": "Bad Request",
"message": "The request contains invalid parameters or malformed data",
"code": 400,
"details": [
{
"field": "email",
"message": "Invalid email format"
}
]
}
{
"error": "Unauthorized",
"message": "Authentication required. Please provide a valid API token",
"code": 401
}
{
"error": "Internal Server Error",
"message": "An unexpected error occurred on the server",
"code": 500,
"requestId": "req_1234567890"
}
/v1/setting
Target server for requests. Edit to use your own host.
OAuth 2.0 bearer token, sent as Authorization: Bearer <token>. JWT and reference tokens are both accepted. The token must carry the required scope (default tlp).
The token's sub claim is the acting user. A token WITHOUT sub (client-credentials) acts as the system service user. If the sub user cannot log in (inactive, locked, deleted), the request is rejected with 401 — it is no longer let through without a user.
> Not yet documented: how to obtain a token.
> Not yet documented: token lifetime.
Authorization: Bearer <token>. JWT and reference tokens are both accepted. The token must carry the required scope (default tlp).
The token's sub claim is the acting user. A token WITHOUT sub (client-credentials) acts as the system service user. If the sub user cannot log in (inactive, locked, deleted), the request is rejected with 401 — it is no longer let through without a user.
> Not yet documented: how to obtain a token.
> Not yet documented: token lifetime.The media type of the request body
The setting to change, as a SettingIdentifier member (integer in REST v1, e.g. 27 = FlexTruncationDate, 277 = IntercompanyExchangeRateSelectedPollType). The enum has a few hundred members; there is no REST v1 operation that lists them with their current values. - omitted — Binds to 0 = ExternalProjectDefaultOrderStatus — no model validation catches it. > Not yet documented: values → lookup op.
The new value as a string, in the setting's own format (number, date, enum integer, text). The manager parses and sanitises it per setting type before saving. > Not yet documented: values.
Request Preview
Response
Response will appear here after sending the request
Authentication
Bearer token. OAuth 2.0 bearer token, sent as Authorization: Bearer <token>. JWT and reference tokens are both accepted. The token must carry the required scope (default tlp).
The token's sub claim is the acting user. A token WITHOUT sub (client-credentials) acts as the system service user. If the sub user cannot log in (inactive, locked, deleted), the request is rejected with 401 — it is no longer let through without a user.
Not yet documented: how to obtain a token.
Not yet documented: token lifetime.
Body
The setting to change, as a SettingIdentifier member (integer in REST v1, e.g. 27 = FlexTruncationDate, 277 = IntercompanyExchangeRateSelectedPollType). The enum has a few hundred members; there is no REST v1 operation that lists them with their current values.
- omitted — Binds to 0 = ExternalProjectDefaultOrderStatus — no model validation catches it.
Not yet documented: values → lookup op.
The new value as a string, in the setting's own format (number, date, enum integer, text). The manager parses and sanitises it per setting type before saving.
Not yet documented: values.
Responses
Success without content: HTTP 200 with the literal JSON body null. Literal JSON null.