Update a task
curl --request PUT \
--url https://core-api.getaptly.com/api/tasks/{taskId} \
--header 'Content-Type: application/json' \
--header 'x-token: <api-key>' \
--data '
{
"title": "Renamed task",
"checked": true,
"status": "completed",
"priority": "high"
}
'import requests
url = "https://core-api.getaptly.com/api/tasks/{taskId}"
payload = {
"title": "Renamed task",
"checked": True,
"status": "completed",
"priority": "high"
}
headers = {
"x-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'x-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({title: 'Renamed task', checked: true, status: 'completed', priority: 'high'})
};
fetch('https://core-api.getaptly.com/api/tasks/{taskId}', 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://core-api.getaptly.com/api/tasks/{taskId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'title' => 'Renamed task',
'checked' => true,
'status' => 'completed',
'priority' => 'high'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-token: <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://core-api.getaptly.com/api/tasks/{taskId}"
payload := strings.NewReader("{\n \"title\": \"Renamed task\",\n \"checked\": true,\n \"status\": \"completed\",\n \"priority\": \"high\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("x-token", "<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.put("https://core-api.getaptly.com/api/tasks/{taskId}")
.header("x-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"Renamed task\",\n \"checked\": true,\n \"status\": \"completed\",\n \"priority\": \"high\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://core-api.getaptly.com/api/tasks/{taskId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["x-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"title\": \"Renamed task\",\n \"checked\": true,\n \"status\": \"completed\",\n \"priority\": \"high\"\n}"
response = http.request(request)
puts response.read_body{
"ok": true
}{
"error": "<string>",
"message": "<string>"
}Tasks
Update a task
Updates a task and keeps its card-checklist mirror entry in sync.
The update is attributed to a user who must belong to the company. With a
delegate token the user is taken from the token. With an API key (no
associated user), supply userId in the body — it must belong to the
company or the request is rejected.
PUT
/
api
/
tasks
/
{taskId}
Update a task
curl --request PUT \
--url https://core-api.getaptly.com/api/tasks/{taskId} \
--header 'Content-Type: application/json' \
--header 'x-token: <api-key>' \
--data '
{
"title": "Renamed task",
"checked": true,
"status": "completed",
"priority": "high"
}
'import requests
url = "https://core-api.getaptly.com/api/tasks/{taskId}"
payload = {
"title": "Renamed task",
"checked": True,
"status": "completed",
"priority": "high"
}
headers = {
"x-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'x-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({title: 'Renamed task', checked: true, status: 'completed', priority: 'high'})
};
fetch('https://core-api.getaptly.com/api/tasks/{taskId}', 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://core-api.getaptly.com/api/tasks/{taskId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'title' => 'Renamed task',
'checked' => true,
'status' => 'completed',
'priority' => 'high'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-token: <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://core-api.getaptly.com/api/tasks/{taskId}"
payload := strings.NewReader("{\n \"title\": \"Renamed task\",\n \"checked\": true,\n \"status\": \"completed\",\n \"priority\": \"high\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("x-token", "<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.put("https://core-api.getaptly.com/api/tasks/{taskId}")
.header("x-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"Renamed task\",\n \"checked\": true,\n \"status\": \"completed\",\n \"priority\": \"high\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://core-api.getaptly.com/api/tasks/{taskId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["x-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"title\": \"Renamed task\",\n \"checked\": true,\n \"status\": \"completed\",\n \"priority\": \"high\"\n}"
response = http.request(request)
puts response.read_body{
"ok": true
}{
"error": "<string>",
"message": "<string>"
}Authorizations
ApiKeyHeaderDelegateToken
Path Parameters
Body
application/json
Acting user the update is attributed to. Required with API-key auth (must belong to the company); ignored with a delegate token, which supplies the user itself.
One of backlog|notStarted|inProgress|onHold|completed.
One of asap|high|medium|low.
Response
Task updated.