curl --request POST \
--url https://api.sidenet.ai/v1/approval-requests/{ref}/decide \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"decision": "approved",
"note": "Fine, the twin is free those nights."
}
'import requests
url = "https://api.sidenet.ai/v1/approval-requests/{ref}/decide"
payload = {
"decision": "approved",
"note": "Fine, the twin is free those nights."
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({decision: 'approved', note: 'Fine, the twin is free those nights.'})
};
fetch('https://api.sidenet.ai/v1/approval-requests/{ref}/decide', 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.sidenet.ai/v1/approval-requests/{ref}/decide",
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([
'decision' => 'approved',
'note' => 'Fine, the twin is free those nights.'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.sidenet.ai/v1/approval-requests/{ref}/decide"
payload := strings.NewReader("{\n \"decision\": \"approved\",\n \"note\": \"Fine, the twin is free those nights.\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.sidenet.ai/v1/approval-requests/{ref}/decide")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"decision\": \"approved\",\n \"note\": \"Fine, the twin is free those nights.\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sidenet.ai/v1/approval-requests/{ref}/decide")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"decision\": \"approved\",\n \"note\": \"Fine, the twin is free those nights.\"\n}"
response = http.request(request)
puts response.read_body{
"request": {
"approval_ref": "7d2e1c54-9a0b-4f3e-8c21-5b6d7e8f9a01",
"id": "7d2e1c54-9a0b-4f3e-8c21-5b6d7e8f9a01",
"org_id": "c0a8012e-5f3b-4d1a-9e2f-7b6c5d4e3f21",
"agent_id": "6f1c0f4e-2b7a-4a51-9a2f-0c9d1b3e5a10",
"agent_version_id": "a7c3e1d5-6b48-4f92-8a03-e5c9b2d417f6",
"workflow_id": "4c2f9e18-7a63-4d05-b1e8-93a7c0f2d641",
"workflow_version_id": "0e1f2a3b-4c5d-4e6f-8a9b-0c1d2e3f4a5b",
"workflow_run_id": "9b8a7c6d-5e4f-4a3b-9c2d-1e0f9a8b7c6d",
"tool_id": "33befea7-0d3e-4b1a-8f9c-2a1b3c4d5e6f",
"tool_name": "pms_modify_reservation",
"args": {
"reservation_id": "ABC123",
"arrival": "2026-11-12",
"departure": "2026-11-14"
},
"summary": "Move reservation ABC123 to 12–14 November as the guest asked.",
"metadata": {
"approval_reason": "Move reservation ABC123 to 12–14 November as the guest asked.",
"progress_message": "Moving the reservation"
},
"requester_user_id": "guest-liaison",
"requester_run_id": "trace_01",
"requester_thread_id": "wa:prop-1:guest:+4917000000",
"eligible_user_ids": [
"marta",
"jonas"
],
"ttl_minutes": 240,
"expires_at": "2026-10-25T18:00:00Z",
"status": "executed",
"decided_by_user_id": "marta",
"decided_at": "2026-10-25T14:20:00Z",
"decision_note": null,
"decision_channel": null,
"execution_run_id": null,
"execution_result": {
"ok": true
},
"execution_error": null,
"created_at": "2026-10-25T14:00:00Z",
"updated_at": "2026-10-25T14:00:00Z"
},
"resumed": "success"
}{
"error": "<string>",
"details": "<string>",
"request": {
"approval_ref": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"org_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agent_id": "<string>",
"agent_version_id": "<string>",
"workflow_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"workflow_version_id": "<string>",
"workflow_run_id": "<string>",
"tool_id": "<string>",
"tool_name": "<string>",
"args": {},
"summary": "<string>",
"metadata": {},
"requester_user_id": "<string>",
"requester_run_id": "<string>",
"requester_thread_id": "<string>",
"eligible_user_ids": [
"<string>"
],
"ttl_minutes": 123,
"expires_at": "2023-11-07T05:31:56Z",
"status": "pending",
"decided_by_user_id": "<string>",
"decided_at": "2023-11-07T05:31:56Z",
"decision_note": "<string>",
"decision_channel": "<string>",
"execution_run_id": "<string>",
"execution_result": "<unknown>",
"execution_error": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}Decide approval
Decides a pending delegated approval request, exactly once. approved resumes the approval workflow, whose step executes the captured call AS THE DECIDER with that user’s own credentials and reports the result back to the requester’s conversation; declined resumes it with the refusal. A session decides as its user; an organization key names the decider with decided_by — or sends decision: "stale" with no user when the application knows the call is no longer valid (the approver’s buttons are then withdrawn by the application). The requester can never decide; when the workflow named eligible users, only they can. A second decision answers 409 with the first outcome.
curl --request POST \
--url https://api.sidenet.ai/v1/approval-requests/{ref}/decide \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"decision": "approved",
"note": "Fine, the twin is free those nights."
}
'import requests
url = "https://api.sidenet.ai/v1/approval-requests/{ref}/decide"
payload = {
"decision": "approved",
"note": "Fine, the twin is free those nights."
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({decision: 'approved', note: 'Fine, the twin is free those nights.'})
};
fetch('https://api.sidenet.ai/v1/approval-requests/{ref}/decide', 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.sidenet.ai/v1/approval-requests/{ref}/decide",
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([
'decision' => 'approved',
'note' => 'Fine, the twin is free those nights.'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.sidenet.ai/v1/approval-requests/{ref}/decide"
payload := strings.NewReader("{\n \"decision\": \"approved\",\n \"note\": \"Fine, the twin is free those nights.\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.sidenet.ai/v1/approval-requests/{ref}/decide")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"decision\": \"approved\",\n \"note\": \"Fine, the twin is free those nights.\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sidenet.ai/v1/approval-requests/{ref}/decide")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"decision\": \"approved\",\n \"note\": \"Fine, the twin is free those nights.\"\n}"
response = http.request(request)
puts response.read_body{
"request": {
"approval_ref": "7d2e1c54-9a0b-4f3e-8c21-5b6d7e8f9a01",
"id": "7d2e1c54-9a0b-4f3e-8c21-5b6d7e8f9a01",
"org_id": "c0a8012e-5f3b-4d1a-9e2f-7b6c5d4e3f21",
"agent_id": "6f1c0f4e-2b7a-4a51-9a2f-0c9d1b3e5a10",
"agent_version_id": "a7c3e1d5-6b48-4f92-8a03-e5c9b2d417f6",
"workflow_id": "4c2f9e18-7a63-4d05-b1e8-93a7c0f2d641",
"workflow_version_id": "0e1f2a3b-4c5d-4e6f-8a9b-0c1d2e3f4a5b",
"workflow_run_id": "9b8a7c6d-5e4f-4a3b-9c2d-1e0f9a8b7c6d",
"tool_id": "33befea7-0d3e-4b1a-8f9c-2a1b3c4d5e6f",
"tool_name": "pms_modify_reservation",
"args": {
"reservation_id": "ABC123",
"arrival": "2026-11-12",
"departure": "2026-11-14"
},
"summary": "Move reservation ABC123 to 12–14 November as the guest asked.",
"metadata": {
"approval_reason": "Move reservation ABC123 to 12–14 November as the guest asked.",
"progress_message": "Moving the reservation"
},
"requester_user_id": "guest-liaison",
"requester_run_id": "trace_01",
"requester_thread_id": "wa:prop-1:guest:+4917000000",
"eligible_user_ids": [
"marta",
"jonas"
],
"ttl_minutes": 240,
"expires_at": "2026-10-25T18:00:00Z",
"status": "executed",
"decided_by_user_id": "marta",
"decided_at": "2026-10-25T14:20:00Z",
"decision_note": null,
"decision_channel": null,
"execution_run_id": null,
"execution_result": {
"ok": true
},
"execution_error": null,
"created_at": "2026-10-25T14:00:00Z",
"updated_at": "2026-10-25T14:00:00Z"
},
"resumed": "success"
}{
"error": "<string>",
"details": "<string>",
"request": {
"approval_ref": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"org_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agent_id": "<string>",
"agent_version_id": "<string>",
"workflow_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"workflow_version_id": "<string>",
"workflow_run_id": "<string>",
"tool_id": "<string>",
"tool_name": "<string>",
"args": {},
"summary": "<string>",
"metadata": {},
"requester_user_id": "<string>",
"requester_run_id": "<string>",
"requester_thread_id": "<string>",
"eligible_user_ids": [
"<string>"
],
"ttl_minutes": 123,
"expires_at": "2023-11-07T05:31:56Z",
"status": "pending",
"decided_by_user_id": "<string>",
"decided_at": "2023-11-07T05:31:56Z",
"decision_note": "<string>",
"decision_channel": "<string>",
"execution_run_id": "<string>",
"execution_result": "<unknown>",
"execution_error": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}Authorizations
Organization API key, generated in studio.sidenet.ai. Backend only — never in a browser.