---
docId: doc_e14d638d24be4bce94db4cd9b9bdbb12
title: Update an agent
description: Changes an agent's name, photo, status or owners. It applies immediately and doesn't create a version.
api:
  group: agentes
  auth: bearer
  operations:
    - operationId: updateIdentity
      method: PATCH
      path: '/v1/agents/{agentId}'
      postmanName: Change name, photo, status or owners
---

<script>
  import { Ways } from '$lib/components';
</script>

# Update an agent

Change an agent’s name, photo, status or owners. Send at least one of those fields; changes apply immediately, without creating a version or publishing.

To change its instructions or other [configuration](/api-reference/agents/configuration) settings, use the draft.

## Example

<Ways tabs="api,sdk">
<Ways.Way name="api">

```bash
curl -X PATCH https://api.platic.ai/v1/agents/$AGENT_ID \
  -H "Authorization: Bearer $PLATIC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "status": "inactive" }'
```

</Ways.Way>
<Ways.Way name="sdk">

```ts
await platic.agents.update("agent_123", { status: "inactive" });
```

</Ways.Way>
</Ways>

## Path parameters

| Parameter | Type | Description | Required |
|-----------|------|-------------|----------|
| `agentId` | string | Agent id | ✓ |

## Request body

Omitted fields keep their current value.

| Field | Type | Description | Required |
|-------|------|-------------|----------|
| `name` | string | Agent name, 1 to 100 characters | - |
| `imageUrl` | string | URL or path of the agent's photo, up to 2048 characters | - |
| `status` | string | `active` or `inactive` | - |
| `owners` | array of strings | Emails of workspace members. Replaces the whole list; `[]` leaves the agent with no owners | - |

```json
{
  "name": "Acme Sales",
  "status": "inactive",
  "owners": ["ana@acme.com", "luis@acme.com"]
}
```

## Response

The updated agent, with the fields from [Get an agent](/api-reference/agents/get#response-fields):

```json
{
  "status": "success",
  "data": {
    "id": "Xq8mTe2LwP4kZ1aB9cDf",
    "name": "Acme Sales",
    "imageUrl": "/images/agents/avatars/p12.jpg",
    "status": "inactive",
    "owners": ["ana@acme.com", "luis@acme.com"],
    "draft": { "versionId": "v4", "number": 4 },
    "publication": { "versionId": "v3", "number": 3 },
    "hasUnpublishedChanges": true,
    "createdAt": "2026-10-28T12:00:00.000Z"
  }
}
```

## Errors

| Status | `details.code` | When |
|--------|----------------|------|
| `400` | `INVALID_REQUEST` | The body is empty, `name` is over 100 characters, an email in `owners` isn't a workspace member's, or the body doesn't have the expected shape |
| `403` | `FORBIDDEN` | The credential can't edit this agent |
| `404` | `AGENT_NOT_FOUND` | The agent doesn't exist in the workspace or was deleted |
| `409` | `COPY_INCOMPLETE` | You want to activate a copy whose files didn't finish connecting. See [Copy an agent](/api-reference/agents/copy#copy-the-files-too) |

```json
{
  "code": 400,
  "error": "Bad Request - The request has validation errors",
  "details": {
    "code": "INVALID_REQUEST",
    "message": "The following owner emails do not match any users in this workspace: luis@other.com"
  }
}
```

## Notes

- It doesn't move the draft or the publication. The new name and photo show right away, whichever version is published.
- To change the instructions or any other part of the configuration, [edit the draft](/api-reference/agents/drafts/update) and [publish it](/api-reference/agents/publications/publish).
- To assign it a channel, use [Update a channel](/api-reference/channels/update).
