This method allows you to update a Network Agent's name.

**Tip**: You can explore and test this endpoint interactively using our [OpenAPI documentation](https://api.deployhq.com/docs).

## URL

```
/agents/<agent-identifier>
```

Replace `<agent-identifier>` with the `identifier` of the Agent you wish to update.

## HTTP Method

```
PUT
```

## Supported Parameters

* `name` - The new name for the agent (optional)

## Example cURL Request

```
curl -H "Content-type: application/json" \
-H "Accept: application/json" \
--user user@example.com:your-api-key \
-X PUT \
-d '{ \
  "agent": { \
    "name": "Production Deploy Agent" \
  } \
}' \
https://test.deployhq.com/agents/9e11def8-8c43-454e-8c99-3c5b9cf08396
```

## Example Response

### Success

```json
{
  "agent": {
    "id": 12345,
    "created_at": "2025-10-27T10:56:34.000Z",
    "identifier": "9e11def8-8c43-454e-8c99-3c5b9cf08396",
    "name": "Production Deploy Agent",
    "online": true,
    "revoked_at": null,
    "updated_at": "2025-10-27T11:30:00.000Z"
  }
}
```

### Error

```json
{
  "errors": ["Name can't be blank"]
}
```
