Edit a task
curl --request POST \
--url https://api.xenia.team/api/v1/task/editTask \
--header 'Content-Type: application/json' \
--header 'x-client-key: <api-key>' \
--header 'x-client-secret: <api-key>' \
--data '
{
"id": "45b6ccf5-2d69-4981-9826-d9b7389d041e",
"title": "room inspection - edit",
"description": "test description edit",
"priority": "Medium",
"taskStatus": "Open",
"startDate": "2025-06-23T19:00:00.000Z",
"dueDate": "2025-06-25T18:30:00.000Z",
"startTime": "2025-06-24T08:00:00-11:00",
"dueTime": "2025-06-26T07:30:00-11:00",
"isTimeBound": true,
"isChecklistRequired": false,
"timezone": "Asia/Karachi",
"AssetId": "640c4797-7141-4419-b14f-d632ed5aabfd",
"LocationId": "62c70dc8-f8ce-4dfe-a798-844197610e11",
"ServiceId": "50d9f381-eba0-41b0-b26b-70a47a854252",
"CompletedBy": "dfea8b8a-5b22-4668-b68d-dc641eb3a101",
"assignees": [
"b465548d-69fc-42e3-b406-6af3b9d2f62a",
"dfea8b8a-5b22-4668-b68d-dc641eb3a101"
],
"locationIds": [
"b9164b03-60c2-4500-89a4-f490e38c9872"
],
"attachment": [
"https://cdn.xenia.team/.../screenshot1.png",
"https://cdn.xenia.team/.../screenshot2.png"
],
"notification": {
"overdue": {
"recipients": [
"e25dd448-7ae7-4588-8767-7e1a316547e5"
]
},
"statusChange": {
"recipients": []
}
}
}
'import requests
url = "https://api.xenia.team/api/v1/task/editTask"
payload = {
"id": "45b6ccf5-2d69-4981-9826-d9b7389d041e",
"title": "room inspection - edit",
"description": "test description edit",
"priority": "Medium",
"taskStatus": "Open",
"startDate": "2025-06-23T19:00:00.000Z",
"dueDate": "2025-06-25T18:30:00.000Z",
"startTime": "2025-06-24T08:00:00-11:00",
"dueTime": "2025-06-26T07:30:00-11:00",
"isTimeBound": True,
"isChecklistRequired": False,
"timezone": "Asia/Karachi",
"AssetId": "640c4797-7141-4419-b14f-d632ed5aabfd",
"LocationId": "62c70dc8-f8ce-4dfe-a798-844197610e11",
"ServiceId": "50d9f381-eba0-41b0-b26b-70a47a854252",
"CompletedBy": "dfea8b8a-5b22-4668-b68d-dc641eb3a101",
"assignees": ["b465548d-69fc-42e3-b406-6af3b9d2f62a", "dfea8b8a-5b22-4668-b68d-dc641eb3a101"],
"locationIds": ["b9164b03-60c2-4500-89a4-f490e38c9872"],
"attachment": ["https://cdn.xenia.team/.../screenshot1.png", "https://cdn.xenia.team/.../screenshot2.png"],
"notification": {
"overdue": { "recipients": ["e25dd448-7ae7-4588-8767-7e1a316547e5"] },
"statusChange": { "recipients": [] }
}
}
headers = {
"x-client-key": "<api-key>",
"x-client-secret": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-client-key': '<api-key>',
'x-client-secret': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
id: '45b6ccf5-2d69-4981-9826-d9b7389d041e',
title: 'room inspection - edit',
description: 'test description edit',
priority: 'Medium',
taskStatus: 'Open',
startDate: '2025-06-23T19:00:00.000Z',
dueDate: '2025-06-25T18:30:00.000Z',
startTime: '2025-06-24T08:00:00-11:00',
dueTime: '2025-06-26T07:30:00-11:00',
isTimeBound: true,
isChecklistRequired: false,
timezone: 'Asia/Karachi',
AssetId: '640c4797-7141-4419-b14f-d632ed5aabfd',
LocationId: '62c70dc8-f8ce-4dfe-a798-844197610e11',
ServiceId: '50d9f381-eba0-41b0-b26b-70a47a854252',
CompletedBy: 'dfea8b8a-5b22-4668-b68d-dc641eb3a101',
assignees: ['b465548d-69fc-42e3-b406-6af3b9d2f62a', 'dfea8b8a-5b22-4668-b68d-dc641eb3a101'],
locationIds: ['b9164b03-60c2-4500-89a4-f490e38c9872'],
attachment: [
'https://cdn.xenia.team/.../screenshot1.png',
'https://cdn.xenia.team/.../screenshot2.png'
],
notification: {
overdue: {recipients: ['e25dd448-7ae7-4588-8767-7e1a316547e5']},
statusChange: {recipients: []}
}
})
};
fetch('https://api.xenia.team/api/v1/task/editTask', 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.xenia.team/api/v1/task/editTask",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'id' => '45b6ccf5-2d69-4981-9826-d9b7389d041e',
'title' => 'room inspection - edit',
'description' => 'test description edit',
'priority' => 'Medium',
'taskStatus' => 'Open',
'startDate' => '2025-06-23T19:00:00.000Z',
'dueDate' => '2025-06-25T18:30:00.000Z',
'startTime' => '2025-06-24T08:00:00-11:00',
'dueTime' => '2025-06-26T07:30:00-11:00',
'isTimeBound' => true,
'isChecklistRequired' => false,
'timezone' => 'Asia/Karachi',
'AssetId' => '640c4797-7141-4419-b14f-d632ed5aabfd',
'LocationId' => '62c70dc8-f8ce-4dfe-a798-844197610e11',
'ServiceId' => '50d9f381-eba0-41b0-b26b-70a47a854252',
'CompletedBy' => 'dfea8b8a-5b22-4668-b68d-dc641eb3a101',
'assignees' => [
'b465548d-69fc-42e3-b406-6af3b9d2f62a',
'dfea8b8a-5b22-4668-b68d-dc641eb3a101'
],
'locationIds' => [
'b9164b03-60c2-4500-89a4-f490e38c9872'
],
'attachment' => [
'https://cdn.xenia.team/.../screenshot1.png',
'https://cdn.xenia.team/.../screenshot2.png'
],
'notification' => [
'overdue' => [
'recipients' => [
'e25dd448-7ae7-4588-8767-7e1a316547e5'
]
],
'statusChange' => [
'recipients' => [
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-client-key: <api-key>",
"x-client-secret: <api-key>"
],
]);
$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.xenia.team/api/v1/task/editTask"
payload := strings.NewReader("{\n \"id\": \"45b6ccf5-2d69-4981-9826-d9b7389d041e\",\n \"title\": \"room inspection - edit\",\n \"description\": \"test description edit\",\n \"priority\": \"Medium\",\n \"taskStatus\": \"Open\",\n \"startDate\": \"2025-06-23T19:00:00.000Z\",\n \"dueDate\": \"2025-06-25T18:30:00.000Z\",\n \"startTime\": \"2025-06-24T08:00:00-11:00\",\n \"dueTime\": \"2025-06-26T07:30:00-11:00\",\n \"isTimeBound\": true,\n \"isChecklistRequired\": false,\n \"timezone\": \"Asia/Karachi\",\n \"AssetId\": \"640c4797-7141-4419-b14f-d632ed5aabfd\",\n \"LocationId\": \"62c70dc8-f8ce-4dfe-a798-844197610e11\",\n \"ServiceId\": \"50d9f381-eba0-41b0-b26b-70a47a854252\",\n \"CompletedBy\": \"dfea8b8a-5b22-4668-b68d-dc641eb3a101\",\n \"assignees\": [\n \"b465548d-69fc-42e3-b406-6af3b9d2f62a\",\n \"dfea8b8a-5b22-4668-b68d-dc641eb3a101\"\n ],\n \"locationIds\": [\n \"b9164b03-60c2-4500-89a4-f490e38c9872\"\n ],\n \"attachment\": [\n \"https://cdn.xenia.team/.../screenshot1.png\",\n \"https://cdn.xenia.team/.../screenshot2.png\"\n ],\n \"notification\": {\n \"overdue\": {\n \"recipients\": [\n \"e25dd448-7ae7-4588-8767-7e1a316547e5\"\n ]\n },\n \"statusChange\": {\n \"recipients\": []\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-client-key", "<api-key>")
req.Header.Add("x-client-secret", "<api-key>")
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.post("https://api.xenia.team/api/v1/task/editTask")
.header("x-client-key", "<api-key>")
.header("x-client-secret", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"45b6ccf5-2d69-4981-9826-d9b7389d041e\",\n \"title\": \"room inspection - edit\",\n \"description\": \"test description edit\",\n \"priority\": \"Medium\",\n \"taskStatus\": \"Open\",\n \"startDate\": \"2025-06-23T19:00:00.000Z\",\n \"dueDate\": \"2025-06-25T18:30:00.000Z\",\n \"startTime\": \"2025-06-24T08:00:00-11:00\",\n \"dueTime\": \"2025-06-26T07:30:00-11:00\",\n \"isTimeBound\": true,\n \"isChecklistRequired\": false,\n \"timezone\": \"Asia/Karachi\",\n \"AssetId\": \"640c4797-7141-4419-b14f-d632ed5aabfd\",\n \"LocationId\": \"62c70dc8-f8ce-4dfe-a798-844197610e11\",\n \"ServiceId\": \"50d9f381-eba0-41b0-b26b-70a47a854252\",\n \"CompletedBy\": \"dfea8b8a-5b22-4668-b68d-dc641eb3a101\",\n \"assignees\": [\n \"b465548d-69fc-42e3-b406-6af3b9d2f62a\",\n \"dfea8b8a-5b22-4668-b68d-dc641eb3a101\"\n ],\n \"locationIds\": [\n \"b9164b03-60c2-4500-89a4-f490e38c9872\"\n ],\n \"attachment\": [\n \"https://cdn.xenia.team/.../screenshot1.png\",\n \"https://cdn.xenia.team/.../screenshot2.png\"\n ],\n \"notification\": {\n \"overdue\": {\n \"recipients\": [\n \"e25dd448-7ae7-4588-8767-7e1a316547e5\"\n ]\n },\n \"statusChange\": {\n \"recipients\": []\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.xenia.team/api/v1/task/editTask")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-client-key"] = '<api-key>'
request["x-client-secret"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": \"45b6ccf5-2d69-4981-9826-d9b7389d041e\",\n \"title\": \"room inspection - edit\",\n \"description\": \"test description edit\",\n \"priority\": \"Medium\",\n \"taskStatus\": \"Open\",\n \"startDate\": \"2025-06-23T19:00:00.000Z\",\n \"dueDate\": \"2025-06-25T18:30:00.000Z\",\n \"startTime\": \"2025-06-24T08:00:00-11:00\",\n \"dueTime\": \"2025-06-26T07:30:00-11:00\",\n \"isTimeBound\": true,\n \"isChecklistRequired\": false,\n \"timezone\": \"Asia/Karachi\",\n \"AssetId\": \"640c4797-7141-4419-b14f-d632ed5aabfd\",\n \"LocationId\": \"62c70dc8-f8ce-4dfe-a798-844197610e11\",\n \"ServiceId\": \"50d9f381-eba0-41b0-b26b-70a47a854252\",\n \"CompletedBy\": \"dfea8b8a-5b22-4668-b68d-dc641eb3a101\",\n \"assignees\": [\n \"b465548d-69fc-42e3-b406-6af3b9d2f62a\",\n \"dfea8b8a-5b22-4668-b68d-dc641eb3a101\"\n ],\n \"locationIds\": [\n \"b9164b03-60c2-4500-89a4-f490e38c9872\"\n ],\n \"attachment\": [\n \"https://cdn.xenia.team/.../screenshot1.png\",\n \"https://cdn.xenia.team/.../screenshot2.png\"\n ],\n \"notification\": {\n \"overdue\": {\n \"recipients\": [\n \"e25dd448-7ae7-4588-8767-7e1a316547e5\"\n ]\n },\n \"statusChange\": {\n \"recipients\": []\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"description": "<string>",
"priority": "<string>",
"taskStatus": "<string>",
"startDate": "2023-11-07T05:31:56Z",
"dueDate": "2023-11-07T05:31:56Z",
"startTime": "2023-11-07T05:31:56Z",
"dueTime": "2023-11-07T05:31:56Z",
"timezone": "<string>",
"isTimeBound": true,
"isChecklistRequired": true,
"assignees": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"AssetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"LocationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ServiceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"CompletedBy": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"attachment": [
"<string>"
],
"notification": {
"overdue": {
"recipients": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
},
"statusChange": {
"recipients": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
}
}
],
"extra_meta": {
"message": "Task updated successfully"
}
}Tasks
Update Task
POST
/
api
/
v1
/
task
/
editTask
Edit a task
curl --request POST \
--url https://api.xenia.team/api/v1/task/editTask \
--header 'Content-Type: application/json' \
--header 'x-client-key: <api-key>' \
--header 'x-client-secret: <api-key>' \
--data '
{
"id": "45b6ccf5-2d69-4981-9826-d9b7389d041e",
"title": "room inspection - edit",
"description": "test description edit",
"priority": "Medium",
"taskStatus": "Open",
"startDate": "2025-06-23T19:00:00.000Z",
"dueDate": "2025-06-25T18:30:00.000Z",
"startTime": "2025-06-24T08:00:00-11:00",
"dueTime": "2025-06-26T07:30:00-11:00",
"isTimeBound": true,
"isChecklistRequired": false,
"timezone": "Asia/Karachi",
"AssetId": "640c4797-7141-4419-b14f-d632ed5aabfd",
"LocationId": "62c70dc8-f8ce-4dfe-a798-844197610e11",
"ServiceId": "50d9f381-eba0-41b0-b26b-70a47a854252",
"CompletedBy": "dfea8b8a-5b22-4668-b68d-dc641eb3a101",
"assignees": [
"b465548d-69fc-42e3-b406-6af3b9d2f62a",
"dfea8b8a-5b22-4668-b68d-dc641eb3a101"
],
"locationIds": [
"b9164b03-60c2-4500-89a4-f490e38c9872"
],
"attachment": [
"https://cdn.xenia.team/.../screenshot1.png",
"https://cdn.xenia.team/.../screenshot2.png"
],
"notification": {
"overdue": {
"recipients": [
"e25dd448-7ae7-4588-8767-7e1a316547e5"
]
},
"statusChange": {
"recipients": []
}
}
}
'import requests
url = "https://api.xenia.team/api/v1/task/editTask"
payload = {
"id": "45b6ccf5-2d69-4981-9826-d9b7389d041e",
"title": "room inspection - edit",
"description": "test description edit",
"priority": "Medium",
"taskStatus": "Open",
"startDate": "2025-06-23T19:00:00.000Z",
"dueDate": "2025-06-25T18:30:00.000Z",
"startTime": "2025-06-24T08:00:00-11:00",
"dueTime": "2025-06-26T07:30:00-11:00",
"isTimeBound": True,
"isChecklistRequired": False,
"timezone": "Asia/Karachi",
"AssetId": "640c4797-7141-4419-b14f-d632ed5aabfd",
"LocationId": "62c70dc8-f8ce-4dfe-a798-844197610e11",
"ServiceId": "50d9f381-eba0-41b0-b26b-70a47a854252",
"CompletedBy": "dfea8b8a-5b22-4668-b68d-dc641eb3a101",
"assignees": ["b465548d-69fc-42e3-b406-6af3b9d2f62a", "dfea8b8a-5b22-4668-b68d-dc641eb3a101"],
"locationIds": ["b9164b03-60c2-4500-89a4-f490e38c9872"],
"attachment": ["https://cdn.xenia.team/.../screenshot1.png", "https://cdn.xenia.team/.../screenshot2.png"],
"notification": {
"overdue": { "recipients": ["e25dd448-7ae7-4588-8767-7e1a316547e5"] },
"statusChange": { "recipients": [] }
}
}
headers = {
"x-client-key": "<api-key>",
"x-client-secret": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-client-key': '<api-key>',
'x-client-secret': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
id: '45b6ccf5-2d69-4981-9826-d9b7389d041e',
title: 'room inspection - edit',
description: 'test description edit',
priority: 'Medium',
taskStatus: 'Open',
startDate: '2025-06-23T19:00:00.000Z',
dueDate: '2025-06-25T18:30:00.000Z',
startTime: '2025-06-24T08:00:00-11:00',
dueTime: '2025-06-26T07:30:00-11:00',
isTimeBound: true,
isChecklistRequired: false,
timezone: 'Asia/Karachi',
AssetId: '640c4797-7141-4419-b14f-d632ed5aabfd',
LocationId: '62c70dc8-f8ce-4dfe-a798-844197610e11',
ServiceId: '50d9f381-eba0-41b0-b26b-70a47a854252',
CompletedBy: 'dfea8b8a-5b22-4668-b68d-dc641eb3a101',
assignees: ['b465548d-69fc-42e3-b406-6af3b9d2f62a', 'dfea8b8a-5b22-4668-b68d-dc641eb3a101'],
locationIds: ['b9164b03-60c2-4500-89a4-f490e38c9872'],
attachment: [
'https://cdn.xenia.team/.../screenshot1.png',
'https://cdn.xenia.team/.../screenshot2.png'
],
notification: {
overdue: {recipients: ['e25dd448-7ae7-4588-8767-7e1a316547e5']},
statusChange: {recipients: []}
}
})
};
fetch('https://api.xenia.team/api/v1/task/editTask', 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.xenia.team/api/v1/task/editTask",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'id' => '45b6ccf5-2d69-4981-9826-d9b7389d041e',
'title' => 'room inspection - edit',
'description' => 'test description edit',
'priority' => 'Medium',
'taskStatus' => 'Open',
'startDate' => '2025-06-23T19:00:00.000Z',
'dueDate' => '2025-06-25T18:30:00.000Z',
'startTime' => '2025-06-24T08:00:00-11:00',
'dueTime' => '2025-06-26T07:30:00-11:00',
'isTimeBound' => true,
'isChecklistRequired' => false,
'timezone' => 'Asia/Karachi',
'AssetId' => '640c4797-7141-4419-b14f-d632ed5aabfd',
'LocationId' => '62c70dc8-f8ce-4dfe-a798-844197610e11',
'ServiceId' => '50d9f381-eba0-41b0-b26b-70a47a854252',
'CompletedBy' => 'dfea8b8a-5b22-4668-b68d-dc641eb3a101',
'assignees' => [
'b465548d-69fc-42e3-b406-6af3b9d2f62a',
'dfea8b8a-5b22-4668-b68d-dc641eb3a101'
],
'locationIds' => [
'b9164b03-60c2-4500-89a4-f490e38c9872'
],
'attachment' => [
'https://cdn.xenia.team/.../screenshot1.png',
'https://cdn.xenia.team/.../screenshot2.png'
],
'notification' => [
'overdue' => [
'recipients' => [
'e25dd448-7ae7-4588-8767-7e1a316547e5'
]
],
'statusChange' => [
'recipients' => [
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-client-key: <api-key>",
"x-client-secret: <api-key>"
],
]);
$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.xenia.team/api/v1/task/editTask"
payload := strings.NewReader("{\n \"id\": \"45b6ccf5-2d69-4981-9826-d9b7389d041e\",\n \"title\": \"room inspection - edit\",\n \"description\": \"test description edit\",\n \"priority\": \"Medium\",\n \"taskStatus\": \"Open\",\n \"startDate\": \"2025-06-23T19:00:00.000Z\",\n \"dueDate\": \"2025-06-25T18:30:00.000Z\",\n \"startTime\": \"2025-06-24T08:00:00-11:00\",\n \"dueTime\": \"2025-06-26T07:30:00-11:00\",\n \"isTimeBound\": true,\n \"isChecklistRequired\": false,\n \"timezone\": \"Asia/Karachi\",\n \"AssetId\": \"640c4797-7141-4419-b14f-d632ed5aabfd\",\n \"LocationId\": \"62c70dc8-f8ce-4dfe-a798-844197610e11\",\n \"ServiceId\": \"50d9f381-eba0-41b0-b26b-70a47a854252\",\n \"CompletedBy\": \"dfea8b8a-5b22-4668-b68d-dc641eb3a101\",\n \"assignees\": [\n \"b465548d-69fc-42e3-b406-6af3b9d2f62a\",\n \"dfea8b8a-5b22-4668-b68d-dc641eb3a101\"\n ],\n \"locationIds\": [\n \"b9164b03-60c2-4500-89a4-f490e38c9872\"\n ],\n \"attachment\": [\n \"https://cdn.xenia.team/.../screenshot1.png\",\n \"https://cdn.xenia.team/.../screenshot2.png\"\n ],\n \"notification\": {\n \"overdue\": {\n \"recipients\": [\n \"e25dd448-7ae7-4588-8767-7e1a316547e5\"\n ]\n },\n \"statusChange\": {\n \"recipients\": []\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-client-key", "<api-key>")
req.Header.Add("x-client-secret", "<api-key>")
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.post("https://api.xenia.team/api/v1/task/editTask")
.header("x-client-key", "<api-key>")
.header("x-client-secret", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"45b6ccf5-2d69-4981-9826-d9b7389d041e\",\n \"title\": \"room inspection - edit\",\n \"description\": \"test description edit\",\n \"priority\": \"Medium\",\n \"taskStatus\": \"Open\",\n \"startDate\": \"2025-06-23T19:00:00.000Z\",\n \"dueDate\": \"2025-06-25T18:30:00.000Z\",\n \"startTime\": \"2025-06-24T08:00:00-11:00\",\n \"dueTime\": \"2025-06-26T07:30:00-11:00\",\n \"isTimeBound\": true,\n \"isChecklistRequired\": false,\n \"timezone\": \"Asia/Karachi\",\n \"AssetId\": \"640c4797-7141-4419-b14f-d632ed5aabfd\",\n \"LocationId\": \"62c70dc8-f8ce-4dfe-a798-844197610e11\",\n \"ServiceId\": \"50d9f381-eba0-41b0-b26b-70a47a854252\",\n \"CompletedBy\": \"dfea8b8a-5b22-4668-b68d-dc641eb3a101\",\n \"assignees\": [\n \"b465548d-69fc-42e3-b406-6af3b9d2f62a\",\n \"dfea8b8a-5b22-4668-b68d-dc641eb3a101\"\n ],\n \"locationIds\": [\n \"b9164b03-60c2-4500-89a4-f490e38c9872\"\n ],\n \"attachment\": [\n \"https://cdn.xenia.team/.../screenshot1.png\",\n \"https://cdn.xenia.team/.../screenshot2.png\"\n ],\n \"notification\": {\n \"overdue\": {\n \"recipients\": [\n \"e25dd448-7ae7-4588-8767-7e1a316547e5\"\n ]\n },\n \"statusChange\": {\n \"recipients\": []\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.xenia.team/api/v1/task/editTask")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-client-key"] = '<api-key>'
request["x-client-secret"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": \"45b6ccf5-2d69-4981-9826-d9b7389d041e\",\n \"title\": \"room inspection - edit\",\n \"description\": \"test description edit\",\n \"priority\": \"Medium\",\n \"taskStatus\": \"Open\",\n \"startDate\": \"2025-06-23T19:00:00.000Z\",\n \"dueDate\": \"2025-06-25T18:30:00.000Z\",\n \"startTime\": \"2025-06-24T08:00:00-11:00\",\n \"dueTime\": \"2025-06-26T07:30:00-11:00\",\n \"isTimeBound\": true,\n \"isChecklistRequired\": false,\n \"timezone\": \"Asia/Karachi\",\n \"AssetId\": \"640c4797-7141-4419-b14f-d632ed5aabfd\",\n \"LocationId\": \"62c70dc8-f8ce-4dfe-a798-844197610e11\",\n \"ServiceId\": \"50d9f381-eba0-41b0-b26b-70a47a854252\",\n \"CompletedBy\": \"dfea8b8a-5b22-4668-b68d-dc641eb3a101\",\n \"assignees\": [\n \"b465548d-69fc-42e3-b406-6af3b9d2f62a\",\n \"dfea8b8a-5b22-4668-b68d-dc641eb3a101\"\n ],\n \"locationIds\": [\n \"b9164b03-60c2-4500-89a4-f490e38c9872\"\n ],\n \"attachment\": [\n \"https://cdn.xenia.team/.../screenshot1.png\",\n \"https://cdn.xenia.team/.../screenshot2.png\"\n ],\n \"notification\": {\n \"overdue\": {\n \"recipients\": [\n \"e25dd448-7ae7-4588-8767-7e1a316547e5\"\n ]\n },\n \"statusChange\": {\n \"recipients\": []\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"description": "<string>",
"priority": "<string>",
"taskStatus": "<string>",
"startDate": "2023-11-07T05:31:56Z",
"dueDate": "2023-11-07T05:31:56Z",
"startTime": "2023-11-07T05:31:56Z",
"dueTime": "2023-11-07T05:31:56Z",
"timezone": "<string>",
"isTimeBound": true,
"isChecklistRequired": true,
"assignees": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"AssetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"LocationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ServiceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"CompletedBy": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"attachment": [
"<string>"
],
"notification": {
"overdue": {
"recipients": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
},
"statusChange": {
"recipients": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
}
}
],
"extra_meta": {
"message": "Task updated successfully"
}
}Body
application/json
Available options:
Open, In Progress, On Hold, Closed, Cancelled Available options:
Low, Medium, High, Critical Show child attributes
Show child attributes
⌘I