Respond to ask
curl --request POST \
--url http://127.0.0.1:8765/v1/workspaces/{workspace_id}/asks/{ask_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"answer": "allow",
"scope": "once"
}
'import requests
url = "http://127.0.0.1:8765/v1/workspaces/{workspace_id}/asks/{ask_id}"
payload = {
"answer": "allow",
"scope": "once"
}
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({answer: 'allow', scope: 'once'})
};
fetch('http://127.0.0.1:8765/v1/workspaces/{workspace_id}/asks/{ask_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "791070cdf81c",
"session_id": "agent",
"command": "rm",
"argv": [
"/notes.txt"
],
"cwd": "/",
"paths": [
"/notes.txt"
],
"reason": "Deletes need sign-off",
"outcome": "allow",
"scope": "once",
"note": ""
}Approval Requests
Respond to ask
POST
/
v1
/
workspaces
/
{workspace_id}
/
asks
/
{ask_id}
Respond to ask
curl --request POST \
--url http://127.0.0.1:8765/v1/workspaces/{workspace_id}/asks/{ask_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"answer": "allow",
"scope": "once"
}
'import requests
url = "http://127.0.0.1:8765/v1/workspaces/{workspace_id}/asks/{ask_id}"
payload = {
"answer": "allow",
"scope": "once"
}
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({answer: 'allow', scope: 'once'})
};
fetch('http://127.0.0.1:8765/v1/workspaces/{workspace_id}/asks/{ask_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "791070cdf81c",
"session_id": "agent",
"command": "rm",
"argv": [
"/notes.txt"
],
"cwd": "/",
"paths": [
"/notes.txt"
],
"reason": "Deletes need sign-off",
"outcome": "allow",
"scope": "once",
"note": ""
}Approve or deny a pending request and return the recorded decision. Returns
See error examples and recovery steps. The complete OpenAPI contract includes every response schema.
409 if the request has already been answered.
Errors
Errors
| Status | Meaning |
|---|---|
400 | The request is malformed: the body is not JSON (invalid_json) or not a JSON object, a field is missing (missing_field), unknown (unknown_field) or has a wrong value (invalid_value), or the request is otherwise invalid (invalid_request). param names the field at fault. |
401 | The token is missing or wrong (unauthorized). |
404 | The workspace, session, job, file or route does not exist, or the caller may not see it (not_found). |
429 | Past a rate limit (rate_limited), or a new session past max_sessions (session_limit). |
Authorizations
Path Parameters
Body
application/json