- Returning.AI
- Auth
- User
- Server
- Category
- Role
- Channel
- Language Setting
- Leaderboard
- Badge
- Gamification
- Api Token
- Custom Userfields
- Integration
update category
Developing
PUT
/categories/{id}
Request
Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.Example:
Authorization: Bearer ********************
Path Params
id
string
required
Example:
66a879449127d5a8ce50d697
Body Params application/json
title
string
required
description
string
required
private
boolean
required
Example
{
"title": "Major Discussion",
"description": "This is a category for major discussion.",
"private": true
}
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 PUT 'https://api.returning.ai/api/v1/categories/66a879449127d5a8ce50d697' \
--header 'Content-Type: application/json' \
--data-raw '{
"title": "Major Discussion",
"description": "This is a category for major discussion.",
"private": true
}'
Responses
🟢200Success
application/json
Body
meta
object
required
success
boolean
required
message
string
required
devMessage
string
required
body
object
required
_id
string
required
serverId
string
required
title
string
required
description
string
required
private
boolean
required
roles
array[string]
required
users
array[string]
required
owner
object
required
categoryOrder
integer
required
translationAllowed
boolean
required
createdAt
string
required
updatedAt
string
required
__v
integer
required
Example
{
"meta": {
"success": true,
"message": "Category has been updated successfully",
"devMessage": "Category has been updated successfully"
},
"body": {
"_id": "66a3a39f0ce028bbfb458dff",
"serverId": "66a3a1a90ce028bbfb458dc3",
"title": "General Discussion",
"description": "This is a category for general discussion.",
"private": false,
"roles": [],
"users": [],
"owner": {
"id": "1"
},
"categoryOrder": 0,
"translationAllowed": false,
"createdAt": "2024-07-26T13:24:47.183Z",
"updatedAt": "2024-07-26T13:25:07.855Z",
"__v": 0
}
}
Modified at 2024-07-30 05:25:46