Soft-delete a project by setting its status to ARCHIVED. Requires a valid JWT access token. The project must belong to the authenticated user’s tenant and must not already be ARCHIVED.
- Archive is a soft-delete operation — the project is not removed from the database, only its status changes to ARCHIVED.
- The previous status (before archiving) is stored internally so the project can be restored to that status later (see UC-03006).
- ARCHIVED projects are excluded from the default project list (see UC-03001). They can be viewed by explicitly filtering by
status=ARCHIVED. - A project that is already ARCHIVED cannot be archived again.
sequenceDiagram
actor User
User->>+FE: clicks "Archive Project"
FE->>FE: show confirmation dialog
alt user cancels
FE-->>User: close dialog
end
User->>FE: confirms archive
FE->>+BE: PUT /api/v1/projects/{id}/archive <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 already ARCHIVED
BE-->>FE: 409 Conflict <br> ErrorResponse
end
BE->>DB: store current status as previous_status
BE->>DB: update project status to ARCHIVED
BE->>-FE: 200 OK <br> ProjectResponse
FE->>-User: show success notification <br> redirect to project list
PUT /api/v1/projects/{id}/archive (no request body)
200 OK ProjectResponse:
{
"data": {
"id": 1,
"name": "Wildwood Bakery",
"description": "Online ordering for a neighborhood bakery",
"status": "ARCHIVED",
"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-29T16: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 already ARCHIVED) ErrorResponse:
{
"status": 409,
"code": "CONFLICT_PROJECT",
"message": "Project is already archived"
}
Frontend
Validations
No form inputs — this is a single-action operation triggered by a button with confirmation dialog.
Backend
Validations
| Field | Constraints | Size | Pattern | Note |
|---|---|---|---|---|
| id (path) | not_null, positive | Must be a valid project ID belonging to the user’s tenant |
Test Cases
| GIVEN | WHEN | THEN |
|---|---|---|
| authenticated user, project in DRAFT status | PUT /projects/{id}/archive is called | 200 OK with project status=ARCHIVED returned |
| authenticated user, project in BUILDING status | PUT /projects/{id}/archive is called | 200 OK with project status=ARCHIVED returned |
| authenticated user, project in LIVE status | PUT /projects/{id}/archive is called | 200 OK with project status=ARCHIVED returned |
| authenticated user, project in UPDATED status | PUT /projects/{id}/archive is called | 200 OK with project status=ARCHIVED returned |
| authenticated user, project in PAUSED status | PUT /projects/{id}/archive is called | 200 OK with project status=ARCHIVED returned |
| authenticated user, project already ARCHIVED | PUT /projects/{id}/archive is called | 409 CONFLICT_PROJECT error response is returned |
| project belongs to another tenant | PUT /projects/{id}/archive is called | 404 NOT_FOUND error response is returned |
| project ID does not exist | PUT /projects/{id}/archive is called | 404 NOT_FOUND error response is returned |
| no Authorization header | PUT /projects/{id}/archive is called | 401 AUTHENTICATION_FAILED error response is returned |
Was this page helpful?
Thanks for the feedback.