API Endpoints
Statuses
Edit status

Base URL

PUT
https://v1.empr.cloud/api/v1/folders/{folderId}/statuses/{statusId}

Request

Request headers

Headers
Название
Тип / Значение
Описание
X-Token
String
Auth token
Content-Type
application/json

URL Parameters

Path parameters
Название
Тип / Значение
Описание
folderId
UUID
ID of the folder
statusId
UUID
ID of the status to be edited

Request body

Request body
Название
Тип / Значение
Описание
name
String
Name of the status
color
String
HEX color of the status

Request examples

1const url =
2  "https://v1.empr.cloud/api/v1/folders/{folderId}/statuses/{statusId}"; 
3
4const body = {
5  "name": "New Status",
6  "color": "#000000"
7}
8
9const options = {
10  method: "PUT",
11  headers: {
12    "X-Token": "Your Token", 
13    "Content-Type": "application/json"
14  }, 
15  body: JSON.stringify(body)
16};
17
18fetch(url, options)
19  .then((response) => {
20    response.json().then((data) => {
21      console.log(data);
22    });
23  })
24  .catch((error) => {
25    console.error(error);
26  });

Response

Response data

Response
Название
Тип / Значение
Описание
data
Status
Updated status

Response example

1{
2    "data": {
3        "user_id": "***privacy***",
4        "id": "***privacy***",
5        "folder_id": "***privacy***",
6        "status": "New Status",
7        "status_color": "#000000",
8        "created_at": "2023-06-22T17:36:12.605923Z",
9        "updated_at": "2023-06-22T17:36:12.605923Z"
10    }
11}

Types

Status
Название
Тип / Значение
Описание
id
String
ID
user_id
String
Owner ID
status
String
Status
status_color
String
Hexadecimal string representing the status color
created_at
String
Creation date
updated_at
String
Last update date