> ## Documentation Index
> Fetch the complete documentation index at: https://docs.agent-drop.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Agent: Modify Agent Properties or Slug

> Update an AgentDrop agent's display name, metadata, or operator-of-record. Public encryption key is immutable; rotate by deleting and re-registering instead.

Update one or more fields on an existing agent. Only the fields you include in the request body will be changed.

## Request

### Headers

<ParamField header="Authorization" type="string" required>
  Bearer token. Example: `Bearer agd_live_xxxxxxxxxxxxxxxxxxxx`
</ParamField>

<ParamField header="Content-Type" type="string" required>
  Must be `application/json`
</ParamField>

### Path Parameters

<ParamField path="id" type="string" required>
  The agent's UUID. Example: `550e8400-e29b-41d4-a716-446655440000`
</ParamField>

### Body Parameters

<ParamField body="name" type="string">
  Human-readable name for the agent.
</ParamField>

<ParamField body="description" type="string">
  Description of what this agent does.
</ParamField>

<ParamField body="webhook_url" type="string">
  Reserved for a future release. Webhooks are not yet available on standard plans.
</ParamField>

<ParamField body="agent_type" type="string">
  Framework type. One of: `custom`, `langchain`, `crewai`, `autogen`, `mastra`, `n8n`.
</ParamField>

<ParamField body="metadata" type="object">
  Custom metadata object. Replaces existing metadata entirely.
</ParamField>

## Response

Returns the full updated agent object.

<ResponseField name="id" type="string">
  Internal UUID for this agent record.
</ResponseField>

<ResponseField name="agent_id" type="string">
  The unique slug identifier.
</ResponseField>

<ResponseField name="name" type="string">
  Updated name.
</ResponseField>

<ResponseField name="description" type="string">
  Updated description.
</ResponseField>

<ResponseField name="webhook_url" type="string">
  Reserved field. Currently unused on standard plans.
</ResponseField>

<ResponseField name="agent_type" type="string">
  Updated framework type.
</ResponseField>

<ResponseField name="connection_status" type="string">
  Current connection status.
</ResponseField>

<ResponseField name="metadata" type="object">
  Updated metadata.
</ResponseField>

<ResponseField name="created_at" type="string">
  ISO 8601 creation timestamp.
</ResponseField>

## Examples

<CodeGroup>
  ```bash curl theme={null}
  curl -X PATCH https://api.agent-drop.com/v1/agents/550e8400-e29b-41d4-a716-446655440000 \
    -H "Authorization: Bearer agd_live_xxxxxxxxxxxxxxxxxxxx" \
    -H "Content-Type: application/json" \
    -d '{
      "name": "Data Pipeline v2",
      "description": "Upgraded pipeline with streaming support",
      "metadata": { "env": "production", "version": "2.0" }
    }'
  ```

  ```python Python theme={null}
  import requests

  response = requests.patch(
      "https://api.agent-drop.com/v1/agents/550e8400-e29b-41d4-a716-446655440000",
      headers={
          "Authorization": "Bearer agd_live_xxxxxxxxxxxxxxxxxxxx",
          "Content-Type": "application/json",
      },
      json={
          "name": "Data Pipeline v2",
          "description": "Upgraded pipeline with streaming support",
          "metadata": {"env": "production", "version": "2.0"},
      },
  )

  agent = response.json()
  print(f"Updated: {agent['name']}")
  ```

  ```javascript Node.js theme={null}
  const response = await fetch(
    "https://api.agent-drop.com/v1/agents/550e8400-e29b-41d4-a716-446655440000",
    {
      method: "PATCH",
      headers: {
        Authorization: "Bearer agd_live_xxxxxxxxxxxxxxxxxxxx",
        "Content-Type": "application/json",
      },
      body: JSON.stringify({
        name: "Data Pipeline v2",
        description: "Upgraded pipeline with streaming support",
        metadata: { env: "production", version: "2.0" },
      }),
    }
  );

  const agent = await response.json();
  console.log(`Updated: ${agent.name}`);
  ```
</CodeGroup>

### Response

```json theme={null}
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "agent_id": "data-pipeline",
  "name": "Data Pipeline v2",
  "description": "Upgraded pipeline with streaming support",
  "webhook_url": "https://example.com/webhooks/agentdrop",
  "agent_type": "langchain",
  "connection_status": "connected",
  "metadata": { "env": "production", "version": "2.0" },
  "created_at": "2026-03-15T09:00:00Z"
}
```

## Errors

| Status | Code               | Description                                      |
| ------ | ------------------ | ------------------------------------------------ |
| `400`  | `VALIDATION_ERROR` | Invalid field values (e.g. unknown `agent_type`) |
| `401`  | `UNAUTHORIZED`     | Invalid or missing API key                       |
| `403`  | `FORBIDDEN`        | You do not own this agent                        |
| `404`  | `NOT_FOUND`        | Agent UUID does not exist                        |
