Update a task
curl --request PATCH \
--url https://n-api.leadstaker.com/v1/tasks/{id} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"title": "<string>",
"dueAt": "2023-11-07T05:31:56Z",
"responsibleId": "<string>"
}
'import requests
url = "https://n-api.leadstaker.com/v1/tasks/{id}"
payload = {
"title": "<string>",
"dueAt": "2023-11-07T05:31:56Z",
"responsibleId": "<string>"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({title: '<string>', dueAt: '2023-11-07T05:31:56Z', responsibleId: '<string>'})
};
fetch('https://n-api.leadstaker.com/v1/tasks/{id}', 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://n-api.leadstaker.com/v1/tasks/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'title' => '<string>',
'dueAt' => '2023-11-07T05:31:56Z',
'responsibleId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <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://n-api.leadstaker.com/v1/tasks/{id}"
payload := strings.NewReader("{\n \"title\": \"<string>\",\n \"dueAt\": \"2023-11-07T05:31:56Z\",\n \"responsibleId\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-api-key", "<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.patch("https://n-api.leadstaker.com/v1/tasks/{id}")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"<string>\",\n \"dueAt\": \"2023-11-07T05:31:56Z\",\n \"responsibleId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://n-api.leadstaker.com/v1/tasks/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"title\": \"<string>\",\n \"dueAt\": \"2023-11-07T05:31:56Z\",\n \"responsibleId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"errorCode": "<string>",
"message": "<string>",
"status": 123,
"errors": [
{
"field": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}{
"errorCode": "<string>",
"message": "<string>",
"status": 123,
"errors": [
{
"field": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}{
"errorCode": "<string>",
"message": "<string>",
"status": 123,
"errors": [
{
"field": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}Tasks
Update a task
Partial update: only the keys present in the body change. Answers 204 with no body. The result is set on completion, so result is ignored here. dueAt can be changed, in the same ISO 8601 instant format as the creation, by the current responsible or a project owner or admin: any other user answers 403 UNAUTHORIZED_ACCESS, while the stored instant sent again is not a change. A completed task cannot be changed: answers 422 TASK_COMPLETED. Handing the task to another user (a responsibleId different from the stored one) needs a project owner or admin: any other user answers 403 UNAUTHORIZED_ACCESS, while the current value sent again is not a change. An API key is not restricted.
PATCH
/
v1
/
tasks
/
{id}
Update a task
curl --request PATCH \
--url https://n-api.leadstaker.com/v1/tasks/{id} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"title": "<string>",
"dueAt": "2023-11-07T05:31:56Z",
"responsibleId": "<string>"
}
'import requests
url = "https://n-api.leadstaker.com/v1/tasks/{id}"
payload = {
"title": "<string>",
"dueAt": "2023-11-07T05:31:56Z",
"responsibleId": "<string>"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({title: '<string>', dueAt: '2023-11-07T05:31:56Z', responsibleId: '<string>'})
};
fetch('https://n-api.leadstaker.com/v1/tasks/{id}', 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://n-api.leadstaker.com/v1/tasks/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'title' => '<string>',
'dueAt' => '2023-11-07T05:31:56Z',
'responsibleId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <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://n-api.leadstaker.com/v1/tasks/{id}"
payload := strings.NewReader("{\n \"title\": \"<string>\",\n \"dueAt\": \"2023-11-07T05:31:56Z\",\n \"responsibleId\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-api-key", "<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.patch("https://n-api.leadstaker.com/v1/tasks/{id}")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"<string>\",\n \"dueAt\": \"2023-11-07T05:31:56Z\",\n \"responsibleId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://n-api.leadstaker.com/v1/tasks/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"title\": \"<string>\",\n \"dueAt\": \"2023-11-07T05:31:56Z\",\n \"responsibleId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"errorCode": "<string>",
"message": "<string>",
"status": 123,
"errors": [
{
"field": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}{
"errorCode": "<string>",
"message": "<string>",
"status": 123,
"errors": [
{
"field": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}{
"errorCode": "<string>",
"message": "<string>",
"status": 123,
"errors": [
{
"field": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}Authorizations
Path Parameters
Minimum string length:
1Body
application/json
Response
No content