Fuselage
Update custom user status type
Updates a custom user status
URL
Requires Auth
HTTP Method
api/v1/custom-user-status.update
YES
POST

Headers

Argument
Example
Required
Description
X-User-Id
myuser-name
Required
Your username hash (returned after you log in through the API)
X-Auth-Token
myauth-token
Required
Your token (returned after you log in through the API)

Example Call

1
curl --location --request POST 'http://localhost:3000/api/v1/custom-user-status.update\
2
--header 'X-Auth-Token: myauth-token' \
3
--header 'X-User-Id: myuser-name'
4
-d "_id=SeZHHb77QXWRbnDhn&name=Férias&statusType=busy"
Copied!

Result

Success

1
{
2
"customUserStatus": {
3
"_id": "SeZHHb77QXWRbnDhn",
4
"name": "Férias",
5
"statusType": "busy",
6
"_updatedAt": "2021-09-26T15:23:46.325Z"
7
},
8
"success": true
9
}
Copied!

Errors

Any of the following errors can occur upon the endpoint.
  • Authorization: Requires an authentication token for the request to be made.
  • No custom user status id: Requires a valid custom user status _id
Authorization
No custom user stauts id found
1
{
2
"success": false,
3
"error": "unauthorized"
4
}
Copied!
1
{
2
"success": false,
3
"error": "No custom user status found with the id of \"SeZHHb77QXWRbnDh\"."
4
}
Copied!
Export as PDF
Copy link
Edit on GitHub