---
title: "POST /v1/templates/{templateId}/rollback"
method: POST
path: "/v1/templates/{templateId}/rollback"
---

# POST /v1/templates/{templateId}/rollback

`POST /v1/templates/{templateId}/rollback`

Rollback template to a previous version

## Path parameters

- `templateId` string, required

## Request body

- union
  - object
  - RollbackTemplateParams
    - `targetVersion` integer, required

## Response `200`

OK

- RollbackTemplateSuccessResponse
  - `code` integer
  - `data` GithubComB3FunB3MonoServicesB3osWorkflowInternalPkgEntityTemplate
    - `archived` boolean
    - `category` string — Deprecated: Use Tags instead
    - `cooldownMs` integer
    - `createdAt` string
    - `createdBy` string
    - `definition` GithubComB3FunB3MonoServicesB3osWorkflowInternalPkgEntityWorkflowDefinition — Definition is the full workflow graph to execute. Must contain a "root" node with type "manual". All action nodes referenced in children arrays must be present.
      - `inputSchema` GithubComB3FunB3MonoServicesB3osWorkflowInternalPkgEntityWorkflowInput[]
        - `description` string
        - `key` string
        - `required` boolean
        - `type` string — "string", "number", "boolean", "object", "array"
      - `nodes` object, required
      - `sensitivePropKeys` string[]
    - `description` string
    - `forkCount` integer
    - `id` string
    - `isPromoted` boolean
    - `maxRuns` integer
    - `name` string
    - `organizationDescription` string
    - `organizationId` string — Fields for user-generated templates (nil for built-in templates)
    - `organizationName` string
    - `organizationPhoto` string
    - `promotedAt` string
    - `promotedBy` string
    - `sourceWorkflowId` string — Source workflow link (nil for built-in or legacy templates)
    - `tags` GithubComB3FunB3MonoServicesB3osWorkflowInternalPkgEntityTag[]
      - `categories` string[] — e.g., ["blockchain", "finance"]
      - `count` integer — Scope-dependent: template, action, trigger, or connector count
      - `createdAt` string
      - `description` string
      - `id` string
      - `imageUrl` string
      - `name` string
      - `promotedTemplateCount` integer
      - `publicTemplateCount` integer
      - `slug` string
      - `updatedAt` string
      - `weight` integer — Higher weight = more prominent
    - `templateProps` GithubComB3FunB3MonoServicesB3osWorkflowInternalPkgEntityTemplateProp[]
      - `default` unknown
      - `description` string
      - `key` string
      - `name` string
      - `properties` GithubComB3FunB3MonoServicesB3osWorkflowInternalPkgEntityPropSchema
        - `chainPropKey` string — For tokenSelector: prop key providing chainId
        - `enum` unknown[]
          - unknown
        - `enumLabels` string[]
        - `inputType` string — InputType is a UI rendering hint. The frontend uses it to pick a rich selector component instead of a plain text input. Unknown values are silently ignored (falls back to default input). Valid values: chainSelector, tokenSelector, address, recipientAddress, email
        - `maximum` number
        - `minimum` number
        - `pattern` string
        - `placeholder` string
      - `required` boolean
      - `sensitive` boolean
      - `type` string — "string", "number", "integer", "boolean"
    - `uiMetadata` GithubComB3FunB3MonoServicesB3osWorkflowInternalPkgEntityWorkflowUIMetadata
      - `comments` GithubComB3FunB3MonoServicesB3osWorkflowInternalPkgEntityComment[]
        - `createdAt` string
        - `createdBy` GithubComB3FunB3MonoServicesB3osWorkflowInternalPkgEntityStickyNoteUser
          - `clientId` string
          - `name` string
        - `id` string
        - `nodeId` string
        - `position` GithubComB3FunB3MonoServicesB3osWorkflowInternalPkgEntityNodePosition
          - `x` number
          - `y` number
        - `replies` GithubComB3FunB3MonoServicesB3osWorkflowInternalPkgEntityCommentReply[]
          - `createdAt` string
          - `createdBy` GithubComB3FunB3MonoServicesB3osWorkflowInternalPkgEntityStickyNoteUser
            - `clientId` string
            - `name` string
          - `id` string
          - `text` string
          - `updatedAt` string
        - `resolved` boolean
        - `text` string
        - `updatedAt` string
      - `nodePositions` object
      - `stickyNotes` GithubComB3FunB3MonoServicesB3osWorkflowInternalPkgEntityStickyNote[]
        - `color` string
        - `createdAt` string
        - `createdBy` GithubComB3FunB3MonoServicesB3osWorkflowInternalPkgEntityStickyNoteUser
          - `clientId` string
          - `name` string
        - `id` string
        - `position` GithubComB3FunB3MonoServicesB3osWorkflowInternalPkgEntityNodePosition
          - `x` number
          - `y` number
        - `size` GithubComB3FunB3MonoServicesB3osWorkflowInternalPkgEntityStickyNoteSize
          - `height` number
          - `width` number
        - `text` string
        - `updatedAt` string
        - `zIndex` integer
    - `updatedAt` string
    - `updatedBy` string
    - `version` integer
    - `visibility` 'org' | 'public' | 'org' | 'public'
  - `message` string
  - `requestId` string

## Other responses

- `400` — Bad Request
- `404` — Not Found

---

[API](https://skmtc.net/b3-fun/apis/b3os-workflow-api.md) · [All operations](https://skmtc.net/b3-fun/apis/b3os-workflow-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/b3-fun/b3os-workflow-api/versions/5a750a5a9596/schema)
