---
title: "Revert to a specific agent version"
method: GET
path: "/agents/{agentId}/versions/{agentVersionId}/revert"
tags: ["agents"]
---

# Revert to a specific agent version

`GET /agents/{agentId}/versions/{agentVersionId}/revert`

## Path parameters

- `agentId` string, required — Agent ID
- `agentVersionId` string, required — Agent version ID

## Headers

- `Authorization` string, required
- `X-Disable-Hooks` 'true', required

## Response `200`

Response with status 200

- TypeAgentsAgentVersionResponse
  - `data` TypeAgentsAgentVersion
    - `topics` TypeEventsEventTopic[] — The topics the agent should listen for
    - `compiler` 'js' — The compiler of the agent
    - `source` string — The source of the agent
    - `sourceMap` string — The source map of the agent
    - `slug` string — The slug of the agent
    - `options` object — This field is deprecated and will be removed in the future. Use the `template` and `templateOptions` fields instead.
    - `template` 'constraints' | 'autobuild' | 'autocast' | 'webhook-egress' | 'action-listener' | 'automap' — The template of the agent
    - `templateOptions` union — The options for a templated agent.
      - object
        - `template` 'constraints', required — Discriminator value: constraints
        - `namespace` string
      - object
        - `template` 'autobuild', required — Discriminator value: autobuild
        - `namespace` string
        - `autobuildId` string, required
      - object
        - `template` 'autocast', required — Discriminator value: autocast
        - `namespace` string
        - `sheetSlug` string, required
        - `fieldFilters` string[]
        - `options` object
      - object
        - `template` 'webhook-egress', required — Discriminator value: webhook-egress
        - `namespace` string
        - `jobName` string, required
        - `url` string, required
      - object
        - `template` 'action-listener', required — Discriminator value: action-listener
        - `namespace` string
        - `jobName` string, required
        - `actionFunction` string, required
      - object
        - `template` 'automap', required — Discriminator value: automap
        - `namespace` string
        - `options` TypeAgentsAutomapOptions, required
          - `accuracy` string, required
          - `defaultTargetSheet` string, required
          - `matchFilename` string, required
    - `isSystem` boolean — Whether the agent is a system agent. This should be false for all agents created by users.
    - `namespace` string — The namespace this agent should be limited to. Right now, this is information only and not used to actually filter agents that run, so you must still specify the namespace filter in the agent code.
    - `packageVersions` object — Package versions information for the agent
    - `commitInfo` object — Commit information for the agent
    - `id` string, required — Agent version ID
    - `version` integer, required
    - `origin` integer, required
    - `createdAt` string, date-time, required
    - `updatedAt` string, date-time, required
    - `agent_id` string, required — Agent ID

## Other responses

- `400` — Error response with status 400
- `404` — Error response with status 404

---

[API](https://skmtc.net/flatfile/apis/api-reference.md) · [All operations](https://skmtc.net/flatfile/apis/api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/flatfile/api-reference/revisions/9d3a9979cd96/schema)
