Update a Network Agent via API
This method allows you to update a Network Agent's name.
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
{
  "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
{
  "errors": ["Name can't be blank"]
}