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

# Retrieve a pull request

> Retrieve one pull request for the authenticated organization without exposing persistence metadata.



## OpenAPI

````yaml https://api.tembo.io/public-api/openapi/public get /v1/pull-requests/{pullRequestId}
openapi: 3.1.0
info:
  title: Tembo Public API
  description: Public API Endpoints for Tembo
  version: 1.0.0
servers:
  - url: https://api.tembo.io
    description: Tembo API
  - url: https://{deployment-origin}/api/public-api
    description: Self-hosted Tembo
    variables:
      deployment-origin:
        default: tembo.example.com
        description: Hostname of your self-hosted Tembo deployment
security: []
paths:
  /v1/pull-requests/{pullRequestId}:
    get:
      tags:
        - Pull requests
      summary: Retrieve a pull request
      description: >-
        Retrieve one pull request for the authenticated organization without
        exposing persistence metadata.
      operationId: retrievePullRequest
      parameters:
        - in: path
          name: pullRequestId
          schema:
            type: string
            format: uuid
          required: true
      responses:
        '200':
          description: Retrieve a pull request
          content:
            application/json:
              schema:
                type: object
                properties:
                  createdAt:
                    type: string
                    format: date-time
                  description:
                    type:
                      - string
                      - 'null'
                  externalId:
                    type: string
                  externalProvider:
                    type: string
                  id:
                    type: string
                  isDraft:
                    type: boolean
                  mergedAt:
                    type:
                      - string
                      - 'null'
                    format: date-time
                  reviewDecision:
                    type:
                      - string
                      - 'null'
                    enum:
                      - APPROVED
                      - CHANGES_REQUESTED
                      - REVIEW_REQUIRED
                      - null
                  sourceBranch:
                    type:
                      - string
                      - 'null'
                  status:
                    type: string
                    enum:
                      - open
                      - merged
                      - closed
                    default: open
                  title:
                    type:
                      - string
                      - 'null'
                  updatedAt:
                    type: string
                    format: date-time
                  url:
                    type: string
                  author:
                    type: object
                    properties:
                      id:
                        type:
                          - string
                          - 'null'
                      login:
                        type:
                          - string
                          - 'null'
                      name:
                        type:
                          - string
                          - 'null'
                      avatarUrl:
                        type:
                          - string
                          - 'null'
                      profileUrl:
                        type:
                          - string
                          - 'null'
                    required:
                      - id
                      - login
                      - name
                      - avatarUrl
                      - profileUrl
                    additionalProperties: false
                  baseBranch:
                    type:
                      - string
                      - 'null'
                  codeRepository:
                    type:
                      - object
                      - 'null'
                    properties:
                      id:
                        type: string
                        format: uuid
                      name:
                        type: string
                      url:
                        type: string
                      owner:
                        type:
                          - string
                          - 'null'
                      targetBranch:
                        type:
                          - string
                          - 'null'
                      baseBranch:
                        type:
                          - string
                          - 'null'
                      provider:
                        type: string
                    required:
                      - id
                      - name
                      - url
                      - owner
                      - targetBranch
                      - baseBranch
                      - provider
                    additionalProperties: false
                  diff:
                    type:
                      - object
                      - 'null'
                    properties:
                      additions:
                        type: integer
                        minimum: 0
                      deletions:
                        type: integer
                        minimum: 0
                      data:
                        type: string
                    required:
                      - additions
                      - deletions
                      - data
                    additionalProperties: false
                  headSha:
                    type:
                      - string
                      - 'null'
                  number:
                    type:
                      - integer
                      - 'null'
                    exclusiveMinimum: 0
                  owner:
                    type:
                      - string
                      - 'null'
                  reviewers:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        login:
                          type: string
                        name:
                          type: string
                        avatarUrl:
                          type:
                            - string
                            - 'null'
                        profileUrl:
                          type:
                            - string
                            - 'null'
                        type:
                          type: string
                          enum:
                            - bot
                            - user
                        reviewRequested:
                          type: boolean
                        commented:
                          type: boolean
                        approved:
                          type: boolean
                        state:
                          type: string
                          enum:
                            - approved
                            - changes_requested
                            - commented
                            - awaiting
                        changesRequested:
                          type: boolean
                        awaitingReview:
                          type: boolean
                      required:
                        - id
                        - login
                        - name
                        - avatarUrl
                        - profileUrl
                        - reviewRequested
                        - commented
                        - approved
                      additionalProperties: false
                  state:
                    type: string
                    enum:
                      - approved
                      - needs review
                      - draft
                      - merged
                      - closed
                  task:
                    type:
                      - object
                      - 'null'
                    properties:
                      id:
                        type: string
                        format: uuid
                      title:
                        type: string
                      kind:
                        type: string
                      htmlUrl:
                        type: string
                      visibility:
                        type: string
                        enum:
                          - private
                          - public
                    required:
                      - id
                      - title
                      - kind
                      - htmlUrl
                    additionalProperties: false
                required:
                  - createdAt
                  - description
                  - externalId
                  - externalProvider
                  - id
                  - isDraft
                  - mergedAt
                  - reviewDecision
                  - sourceBranch
                  - status
                  - title
                  - updatedAt
                  - url
                  - author
                  - baseBranch
                  - codeRepository
                  - diff
                  - headSha
                  - number
                  - owner
                  - reviewers
                  - state
                  - task
                additionalProperties: false
        '400':
          description: Invalid request or resource scope
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                additionalProperties: false
        '403':
          description: The caller is not permitted to perform this operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                additionalProperties: false
        '404':
          description: Pull request not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                additionalProperties: false
        '409':
          description: Pull request conflicts with an existing resource
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                additionalProperties: false
        '500':
          description: Pull request operation failed
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                additionalProperties: false
        '502':
          description: Repository provider operation failed
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                additionalProperties: false
      security:
        - apiKey: []
components:
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer

````