- Returning.AI
- Auth
- User
- Server
- Category
- Role
- Channel
- Language Setting
- Leaderboard
- Badge
- Gamification
- Api Token
- Custom Userfields
- Integration
create new language setting
Developing
POST
/language-settings
Request
Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.Example:
Authorization: Bearer ********************
Body Params application/json
serverId
string
required
communityText
string
required
openaiApiKey
string
required
aiMessageTranslation
boolean
required
supportedLanguages
array[string]
required
language
string
required
Example
{
"serverId": "{{serverId}}",
"communityText": "Welcome to our community!",
"openaiApiKey": "sk-1234567890abcdef",
"aiMessageTranslation": true,
"supportedLanguages": [
"en",
"de",
"fr"
],
"language": "en"
}
Request samples
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.returning.ai/api/v1/language-settings' \
--header 'Content-Type: application/json' \
--data-raw '{
"serverId": "",
"communityText": "Welcome to our community!",
"openaiApiKey": "sk-1234567890abcdef",
"aiMessageTranslation": true,
"supportedLanguages": [
"en",
"de",
"fr"
],
"language": "en"
}'
Responses
🟢200Success
application/json
Body
meta
object
required
success
boolean
required
message
string
required
devMessage
string
required
body
object
required
serverId
string
required
userId
string
required
communityText
string
required
openaiApiKey
string
required
aiMessageTranslation
boolean
required
supportedLanguages
array[string]
required
language
string
required
_id
string
required
createdAt
string
required
updatedAt
string
required
__v
integer
required
Example
{
"meta": {
"success": true,
"message": "Language setting has been created successfully",
"devMessage": "Language setting has been created successfully"
},
"body": {
"serverId": "60d0fe4f5311236168a109ca",
"userId": "1",
"communityText": "Welcome to our community!",
"openaiApiKey": "sk-1234567890abcdef",
"aiMessageTranslation": true,
"supportedLanguages": [
"en",
"de",
"fr"
],
"language": "en",
"_id": "66a28145fe1c8797121428ba",
"createdAt": "2024-07-25T16:45:57.606Z",
"updatedAt": "2024-07-25T16:45:57.606Z",
"__v": 0
}
}
Modified at 2024-07-27 16:57:07