Prompt Versions
Every prompt write or edit creates a new entry in the agent's history. These endpoints let you inspect it — useful for auditing or for restoring earlier versions (by running a POST /prompt with the returned content).
List Prompt Versions
GET https://api.platica.mx/v1/agents/{agentId}/prompt/versions URL parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
agentId | string | Unique identifier of the agent | ✓ |
Query parameters
| Parameter | Type | Description | Default |
|---|---|---|---|
limit | integer | Maximum number of versions to return (1-200) | 50 |
Response
{
"versions": [
{
"id": "8Xdjb0VjgIq35mzmt1wu",
"operation": "edit",
"details": "Exact match replacement",
"owners": ["wnuHhEC1dWgpCYAi3sKsjd81kwW2"],
"createdAt": "2026-05-28T06:14:21.000Z",
"updatedAt": "2026-05-28T06:14:21.000Z"
},
{
"id": "id45iLWReNWPfEGkAbFv",
"operation": "write",
"details": "Rewrite tras lanzamiento del producto X",
"owners": ["wnuHhEC1dWgpCYAi3sKsjd81kwW2"],
"createdAt": "2026-05-28T06:10:01.000Z",
"updatedAt": "2026-05-28T06:10:01.000Z"
}
]
} Versions are returned in descending order by createdAt (newest first). The id of the most recent version matches the agent's activePromptId.
Response fields
| Field | Description |
|---|---|
id | Version ID (matches activePromptId for the active one) |
operation | Type of operation that produced the version: "create", "write", "edit", or "modify" |
details | Descriptive note about the change |
owners | UID of the user or API key that created the version |
createdAt | Creation date in ISO 8601 format |
updatedAt | Update date in ISO 8601 format |
Get a Prompt Version
Returns a specific version, including the full prompt content at that point in time.
GET https://api.platica.mx/v1/agents/{agentId}/prompt/versions/{versionId} URL parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
agentId | string | Unique identifier of the agent | ✓ |
versionId | string | Version identifier | ✓ |
Response
{
"id": "id45iLWReNWPfEGkAbFv",
"prompt": "Eres un asistente de soporte experto en electrónica de consumo...",
"operation": "write",
"details": "Rewrite tras lanzamiento del producto X",
"owners": ["wnuHhEC1dWgpCYAi3sKsjd81kwW2"],
"createdAt": "2026-05-28T06:10:01.000Z",
"updatedAt": "2026-05-28T06:10:01.000Z"
} Unlike the listing, this response includes the prompt field with the full system prompt content as it was in that version.