Transition agent approval status
Transition approval status: draft → pending_approval → approved → deprecated.
curl -X PATCH "https://api.autopil.ai/v1/agents/example_string/status" \
-H "Content-Type: application/json" \
-H "X-API-Key: YOUR_API_KEY" \
-d '{
"status": "approved"
}'
import requests
import json
url = "https://api.autopil.ai/v1/agents/example_string/status"
headers = {
"Content-Type": "application/json",
"X-API-Key": "YOUR_API_KEY"
}
data = {
"status": "approved"
}
response = requests.patch(url, headers=headers, json=data)
print(response.json())
const response = await fetch("https://api.autopil.ai/v1/agents/example_string/status", {
method: "PATCH",
headers: {
"Content-Type": "application/json",
"X-API-Key": "YOUR_API_KEY"
},
body: JSON.stringify({
"status": "approved"
})
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
"bytes"
"encoding/json"
)
func main() {
data := []byte(`{
"status": "approved"
}`)
req, err := http.NewRequest("PATCH", "https://api.autopil.ai/v1/agents/example_string/status", bytes.NewBuffer(data))
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("X-API-Key", "YOUR_API_KEY")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
require 'net/http'
require 'json'
uri = URI('https://api.autopil.ai/v1/agents/example_string/status')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(uri)
request['Content-Type'] = 'application/json'
request['X-API-Key'] = 'YOUR_API_KEY'
request.body = '{
"status": "approved"
}'
response = http.request(request)
puts response.body
{
"agent_id": "example_string",
"agent_role": "example_string",
"display_name": "John Doe",
"description": "example_string",
"owner": "example_string",
"framework": "example_string",
"permitted_roles": [
"example_string"
],
"credential_type": "api_key",
"bound_key_id": "example_string",
"status": "draft"
}
/v1/agents/{agent_id}/statusTarget server for requests. Edit to use your own host.
API key with admin, read, or evaluate scope. Missing key → 401; invalid or revoked key → 403.
admin, read, or evaluate scope. Missing key → 401; invalid or revoked key → 403.
The media type of the request body
Request Preview
Response
Response will appear here after sending the request
Authentication
API Key for authentication. API key with admin, read, or evaluate scope. Missing key → 401; invalid or revoked key → 403.
Path Parameters
Body
draftpending_approvalapproveddeprecatedResponses
The role this agent will claim in evaluate calls. Must match a policy.
Human-readable name shown in the dashboard.
Purpose and data access rationale. Used during approval review.
Team or individual responsible for this agent.
Runtime framework: langgraph, openai_agents, bedrock, etc.
Roles this agent is allowed to claim. Defaults to [agent_role].
Authentication method. Defaults to api_key.
api_keyjwt_oidcmtlsconjurIf set, only the key with this ID may present this agent's identity.
draftpending_approvalapproveddeprecated