> ## Documentation Index
> Fetch the complete documentation index at: https://docs.base44.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Restore workflow

> <Info>This API is in beta. Endpoints, fields, and behavior may still change, so avoid depending on it in production.</Info>

Restores an archived workflow and tries to start it again.

Read `status` on the response rather than assuming the workflow is running. A restored workflow lands `inactive` rather than `active` when it cannot start, which happens when its schedule has already ended, something it references was deleted, or a connector is not ready. `message` says which, in words you can show someone.

Restoring fails with a 409 when another live workflow has taken this one's name or file name since it was archived. Rename the other workflow, or rename this one on the way back, before retrying.

If the workflow's file cannot be written back into the app's code, the workflow is left archived rather than half-restored, and the call reports the failure.

This endpoint is limited to 20 requests per minute.



## OpenAPI

````yaml /developers/references/app-management/app-management-openapi.json post /api/apps/{app_id}/workflows/{workflow_id}/unarchive
openapi: 3.1.0
info:
  title: Base44 App Management API
  version: 1.0.0
servers:
  - url: https://app.base44.com
security:
  - ApiKeyAuth: []
paths:
  /api/apps/{app_id}/workflows/{workflow_id}/unarchive:
    post:
      summary: Restore workflow
      description: >-
        <Info>This API is in beta. Endpoints, fields, and behavior may still
        change, so avoid depending on it in production.</Info>


        Restores an archived workflow and tries to start it again.


        Read `status` on the response rather than assuming the workflow is
        running. A restored workflow lands `inactive` rather than `active` when
        it cannot start, which happens when its schedule has already ended,
        something it references was deleted, or a connector is not ready.
        `message` says which, in words you can show someone.


        Restoring fails with a 409 when another live workflow has taken this
        one's name or file name since it was archived. Rename the other
        workflow, or rename this one on the way back, before retrying.


        If the workflow's file cannot be written back into the app's code, the
        workflow is left archived rather than half-restored, and the call
        reports the failure.


        This endpoint is limited to 20 requests per minute.
      operationId: >-
        unarchive_workflow_api_apps__app_id__workflows__workflow_id__unarchive_post
      parameters:
        - name: app_id
          in: path
          required: true
          schema:
            type: string
            description: ID of the app whose workflows you want to work with.
            title: App Id
          description: ID of the app whose workflows you want to work with.
          example: 6820f3a4e7b91d003c45a1f2
        - name: workflow_id
          in: path
          required: true
          schema:
            type: string
            description: >-
              ID of the workflow, as returned in `id` by [List
              workflows](/api-reference/list-workflows).
            title: Workflow Id
          description: >-
            ID of the workflow, as returned in `id` by [List
            workflows](/api-reference/list-workflows).
          example: 68b1c0d4e7b91d003c45a1f2
      responses:
        '200':
          description: The workflow is restored. Read `status` for whether it started.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ToggleStatusResponse'
        '401':
          description: Missing or invalid credentials.
        '402':
          description: >-
            This workspace's plan does not include workflows. Upgrade to Builder
            or above.
        '403':
          description: >-
            You don't have access to this app, the app does not exist, the app
            still runs the older automations engine instead of workflows, or you
            used a workspace API key. A missing app and an app you cannot reach
            are deliberately the same answer.
        '404':
          description: There is no workflow with this ID on this app.
        '409':
          description: >-
            Another workflow has taken this one's name or file name since it was
            archived.
        '422':
          description: The workflow could not be restored. The body says why.
components:
  schemas:
    ToggleStatusResponse:
      properties:
        workflow_id:
          type: string
          title: Workflow Id
          description: ID of the workflow.
          example: 68b1c0d4e7b91d003c45a1f2
        status:
          type: string
          title: Status
          description: >-
            The status the workflow actually landed in, which is not always the
            one you asked for.
          example: active
        message:
          anyOf:
            - type: string
            - type: 'null'
          title: Message
          description: >-
            Why a restored workflow did not come back active, written for a
            person to read. `null` when you toggled the status yourself.
          example: The schedule already ended, so the workflow stayed inactive.
      type: object
      required:
        - workflow_id
        - status
      title: ToggleStatusResponse
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: api_key
      description: Personal API key.

````