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

# Request status lifecycle

> The states a source review request moves through

Requests let workspace members propose source additions or removals and collect reviews before they take effect. Every request reports a `status` that moves through a fixed state machine. Status changes are recorded with timestamps (`opened_at`, `approved_at`, and so on).

Use the [transition request](/cookbooks/reviews#submit-for-review) endpoint to move between author-driven states. Review submissions advance the request with `approve`, `request_changes`, or `reject`. Any transition that is not allowed returns `409 Conflict`.

Each review has its own lifecycle — see [Review status lifecycle](/review-status).

## State diagram

```mermaid theme={null}
stateDiagram-v2
    [*] --> DRAFT
    DRAFT --> OPEN: submit
    OPEN --> CHANGES_REQUESTED: request_changes
    OPEN --> APPROVED: approve
    OPEN --> REJECTED: reject
    CHANGES_REQUESTED --> APPROVED: approve
    CHANGES_REQUESTED --> REJECTED: reject
    CHANGES_REQUESTED --> OPEN: reopen
    REJECTED --> OPEN: reopen
```

## States

| Status              | Meaning                                                                        |
| ------------------- | ------------------------------------------------------------------------------ |
| `DRAFT`             | The author is still editing the request. Changes can be added or removed.      |
| `OPEN`              | The request is ready for review. Reviewers can start or resume a draft review. |
| `CHANGES_REQUESTED` | A reviewer asked for changes. The author can reopen after addressing feedback. |
| `APPROVED`          | A review approved the request. Terminal for the request lifecycle.             |
| `REJECTED`          | A review rejected the request. The author can reopen if needed.                |

## Transitions

* `submit` moves `DRAFT` to `OPEN` and sets `opened_at`. Only the author can call this.
* `reopen` moves `CHANGES_REQUESTED` or `REJECTED` back to `OPEN` and refreshes `opened_at`.
* `approve`, `request_changes`, and `reject` on the request are driven by submitting a review.

Content edits (`title`, `description`, `labels`, `assignees`) and change add/remove are only allowed while the request is in `DRAFT`.

For the full API recipe, see [Review source changes](/cookbooks/reviews).
