Confirm or reject a pending AI action
import requests
url = "https://platform.ankra.app/api/v1/chat/actions/confirm"
payload = {
"action_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"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({action_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a', 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 '
{
"action_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"confirmed": true
}
'{
"detail": "Cluster not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Chat
Confirm or reject a pending AI action
Approves (confirmed: true) or rejects a write the AI proposed in chat, identified by action_id. Requires ai.execute. Answers 404 when the action 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.
POST
/
api
/
v1
/
chat
/
actions
/
confirm
Confirm or reject a pending AI action
import requests
url = "https://platform.ankra.app/api/v1/chat/actions/confirm"
payload = {
"action_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"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({action_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a', 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 '
{
"action_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"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
application/json
Response
Successful Response