User Settings
curl --request GET \
--url https://api.example.com/api/v2/user/settings \
--header 'Content-Type: application/json' \
--data '
{
"language": "<string>",
"image_format": "<string>",
"notifications_enabled": true
}
'import requests
url = "https://api.example.com/api/v2/user/settings"
payload = {
"language": "<string>",
"image_format": "<string>",
"notifications_enabled": True
}
headers = {"Content-Type": "application/json"}
response = requests.get(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({language: '<string>', image_format: '<string>', notifications_enabled: true})
};
fetch('https://api.example.com/api/v2/user/settings', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/v2/user/settings",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_POSTFIELDS => json_encode([
'language' => '<string>',
'image_format' => '<string>',
'notifications_enabled' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/v2/user/settings"
payload := strings.NewReader("{\n \"language\": \"<string>\",\n \"image_format\": \"<string>\",\n \"notifications_enabled\": true\n}")
req, _ := http.NewRequest("GET", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/api/v2/user/settings")
.header("Content-Type", "application/json")
.body("{\n \"language\": \"<string>\",\n \"image_format\": \"<string>\",\n \"notifications_enabled\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v2/user/settings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"language\": \"<string>\",\n \"image_format\": \"<string>\",\n \"notifications_enabled\": true\n}"
response = http.request(request)
puts response.read_bodyUser
User Settings
Get and update user preferences
GET
/
api
/
v2
/
user
/
settings
User Settings
curl --request GET \
--url https://api.example.com/api/v2/user/settings \
--header 'Content-Type: application/json' \
--data '
{
"language": "<string>",
"image_format": "<string>",
"notifications_enabled": true
}
'import requests
url = "https://api.example.com/api/v2/user/settings"
payload = {
"language": "<string>",
"image_format": "<string>",
"notifications_enabled": True
}
headers = {"Content-Type": "application/json"}
response = requests.get(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({language: '<string>', image_format: '<string>', notifications_enabled: true})
};
fetch('https://api.example.com/api/v2/user/settings', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/v2/user/settings",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_POSTFIELDS => json_encode([
'language' => '<string>',
'image_format' => '<string>',
'notifications_enabled' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/v2/user/settings"
payload := strings.NewReader("{\n \"language\": \"<string>\",\n \"image_format\": \"<string>\",\n \"notifications_enabled\": true\n}")
req, _ := http.NewRequest("GET", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/api/v2/user/settings")
.header("Content-Type", "application/json")
.body("{\n \"language\": \"<string>\",\n \"image_format\": \"<string>\",\n \"notifications_enabled\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v2/user/settings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"language\": \"<string>\",\n \"image_format\": \"<string>\",\n \"notifications_enabled\": true\n}"
response = http.request(request)
puts response.read_bodyGet Settings
curl https://elumenta.ru/api/v2/user/settings \
-H "Authorization: Bearer nb_YOUR_API_KEY"
{
"language": "en",
"image_format": "webp",
"notifications_enabled": true,
"default_image_size": "1024x1024"
}
Update Settings
curl -X PATCH https://elumenta.ru/api/v2/user/settings \
-H "Authorization: Bearer nb_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"image_format": "png", "language": "ru"}'
string
Interface language:
en | rustring
Default output format for image generation:
webp (default) | png | jpegboolean
Enable/disable Telegram bot notifications.
200 OK with the updated settings object.⌘I

