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

# List pull requests

> List the project's pull requests, newest first, with their latest QA.tech review, as the dashboard Pull Requests page does.

Filter with `state`, `repository`, `number`, or `onlyReviewed`. Pass an item's `id` to `get_pull_request` for every review and its full text. To start a review, use `POST /chat/change-review`.



## OpenAPI

````yaml /api-reference/api.json get /v1/pull-requests
openapi: 3.0.0
info:
  title: QA.tech API
  version: 1.0.0
  contact:
    name: QA.tech
    url: https://qa.tech
    email: support@qa.tech
  description: API for triggering and managing AI-powered test runs
servers:
  - url: https://api.qa.tech
    description: Production
    variables: {}
security:
  - BearerAuth: []
tags:
  - name: Runs
  - name: Infrastructure
  - name: Test Cases
  - name: Application Builds
  - name: Status badge
  - name: Remote Tunnels
  - name: Chat
  - name: Applications
  - name: Features
  - name: Metrics
  - name: Projects
  - name: Knowledge
  - name: Rules
  - name: Configs
  - name: Labels
  - name: Scenarios
  - name: Crawling
  - name: Pull requests
  - name: Issues
  - name: Todos
  - name: Automations
  - name: Test plans
  - name: Integrations
paths:
  /v1/pull-requests:
    get:
      tags:
        - Pull requests
      summary: List pull requests
      description: >-
        List the project's pull requests, newest first, with their latest
        QA.tech review, as the dashboard Pull Requests page does.


        Filter with `state`, `repository`, `number`, or `onlyReviewed`. Pass an
        item's `id` to `get_pull_request` for every review and its full text. To
        start a review, use `POST /chat/change-review`.
      operationId: ListPullRequests
      parameters:
        - name: query
          in: query
          required: true
          schema:
            $ref: '#/components/schemas/ListPullRequestsQuery'
          explode: false
      responses:
        '200':
          description: The request has succeeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListPullRequestsResponse'
components:
  schemas:
    ListPullRequestsQuery:
      type: object
      properties:
        state:
          type: string
          enum:
            - open
            - merged
            - closed
          description: >-
            Only include pull requests in this state. Omitted returns every
            state.
        repository:
          type: string
          maxLength: 200
          pattern: ^[^\/\s]+\/[^\/\s]+$
          description: Only include pull requests from this repository, as `owner/name`.
        number:
          type: integer
          format: int32
          minimum: 1
          description: >-
            Only include the pull request with this number. Combine with
            `repository` to find one pull request.
        onlyReviewed:
          type: boolean
          description: >-
            Only include pull requests QA.tech has started at least one review
            for.
        limit:
          type: integer
          format: int32
          minimum: 1
          maximum: 100
          description: Maximum number of pull requests to return (1-100). Defaults to 20.
          default: 20
        offset:
          type: integer
          format: int32
          minimum: 0
          description: Number of pull requests to skip for pagination. Defaults to 0.
        projectShortId:
          allOf:
            - $ref: '#/components/schemas/ProjectShortId'
          description: >-
            Target a specific project by its prefixed short ID
            (proj-slug_shortId or proj_shortId), as returned by the projects
            API. Required for organization-scoped API keys; project-scoped keys
            may only pass their own project's short ID.
      description: >-
        Filters for listing a project's pull requests. Benchmark repositories
        are never returned.
    ListPullRequestsResponse:
      type: object
      required:
        - pullRequests
        - total
        - limit
        - offset
      properties:
        pullRequests:
          type: array
          items:
            $ref: '#/components/schemas/PullRequestListItem'
        total:
          type: integer
          format: int32
        limit:
          type: integer
          format: int32
        offset:
          type: integer
          format: int32
      description: Pull requests in the project, newest first, with pagination.
    ProjectShortId:
      type: string
      pattern: ^proj(-.+_.+|_.+)$
    PullRequestListItem:
      type: object
      required:
        - id
        - provider
        - repository
        - number
        - title
        - state
        - author
        - headRef
        - baseRef
        - url
        - dashboardUrl
        - reviewConversationShortId
        - latestReview
        - createdAt
      properties:
        id:
          type: string
          description: Pull request id (UUID). Pass it to `get_pull_request`.
        provider:
          type: string
          description: '`github` or `gitlab`.'
        repository:
          type: string
          description: Repository as `owner/name`.
        number:
          type: integer
          format: int32
        title:
          type: string
        state:
          type: string
          enum:
            - open
            - merged
            - closed
        author:
          type: string
          nullable: true
        headRef:
          type: string
        baseRef:
          type: string
        url:
          type: string
          description: Pull request URL on the provider.
        dashboardUrl:
          type: string
          description: Dashboard URL for the pull request.
        reviewConversationShortId:
          type: string
          allOf:
            - $ref: '#/components/schemas/ChatConversationShortId'
          nullable: true
          description: >-
            Short ID of the pull request's review conversation. Pass it to
            `get_chat_conversation` for the review's runs and messages.
        latestReview:
          type: object
          allOf:
            - $ref: '#/components/schemas/PullRequestReviewSummary'
          nullable: true
          description: >-
            The most recent review, or null if QA.tech has not reviewed the pull
            request.
        createdAt:
          type: string
          format: date-time
      description: >-
        A pull request QA.tech knows about. Call `get_pull_request` with `id`
        for every review and its full text.
    ChatConversationShortId:
      type: string
      pattern: ^chat(-.+_.+|_.+)$
    PullRequestReviewSummary:
      type: object
      required:
        - id
        - status
        - result
        - summary
        - headSha
        - createdAt
        - completedAt
      properties:
        id:
          type: string
          description: Review id (UUID)
        status:
          type: string
          enum:
            - pending
            - awaiting_approval
            - completed
            - failed
            - skipped
          description: >-
            `pending` while it runs and `awaiting_approval` while it waits for a
            deployment, then `completed`, `failed`, or `skipped` (triage decided
            not to review).
        result:
          type: string
          enum:
            - fully_verified
            - partially_verified
            - cant_verify
            - bugs_found
          nullable: true
          description: >-
            The review result once it finishes: `fully_verified`,
            `partially_verified`, `cant_verify`, or `bugs_found`. Null while the
            review runs or when it ended without a verdict.
        summary:
          type: string
          nullable: true
          description: One-line summary of the review, if any.
        headSha:
          type: string
          nullable: true
          description: Commit SHA the review tested.
        createdAt:
          type: string
          format: date-time
        completedAt:
          type: string
          format: date-time
          nullable: true
      description: A QA.tech review of one pull request commit.
  securitySchemes:
    BearerAuth:
      type: http
      scheme: Bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.