# POST /api/v2/projects/{project}/actions/restore

Restore a deleted project

- MCP id: projects.actions.restore
- Scope: api:write:projects
- Permission: projects::create
- Rate cost: 1 unit, write bucket. A write costs the same whatever `view` you ask for.
- Cache-Control: private, no-store

Clears the soft-delete marker and returns the project in the detail view.

Restoring additionally requires `projects::delete` as well as `projects::create`. A restore fully undoes a soft delete: a soft delete leaves the project's notes, drive items, worklogs and tags in place, so the project comes back with all of them. A force delete cannot be undone. Restoring a project that is not deleted succeeds and returns an `already_in_target_state` warning, so a retry is safe. The restore finds a deleted project without the trashed parameter and does not accept it.

## Parameters
- project (integer, path): The Project's numeric id. Accepts a soft-deleted record.
- view (string, optional): Which field set to render.
- X-Request-Id (header, optional): A correlation id of your own. It is recorded in our logs next to the server's request id but never returned: the response header always carries the server's id. A value that does not match the pattern is discarded silently, never rejected.
- If-Match (header, optional): The ETag a write is conditional on. A stale validator is 412 precondition-failed.
- Idempotency-Key (header, optional): A caller-chosen key that makes this POST safe to retry. Replaying it returns the original response with Idempotency-Replayed: true.

## Response 200
- id (integer, required): Unique identifier.
- title (string ≤ 255, required): Project title as shown in the UI.
- full_title (string, required): Application name plus title. Never carries the project number, even when the organisation shows numbers in plnnrly.
- description (html or null, required, detail only): Free-text description. HTML from the rich editor, sanitised.
- status (string, required): Lifecycle status. Setting it to invoiced finishes every task on every budget of the project.
- workflow_mode (string or null, required): Whether work is planned in sprints or on a simple board.
- start_date (date (YYYY-MM-DD) or null, required): First day of the project.
- end_date (date (YYYY-MM-DD) or null, required): Last day, `null` if open-ended.
- is_billable (boolean, required): Whether time on this project is billable.
- is_continuous (boolean, required): Whether the project has no planned end.
- last_activity (timestamp (YYYY-MM-DDThh:mm:ssZ) or null, required): Most recent write anywhere in the project.
- created_at (timestamp (YYYY-MM-DDThh:mm:ssZ), required): Creation timestamp.
- updated_at (timestamp (YYYY-MM-DDThh:mm:ssZ), required): Last-write timestamp; use for incremental sync.
- deleted_at (timestamp (YYYY-MM-DDThh:mm:ssZ) or null, required): Soft-delete timestamp, `null` while live.
- customer_id (integer, required): Owning customer.
- sub_customer_id (integer or null, required): Optional sub-customer.
- project_manager_id (integer or null, required): Responsible project manager.
- account_manager_id (integer or null, required, server-assigned): Responsible account manager. Set to the creating user and not writable.
- application_id (integer or null, required): Linked application. Writable only while the organisation has the Infrastructure feature: sending a non-`null` value without it is a `422` `prohibited`. Null clears the link regardless.
- workflow_id (integer or null, required): Workflow whose statuses this project's work items move through.
- web_url (string, required): Absolute URL that opens this project's work in plnnrly, on the organisation's own hostname. It is a stable link, safe to store: it redirects to the first of the project's backlog, all-work list or board the signed-in user may open, and to the project page when none of them applies. Read-only.
- customer (Ref or CustomerSummary, required): Owning customer.
- sub_customer (Ref or CustomerSummary or null, required): Optional sub-customer.
- project_manager (Ref or UserSummary or null, required): Responsible project manager.
- account_manager (Ref or UserSummary or null, required): Responsible account manager.
- sprints_count (integer ≥ 0, required): Number of sprints.
- budgets_count (integer ≥ 0, required): Number of budgets.
- tags_count (integer ≥ 0, required): Number of tags.
- tasks_count (integer ≥ 0, required): Number of kanban tasks on this project that the caller may see.
- workflow_mode_options (array of string, required, detail only): Workflow modes this project may switch to. Empty until a workflow is linked.
- links (ProjectLinks, required)
  - self (url, required): The canonical URI of this record.
  - tasks (url, required): Kanban tasks on this project.
  - budgets (url, required): Budgets on this project.
  - sprints (url, required): Sprints on this project.
- tags (array of TagSummary ≤ 50, optional, only with include): Tags on this project. A project takes at most 50 tags, so the include lists them all. `tag_ids` replaces the whole set. Wrapped in `{ data, meta }`; `meta.truncated` says whether the cap was hit and `meta.count` is the full count.
  - id (integer, required): Unique identifier.
  - title (string ≤ 255, required): Tag title as shown in the UI.
- logged_minutes (integer or null, optional, on request): Sum of the worklog minutes on this project that the caller may see. Worklogs are per-user unless the caller holds `times::update_others` or `times::delete_others`. Null when the caller lacks `hours::read` or a token covering `api:read:times`.

## Errors
- 403 forbidden-by-policy | insufficient-permission | insufficient-token-scope: Forbidden.
- 409 idempotency-key-in-flight | idempotency-key-reused: Conflict.
- 412 precondition-failed: Precondition failed.
- 400 idempotency-key-required | invalid-cursor | invalid-query-parameter | malformed-request | unsupported-parameter: Bad request.
- 401 token-expired | unauthenticated: Unauthenticated.
- 404 endpoint-not-found | resource-not-found: Not found.
- 406 not-acceptable: Not acceptable.
- 429 rate-limit-exceeded: Too many requests.
- 500 internal-error: Server error.
- 503 tenant-unavailable: Service unavailable.

## Example
```bash
curl -X POST \
  'https://<your-url>/api/v2/projects/1/actions/restore' \
  -H 'Authorization: Bearer <token>' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: <key>' \
  -d '{}'
```
