# Get agent history record

Get agent history record. See the OpenAPI-defined parameters, request body, and responses below.

Source: https://zild.ai/en-US/docs/api-reference/get-api-AgentHistory-id

GET `/AgentHistory/{id}`

Get agent history record. See the OpenAPI-defined parameters, request body, and responses below.

**OpenAPI description:** Este endpoint retorna os detalhes de um registro de histórico específico.

## Authentication

**Authentication required.** Send your user API key in the X-API-Key header.

## Parameters



<table class="api-params"><thead><tr><th>Name</th><th>Location</th><th>Type</th><th>Required</th><th>Description</th><th>Constraints</th></tr></thead><tbody><tr><td><code>id</code></td><td><code>path</code></td><td><code>integer · int32</code></td><td>Yes</td><td>—</td><td>—</td></tr></tbody></table>



## Request body

This operation does not accept a request body.

## Example request



```
curl --request GET \
  --url 'https://api.zild.ai/AgentHistory/{id}' \
  --header 'X-API-Key: YOUR_USER_API_KEY'
```



## Responses



<table class="api-params"><thead><tr><th>Status</th><th>Description</th><th>Response body</th></tr></thead><tbody><tr><td><code>200</code></td><td>Sucesso ao retornar o registro</td><td><code>application/json</code> · <code>AgentHistoryDto</code></td></tr><tr><td><code>404</code></td><td>Registro não encontrado</td><td>No response body is defined.</td></tr></tbody></table>

**Example response (200):**



```
{
  "id": 0,
  "agentId": 0,
  "agentName": "string",
  "userId": 0,
  "userName": "string",
  "userEmail": "string",
  "actionType": 0,
  "actionTypeDescription": "string",
  "description": "string",
  "previousState": "string",
  "newState": "string",
  "changedFields": "string",
  "createdAt": "2026-09-22T18:00:00Z",
  "version": 0
}
```



## Data models

`AgentHistoryActionType`0 = Created; 1 = Updated; 2 = Deleted; 3 = FileAdded; 4 = FileRemoved; 5 = DynamicVariableAdded; 6 = DynamicVariableUpdated; 7 = DynamicVariableRemoved; 8 = DataCollectionAdded; 9 = DataCollectionUpdated; 10 = DataCollectionRemoved; 11 = ToolAdded; 12 = ToolUpdated; 13 = ToolRemoved; 14 = TaskAdded; 15 = TaskUpdated; 16 = TaskRemoved; 17 = PermissionChanged

`integer`

`AgentHistoryDto`

<table class="api-params"><thead><tr><th>Property</th><th>Type</th><th>Required</th><th>Description</th><th>Constraints</th></tr></thead><tbody><tr><td><code>id</code></td><td><code>integer · int32</code></td><td>No</td><td>—</td><td>—</td></tr><tr><td><code>agentId</code></td><td><code>integer · int32</code></td><td>No</td><td>—</td><td>—</td></tr><tr><td><code>agentName</code></td><td><code>string</code></td><td>No</td><td>—</td><td>nullable</td></tr><tr><td><code>userId</code></td><td><code>integer · int32</code></td><td>No</td><td>—</td><td>—</td></tr><tr><td><code>userName</code></td><td><code>string</code></td><td>No</td><td>—</td><td>nullable</td></tr><tr><td><code>userEmail</code></td><td><code>string</code></td><td>No</td><td>—</td><td>nullable</td></tr><tr><td><code>actionType</code></td><td><code>AgentHistoryActionType</code></td><td>No</td><td>—</td><td>—</td></tr><tr><td><code>actionTypeDescription</code></td><td><code>string</code></td><td>No</td><td>—</td><td>nullable</td></tr><tr><td><code>description</code></td><td><code>string</code></td><td>No</td><td>—</td><td>nullable</td></tr><tr><td><code>previousState</code></td><td><code>string</code></td><td>No</td><td>—</td><td>nullable</td></tr><tr><td><code>newState</code></td><td><code>string</code></td><td>No</td><td>—</td><td>nullable</td></tr><tr><td><code>changedFields</code></td><td><code>string</code></td><td>No</td><td>—</td><td>nullable</td></tr><tr><td><code>createdAt</code></td><td><code>string · date-time</code></td><td>No</td><td>—</td><td>—</td></tr><tr><td><code>version</code></td><td><code>integer · int32</code></td><td>No</td><td>—</td><td>—</td></tr></tbody></table>
