curl --request POST \
--url https://api.getoneprofile.ai/assistant/actions/approve-batch/ \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"proposal_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"scope": "once"
}
'import requests
url = "https://api.getoneprofile.ai/assistant/actions/approve-batch/"
payload = {
"proposal_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"scope": "once"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({proposal_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'], scope: 'once'})
};
fetch('https://api.getoneprofile.ai/assistant/actions/approve-batch/', 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.getoneprofile.ai/assistant/actions/approve-batch/",
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([
'proposal_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'scope' => 'once'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$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.getoneprofile.ai/assistant/actions/approve-batch/"
payload := strings.NewReader("{\n \"proposal_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"scope\": \"once\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
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.getoneprofile.ai/assistant/actions/approve-batch/")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"proposal_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"scope\": \"once\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getoneprofile.ai/assistant/actions/approve-batch/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"proposal_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"scope\": \"once\"\n}"
response = http.request(request)
puts response.read_body{
"actions": [
{
"applied_result": {},
"batch_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"can_undo": true,
"conversation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"decided_at": "2023-11-07T05:31:56Z",
"decided_by_display_name": "<string>",
"error": "<string>",
"grantable": true,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kind": "verb",
"message_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"origin": "chat",
"price_credits": 123,
"price_label": "<string>",
"proposed_at": "2023-11-07T05:31:56Z",
"source_column_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source_record_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "proposed",
"summary": "<string>",
"undoable": true,
"undone_at": "2023-11-07T05:31:56Z",
"undone_by_display_name": "<string>",
"verb": "<string>",
"verb_label": "<string>"
}
]
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>",
"issues": [
{
"input": "<string>",
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}Approve every action one reply proposed
Apply several proposals at once: the cards one AI Assistant reply raised, decided together. Each is applied on its own, so one that cannot run comes back failed with its reason while the rest still apply, and a card already decided comes back unchanged rather than as an error.
scope means the same thing it does on a single approval and is applied to every card named.
curl --request POST \
--url https://api.getoneprofile.ai/assistant/actions/approve-batch/ \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"proposal_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"scope": "once"
}
'import requests
url = "https://api.getoneprofile.ai/assistant/actions/approve-batch/"
payload = {
"proposal_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"scope": "once"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({proposal_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'], scope: 'once'})
};
fetch('https://api.getoneprofile.ai/assistant/actions/approve-batch/', 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.getoneprofile.ai/assistant/actions/approve-batch/",
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([
'proposal_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'scope' => 'once'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$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.getoneprofile.ai/assistant/actions/approve-batch/"
payload := strings.NewReader("{\n \"proposal_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"scope\": \"once\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
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.getoneprofile.ai/assistant/actions/approve-batch/")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"proposal_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"scope\": \"once\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getoneprofile.ai/assistant/actions/approve-batch/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"proposal_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"scope\": \"once\"\n}"
response = http.request(request)
puts response.read_body{
"actions": [
{
"applied_result": {},
"batch_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"can_undo": true,
"conversation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"decided_at": "2023-11-07T05:31:56Z",
"decided_by_display_name": "<string>",
"error": "<string>",
"grantable": true,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kind": "verb",
"message_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"origin": "chat",
"price_credits": 123,
"price_label": "<string>",
"proposed_at": "2023-11-07T05:31:56Z",
"source_column_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source_record_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "proposed",
"summary": "<string>",
"undoable": true,
"undone_at": "2023-11-07T05:31:56Z",
"undone_by_display_name": "<string>",
"verb": "<string>",
"verb_label": "<string>"
}
]
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>",
"issues": [
{
"input": "<string>",
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}Authorizations
Body
Approve every card one reply raised, with one answer about next time.
The cards to approve, normally every card in one reply's batch. Each is applied on its own: one that fails does not stop the rest.
1 - 50 elementsHow far the approval reaches, applied to every card in the list.
once, thread, project_me, project_all Response
Successful Response
What became of each card in one Approve all.
Every card named, in the order asked for, as it stands now: applied, or failed with the reason on the card. A card that had already been decided comes back unchanged.
Show child attributes
Show child attributes
Was this page helpful?