> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.athenaintel.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.athenaintel.com/_mcp/server.

# Overwrite AOP configuration

PUT https://api.athenaintel.com/api/v0/aop/{asset_id}/config
Content-Type: application/json

Overwrite the configuration of an existing AOP asset. Replaces the entire AOP configuration (prompt, agent config, structured output, etc.) with the provided values. Fields not included in the request body will be reset to their defaults, except user_notification_configs, which is preserved from the existing configuration when omitted; send an explicit null to clear it. The update is rejected with 400 when the configuration would enable more tools at run time than the per-run limit, counting every tool of each toolkit @mentioned in the prompt; the detail names toolkits to remove and the existing configuration is left untouched. The update publishes at once, so an update that would give runs tools the published version does not (resolved as runs resolve them, the assigned agent's tools included) is rejected with 409 and nothing is changed unless confirm_sensitive is true; the detail names the added tools.

Reference: https://docs.athenaintel.com/api-reference/aop/update-config

## Authentication

- `X-API-KEY` header (required) — API Key authentication via header

## Request

### Path parameters

- `asset_id` (string, required) — Unique identifier of the AOP asset to update

### Body (application/json)

This endpoint expects an AOPConfigUpdateRequestIn.

- `agentId` (string, optional, nullable) — ID of the agent to use for execution
- `agent_config` (map from string to any, optional, nullable) — Full agent configuration override for this AOP
- `confirm_sensitive` (boolean, optional, default: false) — Confirms that the new configuration may give runs tools the published version does not (as runs resolve them, the assigned agent's tools included). Without it, such an update is refused with 409 and nothing is changed; the response names the added tools
- `description` (string, optional, nullable) — Human-readable description of what the AOP does
- `icon` (string, optional, nullable) — Icon identifier for UI display
- `prompt` (string, optional, nullable) — The main prompt/instructions for the AOP
- `section` (string, optional, nullable) — Section/category for organization
- `structured_output` (map from string to any, optional, nullable) — JSON schema for structured output
- `user_notification_configs` (map from string to map from string to any, optional, nullable) — Per-user notification preferences. Map of user_id -> notification config controlling who receives AOP result notifications. When omitted, the AOP's existing notification configs are preserved; send an explicit null to clear them

## Response

### 200

AOP configuration updated successfully

- `asset_id` (string, required) — ID of the AOP asset that was updated
- `message` (string, optional, default: AOP configuration updated successfully) — Human-readable status message
- `status` (string, optional, default: updated) — Status of the operation

## Errors

### 400 Bad Request Error

Invalid AOP configuration, including a configuration whose expanded tool count would exceed the per-run tool limit

- `any`

### 401 Unauthorized Error

Unauthorized - invalid or missing authentication

- `any`

### 403 Forbidden Error

Forbidden - user does not have edit permission

- `message` (string, required)

### 404 Not Found Error

AOP asset not found

- `message` (string, required)

### 409 Conflict Error

The update would give runs tools the published version does not and confirm_sensitive was not set; nothing was changed

- `any`

### 422 Unprocessable Entity Error

Validation Error

- `detail` (list of ValidationError, optional)

## Types

### ValidationError

- `loc` (list of ValidationErrorLocItems, required)
- `msg` (string, required)
- `type` (string, required)
- `ctx` (ValidationErrorCtx, optional)
- `input` (any, optional)

### ValidationErrorLocItems

- string
- integer

### ValidationErrorCtx

## Examples

**Request**

```json
{
  "agentId": "research_agent",
  "description": "Generates market research reports",
  "icon": "ListTodo",
  "prompt": "Generate a comprehensive market research report for [[ company ]]",
  "section": "Research"
}
```

**Response**

```json
{
  "asset_id": "string",
  "message": "AOP configuration updated successfully",
  "status": "updated"
}
```

**SDK Code**

```python
import requests

url = "https://api.athenaintel.com/api/v0/aop/asset_id/config"

payload = {
    "agentId": "research_agent",
    "description": "Generates market research reports",
    "icon": "ListTodo",
    "prompt": "Generate a comprehensive market research report for [[ company ]]",
    "section": "Research"
}
headers = {
    "X-API-KEY": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.put(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.athenaintel.com/api/v0/aop/asset_id/config';
const options = {
  method: 'PUT',
  headers: {'X-API-KEY': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"agentId":"research_agent","description":"Generates market research reports","icon":"ListTodo","prompt":"Generate a comprehensive market research report for [[ company ]]","section":"Research"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.athenaintel.com/api/v0/aop/asset_id/config"

	payload := strings.NewReader("{\n  \"agentId\": \"research_agent\",\n  \"description\": \"Generates market research reports\",\n  \"icon\": \"ListTodo\",\n  \"prompt\": \"Generate a comprehensive market research report for [[ company ]]\",\n  \"section\": \"Research\"\n}")

	req, _ := http.NewRequest("PUT", url, payload)

	req.Header.Add("X-API-KEY", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.athenaintel.com/api/v0/aop/asset_id/config")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)
request["X-API-KEY"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"agentId\": \"research_agent\",\n  \"description\": \"Generates market research reports\",\n  \"icon\": \"ListTodo\",\n  \"prompt\": \"Generate a comprehensive market research report for [[ company ]]\",\n  \"section\": \"Research\"\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.put("https://api.athenaintel.com/api/v0/aop/asset_id/config")
  .header("X-API-KEY", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"agentId\": \"research_agent\",\n  \"description\": \"Generates market research reports\",\n  \"icon\": \"ListTodo\",\n  \"prompt\": \"Generate a comprehensive market research report for [[ company ]]\",\n  \"section\": \"Research\"\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PUT', 'https://api.athenaintel.com/api/v0/aop/asset_id/config', [
  'body' => '{
  "agentId": "research_agent",
  "description": "Generates market research reports",
  "icon": "ListTodo",
  "prompt": "Generate a comprehensive market research report for [[ company ]]",
  "section": "Research"
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'X-API-KEY' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.athenaintel.com/api/v0/aop/asset_id/config");
var request = new RestRequest(Method.PUT);
request.AddHeader("X-API-KEY", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"agentId\": \"research_agent\",\n  \"description\": \"Generates market research reports\",\n  \"icon\": \"ListTodo\",\n  \"prompt\": \"Generate a comprehensive market research report for [[ company ]]\",\n  \"section\": \"Research\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "X-API-KEY": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "agentId": "research_agent",
  "description": "Generates market research reports",
  "icon": "ListTodo",
  "prompt": "Generate a comprehensive market research report for [[ company ]]",
  "section": "Research"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.athenaintel.com/api/v0/aop/asset_id/config")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```