Delete delegation role
curl --request DELETE \
--url https://staging.api.us.aptlydone.com/decision/v1/delegations/{delegationId}/roles/{roleId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://staging.api.us.aptlydone.com/decision/v1/delegations/{delegationId}/roles/{roleId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://staging.api.us.aptlydone.com/decision/v1/delegations/{delegationId}/roles/{roleId}', 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://staging.api.us.aptlydone.com/decision/v1/delegations/{delegationId}/roles/{roleId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://staging.api.us.aptlydone.com/decision/v1/delegations/{delegationId}/roles/{roleId}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://staging.api.us.aptlydone.com/decision/v1/delegations/{delegationId}/roles/{roleId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging.api.us.aptlydone.com/decision/v1/delegations/{delegationId}/roles/{roleId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"statusCode": 200,
"timestamp": "2026-01-08T06:33:50.384Z",
"message": "Success",
"data": {
"id": "14f5a115-52d0-4466-baff-740447a60774",
"delegationId": "2sf90da4-0634-40b9-abf5-6e97a222rds8",
"delegationRoleId": "7sf90da4-0634-40b9-abf5-6e97a222ttt8",
"designeeRecipientType": "PERSONNEL_IN_POSITION",
"isAutoIssue": false,
"updatedAt": "2025-03-05T11:49:50.577Z",
"createdAt": "2025-03-05T11:49:50.577Z",
"roleDesignees": [],
"roleDetails": {
"id": "a97bbbc4-1415-4131-81fb-761fd111f370",
"roleId": "10df93d6-4e88-40f9-b46a-1676017451ba",
"roleName": "Informed",
"roleStatus": "ASSIGNED",
"roleRequirement": "Lorem ipsum is a dummy requirement",
"isCascade": false,
"isDeleted": false,
"createdAt": "2025-03-19T14:45:37.301Z",
"updatedAt": "2025-03-19T14:45:37.301Z"
}
}
}Delegations
Delete delegation role
DELETE
/
v1
/
delegations
/
{delegationId}
/
roles
/
{roleId}
Delete delegation role
curl --request DELETE \
--url https://staging.api.us.aptlydone.com/decision/v1/delegations/{delegationId}/roles/{roleId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://staging.api.us.aptlydone.com/decision/v1/delegations/{delegationId}/roles/{roleId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://staging.api.us.aptlydone.com/decision/v1/delegations/{delegationId}/roles/{roleId}', 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://staging.api.us.aptlydone.com/decision/v1/delegations/{delegationId}/roles/{roleId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://staging.api.us.aptlydone.com/decision/v1/delegations/{delegationId}/roles/{roleId}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://staging.api.us.aptlydone.com/decision/v1/delegations/{delegationId}/roles/{roleId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging.api.us.aptlydone.com/decision/v1/delegations/{delegationId}/roles/{roleId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"statusCode": 200,
"timestamp": "2026-01-08T06:33:50.384Z",
"message": "Success",
"data": {
"id": "14f5a115-52d0-4466-baff-740447a60774",
"delegationId": "2sf90da4-0634-40b9-abf5-6e97a222rds8",
"delegationRoleId": "7sf90da4-0634-40b9-abf5-6e97a222ttt8",
"designeeRecipientType": "PERSONNEL_IN_POSITION",
"isAutoIssue": false,
"updatedAt": "2025-03-05T11:49:50.577Z",
"createdAt": "2025-03-05T11:49:50.577Z",
"roleDesignees": [],
"roleDetails": {
"id": "a97bbbc4-1415-4131-81fb-761fd111f370",
"roleId": "10df93d6-4e88-40f9-b46a-1676017451ba",
"roleName": "Informed",
"roleStatus": "ASSIGNED",
"roleRequirement": "Lorem ipsum is a dummy requirement",
"isCascade": false,
"isDeleted": false,
"createdAt": "2025-03-19T14:45:37.301Z",
"updatedAt": "2025-03-19T14:45:37.301Z"
}
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Response
200 - application/json
Role delegation deleted successfully
Was this page helpful?
āI