For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
CommunityCreate AccountSign in
  • Overview
    • Welcome
    • Authentication
    • Using Environments
  • API Reference
      • GETList agents
      • POSTCreate an agent
      • GETGet an agent
      • GETList agent versions for an agent
      • GETRevert to a specific agent version
      • GETList Agent Roles
      • POSTAssign Role to Agent
      • DELRemove Role from Agent
      • GETGet logs for an agent
      • GETGet an agent log
      • GETGet all agent logs in your environment
      • GETGet all executions in your environment
      • DELDelete an agent
LogoLogo
LogoLogo
CommunityCreate AccountSign in
API ReferenceAgents

Revert to a specific agent version

GET
https://api.x.flatfile.com/v1/agents/:agentId/versions/:agentVersionId/revert
GET
/v1/agents/:agentId/versions/:agentVersionId/revert
$curl https://api.x.flatfile.com/v1/agents/agentId/versions/agentVersionId/revert \
> -H "X-Disable-Hooks: true" \
> -H "Authorization: Bearer <token>"
1{
2 "data": {
3 "agent_id": "agent_id",
4 "createdAt": "2024-01-15T09:30:00Z",
5 "id": "id",
6 "origin": 1,
7 "updatedAt": "2024-01-15T09:30:00Z",
8 "version": 1,
9 "commitInfo": {
10 "commitInfo": {
11 "key": "value"
12 }
13 },
14 "compiler": "js",
15 "isSystem": true,
16 "namespace": "namespace",
17 "packageVersions": {
18 "packageVersions": "packageVersions"
19 },
20 "slug": "slug",
21 "source": "source",
22 "sourceMap": "sourceMap",
23 "template": "constraints",
24 "templateOptions": {
25 "template": "constraints",
26 "namespace": "namespace"
27 },
28 "topics": [
29 "agent:created",
30 "agent:created"
31 ],
32 "options": {
33 "options": {
34 "key": "value"
35 }
36 }
37 }
38}
Was this page helpful?
Previous

List Agent Roles

Next
Built with

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

agentIdstringRequired
Agent ID
agentVersionIdstringRequired
Agent version ID

Headers

X-Disable-Hooks"true"Required

Response

This endpoint returns an object.
dataobject

Errors

400
Bad Request Error
404
Not Found Error