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

# Get a submitted pull request from a merge queue.



## OpenAPI

````yaml /openapi.json post /getSubmittedPullRequest
openapi: 3.1.0
info:
  title: Trunk APIs
  version: 1.0.0
  license:
    name: UNLICENSED
servers:
  - url: https://api.trunk.io/v1
security: []
paths:
  /getSubmittedPullRequest:
    post:
      summary: Get a submitted pull request from a merge queue.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                repo:
                  type: object
                  properties:
                    host:
                      type: string
                    owner:
                      type: string
                    name:
                      type: string
                  required:
                    - host
                    - owner
                    - name
                pr:
                  type: object
                  properties:
                    number:
                      type: integer
                      minimum: 0
                      maximum: 4294967295
                  required:
                    - number
                targetBranch:
                  type: string
              required:
                - repo
                - pr
                - targetBranch
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  state:
                    type: string
                    enum:
                      - not_ready
                      - pending
                      - testing
                      - tests_passed
                      - merged
                      - failed
                      - cancelled
                      - pending_failure
                    description: >-
                      The state of a pull request in the merge queue. See
                      https://docs.trunk.io/merge-queue/using-the-queue/reference#pull-request-states
                      for the full description of each state.
                  readiness:
                    type: object
                    properties:
                      hasImpactedTargets:
                        type: boolean
                        description: >-
                          Whether the set of impacted build/test targets for
                          this PR has been reported.
                      requiresImpactedTargets:
                        type: boolean
                        description: >-
                          Whether the queue is configured to require
                          impacted-target reporting before a PR can start
                          testing.
                      doesBaseBranchMatch:
                        type: boolean
                        description: >-
                          Whether the PR's base branch matches the queue's
                          target branch.
                      gitHubMergeability:
                        type: string
                        enum:
                          - unspecified
                          - in_progress
                          - mergeable
                          - not_mergeable
                        description: >-
                          GitHub's mergeability state for the PR (cached).
                          `unspecified` — not yet known. `in_progress` — GitHub
                          is still computing mergeability. `mergeable` — GitHub
                          reports the PR can be merged. `not_mergeable` — GitHub
                          reports the PR cannot be merged (e.g. merge conflict).
                    required:
                      - requiresImpactedTargets
                      - doesBaseBranchMatch
                      - gitHubMergeability
                    description: >-
                      Readiness signals for a pull request in the merge queue. A
                      PR can start testing when `doesBaseBranchMatch` is true,
                      `gitHubMergeability` is `mergeable`, and (when
                      `requiresImpactedTargets` is true) `hasImpactedTargets` is
                      true.
                  stateChangedAt:
                    type: string
                  priorityValue:
                    type: number
                  priorityName:
                    type: string
                  usedDefaultPriorityName:
                    type: string
                  skipTheLine:
                    type: boolean
                  forceEnqueued:
                    type: boolean
                  isCurrentlySubmittedToQueue:
                    type: boolean
                  prNumber:
                    type: number
                  prTitle:
                    type: string
                  prSha:
                    type: string
                  prBaseBranch:
                    type: string
                  prAuthor:
                    type: string
                required:
                  - stateChangedAt
                  - priorityValue
                  - priorityName
                  - skipTheLine
                  - forceEnqueued
                  - isCurrentlySubmittedToQueue
                  - prNumber
                  - prTitle
                  - prSha
                  - prBaseBranch
                  - prAuthor
        '400':
          description: Bad Request
          content:
            application/plain-text:
              schema:
                type: string
        '401':
          description: Unauthorized
          content:
            application/plain-text:
              schema:
                type: string
        '404':
          description: Not Found
          content:
            application/plain-text:
              schema:
                type: string
        '500':
          description: Internal Server Error
          content:
            application/plain-text:
              schema:
                type: string
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-token

````