JavaScript
import Cerca from '@cerca-dev/sdk';
const client = new Cerca({
apiKey: process.env['CERCA_API_KEY'], // This is the default and can be omitted
});
const response = await client.approvalGrants.deleteForThread(
'agent_abc123',
'thread_abc123',
'grant_abc123',
);
console.log(response.ok);import os
from cerca import Cerca
client = Cerca(
api_key=os.environ.get("CERCA_API_KEY"), # This is the default and can be omitted
)
response = client.approval_grants.delete_for_thread(
agent_id="agent_abc123",
thread_id="thread_abc123",
grant_id="grant_abc123",
)
print(response.ok)package main
import (
"context"
"fmt"
"github.com/matrices/cerca-go"
"github.com/matrices/cerca-go/option"
)
func main() {
client := cercago.NewClient(
option.WithAPIKey("My API Key"),
)
response, err := client.ApprovalGrants.DeleteForThread(
context.TODO(),
"agent_abc123",
"thread_abc123",
"grant_abc123",
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.Ok)
}require "cerca"
cerca = Cerca::Client.new(api_key: "My API Key")
response = cerca.approval_grants.delete_for_thread("agent_abc123", "thread_abc123", "grant_abc123")
puts(response)cerca approval-grants delete-for-thread \
--api-key 'My API Key' \
--agent-id agent_abc123 \
--thread-id thread_abc123 \
--grant-id grant_abc123curl --request DELETE \
--url https://api.cerca.dev/agents/{agentId}/threads/{threadId}/approval-grants/{grantId} \
--header 'Authorization: Bearer <token>'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.cerca.dev/agents/{agentId}/threads/{threadId}/approval-grants/{grantId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.delete("https://api.cerca.dev/agents/{agentId}/threads/{threadId}/approval-grants/{grantId}")
.header("Authorization", "Bearer <token>")
.asString();{
"ok": true
}{
"error": "<string>",
"code": "MONTHLY_TOKEN_BUDGET_EXCEEDED"
}{
"error": "<string>",
"code": "MONTHLY_TOKEN_BUDGET_EXCEEDED"
}{
"error": "<string>",
"code": "MONTHLY_TOKEN_BUDGET_EXCEEDED"
}{
"error": "<string>",
"code": "MONTHLY_TOKEN_BUDGET_EXCEEDED"
}{
"error": "<string>",
"code": "MONTHLY_TOKEN_BUDGET_EXCEEDED"
}{
"error": "<string>",
"code": "MONTHLY_TOKEN_BUDGET_EXCEEDED"
}{
"error": "<string>",
"code": "MONTHLY_TOKEN_BUDGET_EXCEEDED"
}{
"error": "<string>",
"code": "MONTHLY_TOKEN_BUDGET_EXCEEDED"
}Approvals
Delete approval grant
DELETE
/
agents
/
{agentId}
/
threads
/
{threadId}
/
approval-grants
/
{grantId}
JavaScript
import Cerca from '@cerca-dev/sdk';
const client = new Cerca({
apiKey: process.env['CERCA_API_KEY'], // This is the default and can be omitted
});
const response = await client.approvalGrants.deleteForThread(
'agent_abc123',
'thread_abc123',
'grant_abc123',
);
console.log(response.ok);import os
from cerca import Cerca
client = Cerca(
api_key=os.environ.get("CERCA_API_KEY"), # This is the default and can be omitted
)
response = client.approval_grants.delete_for_thread(
agent_id="agent_abc123",
thread_id="thread_abc123",
grant_id="grant_abc123",
)
print(response.ok)package main
import (
"context"
"fmt"
"github.com/matrices/cerca-go"
"github.com/matrices/cerca-go/option"
)
func main() {
client := cercago.NewClient(
option.WithAPIKey("My API Key"),
)
response, err := client.ApprovalGrants.DeleteForThread(
context.TODO(),
"agent_abc123",
"thread_abc123",
"grant_abc123",
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.Ok)
}require "cerca"
cerca = Cerca::Client.new(api_key: "My API Key")
response = cerca.approval_grants.delete_for_thread("agent_abc123", "thread_abc123", "grant_abc123")
puts(response)cerca approval-grants delete-for-thread \
--api-key 'My API Key' \
--agent-id agent_abc123 \
--thread-id thread_abc123 \
--grant-id grant_abc123curl --request DELETE \
--url https://api.cerca.dev/agents/{agentId}/threads/{threadId}/approval-grants/{grantId} \
--header 'Authorization: Bearer <token>'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.cerca.dev/agents/{agentId}/threads/{threadId}/approval-grants/{grantId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.delete("https://api.cerca.dev/agents/{agentId}/threads/{threadId}/approval-grants/{grantId}")
.header("Authorization", "Bearer <token>")
.asString();{
"ok": true
}{
"error": "<string>",
"code": "MONTHLY_TOKEN_BUDGET_EXCEEDED"
}{
"error": "<string>",
"code": "MONTHLY_TOKEN_BUDGET_EXCEEDED"
}{
"error": "<string>",
"code": "MONTHLY_TOKEN_BUDGET_EXCEEDED"
}{
"error": "<string>",
"code": "MONTHLY_TOKEN_BUDGET_EXCEEDED"
}{
"error": "<string>",
"code": "MONTHLY_TOKEN_BUDGET_EXCEEDED"
}{
"error": "<string>",
"code": "MONTHLY_TOKEN_BUDGET_EXCEEDED"
}{
"error": "<string>",
"code": "MONTHLY_TOKEN_BUDGET_EXCEEDED"
}{
"error": "<string>",
"code": "MONTHLY_TOKEN_BUDGET_EXCEEDED"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Minimum string length:
1Example:
"agent_abc123"
Minimum string length:
1Example:
"thread_abc123"
Minimum string length:
1Example:
"grant_abc123"
Response
Thread approval grant deleted.
Available options:
true ⌘I