import requests
url = "https://platform.ankra.app/api/v1/chat/actions/confirm"
payload = { "confirmed": True }
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({confirmed: true})
};
fetch('https://platform.ankra.app/api/v1/chat/actions/confirm', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://platform.ankra.app/api/v1/chat/actions/confirm \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"confirmed": true
}
'{
"detail": "Cluster not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Confirm or reject a pending AI action
Approves (confirmed: true) or rejects a write the AI proposed in chat, identified by action_id, or every write of one proposal batch identified by batch_id (with action_ids to approve some and reject the rest). Requires ai.execute. For one action, answers 404 when it is unknown or expired, 409 when the cluster state drifted since the proposal or the action was superseded, and 410 when its approval window has passed. For a batch, answers 404 when no action carries it and otherwise 200 with one result per action in proposal order (a decided action’s result is the single decision’s response; drifted, agent_timeout, expired, superseded and skipped name the actions it could not decide) and a summary of executed, failed, rejected, open, skipped and deciding counts. A batch that takes longer than about 90 seconds answers then: the actions not yet decided read deciding, are still decided in order afterwards, and report their outcomes as action_decided events on the conversation. An action_decided event for an action whose execution failed carries its error when the decision knew it.
import requests
url = "https://platform.ankra.app/api/v1/chat/actions/confirm"
payload = { "confirmed": True }
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({confirmed: true})
};
fetch('https://platform.ankra.app/api/v1/chat/actions/confirm', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://platform.ankra.app/api/v1/chat/actions/confirm \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"confirmed": true
}
'{
"detail": "Cluster not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
The one action to decide. Name this or batch_id, not both.
With batch_id and confirmed true: the actions of the batch to approve; its other open actions are rejected. Omit to approve every action. Not allowed with confirmed false, which rejects the whole batch.
The proposal batch to decide: every action one turn proposed together carries it (the batch_id of its action_proposal event). Each action is decided as a single decision would decide it, in proposal order; the response lists one result per action and a summary.
280Response
Successful Response