Internal Documentation internal
TalkIDE internal documentation

Restore an ARCHIVED project back to its previous status. Requires a valid JWT access token. The project must belong to the authenticated user’s tenant and must be in ARCHIVED status.

  • The project is restored to its pre-archive status (the status it had before it was archived).
  • Typical restored statuses are DRAFT or LIVE, depending on what the project’s status was before archiving.
  • Only ARCHIVED projects can be restored — calling restore on a non-ARCHIVED project returns a conflict error.
sequenceDiagram
    actor User

    User->>+FE: clicks "Restore Project" (from archived list)

    FE->>FE: show confirmation dialog
    alt user cancels
        FE-->>User: close dialog
    end

    User->>FE: confirms restore

    FE->>+BE: PUT /api/v1/projects/{id}/restore <br> Authorization: Bearer {accessToken}

    BE->>BE: validate JWT access token
    alt access token invalid or missing
        BE-->>FE: 401 Unauthorized <br> ErrorResponse
    end

    BE->>DB: find project by id and tenant_id
    alt project not found
        BE-->>FE: 404 Not Found <br> ErrorResponse
    end

    BE->>BE: check project status
    alt project is not ARCHIVED
        BE-->>FE: 409 Conflict <br> ErrorResponse
    end

    BE->>DB: restore project status to previous_status

    BE->>-FE: 200 OK <br> ProjectResponse

    FE->>-User: show success notification <br> redirect to project detail

PUT /api/v1/projects/{id}/restore (no request body)

200 OK ProjectResponse:

{
  "data": {
    "id": 1,
    "name": "Wildwood Bakery",
    "description": "Online ordering for a neighborhood bakery",
    "status": "LIVE",
    "url": "wildwood-bakery.talkide.app",
    "accent": "oklch(0.78 0.15 70)",
    "techStack": "Vue + Spring Boot",
    "progress": null,
    "createdAt": "2026-04-20T10:00:00Z",
    "updatedAt": "2026-04-29T17:00:00Z"
  }
}

401 Unauthorized (missing or invalid access token) ErrorResponse:

{
  "status": 401,
  "code": "AUTHENTICATION_FAILED",
  "message": "Access token is missing or invalid"
}

404 Not Found (project does not exist or does not belong to user’s tenant) ErrorResponse:

{
  "status": 404,
  "code": "NOT_FOUND",
  "message": "Project not found"
}

409 Conflict (project is not ARCHIVED) ErrorResponse:

{
  "status": 409,
  "code": "CONFLICT_PROJECT",
  "message": "Only archived projects can be restored"
}

Frontend

Validations

No form inputs — this is a single-action operation triggered by a button with confirmation dialog.

Backend

Validations

FieldConstraintsSizePatternNote
id (path)not_null, positiveMust be a valid project ID belonging to the user’s tenant

Test Cases

GIVENWHENTHEN
authenticated user, project ARCHIVED (previously DRAFT)PUT /projects/{id}/restore is called200 OK with project status=DRAFT returned
authenticated user, project ARCHIVED (previously LIVE)PUT /projects/{id}/restore is called200 OK with project status=LIVE returned
authenticated user, project ARCHIVED (previously PAUSED)PUT /projects/{id}/restore is called200 OK with project status=PAUSED returned
authenticated user, project ARCHIVED (previously UPDATED)PUT /projects/{id}/restore is called200 OK with project status=UPDATED returned
authenticated user, project in DRAFT status (not ARCHIVED)PUT /projects/{id}/restore is called409 CONFLICT_PROJECT error response is returned
authenticated user, project in LIVE status (not ARCHIVED)PUT /projects/{id}/restore is called409 CONFLICT_PROJECT error response is returned
project belongs to another tenantPUT /projects/{id}/restore is called404 NOT_FOUND error response is returned
project ID does not existPUT /projects/{id}/restore is called404 NOT_FOUND error response is returned
no Authorization headerPUT /projects/{id}/restore is called401 AUTHENTICATION_FAILED error response is returned

Was this page helpful?

Thanks for the feedback.