> ## 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.

# List pull requests

> List pull requests for the authenticated organization with cursor pagination.



## OpenAPI

````yaml https://api.tembo.io/public-api/openapi/public get /v1/pull-requests
openapi: 3.1.0
info:
  title: Tembo Public API
  description: >-
    Manage agents, sessions, repositories, and organization resources with the
    Tembo API.
  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:
    get:
      tags:
        - Pull requests
      summary: List pull requests
      description: >-
        List pull requests for the authenticated organization with cursor
        pagination.
      operationId: listPullRequests
      parameters:
        - in: query
          name: authorIds
          schema:
            type: array
            items:
              type: string
              minLength: 1
            default: []
          description: >-
            Filter authors by comma-separated provider:identifier values, such
            as github:octocat.
        - in: query
          name: createdAfter
          schema:
            type: string
            format: date-time
          description: Only pull requests created after this ISO 8601 timestamp.
        - in: query
          name: cursor
          schema:
            type: string
            format: uuid
          description: >-
            Continuation cursor from the previous response nextCursor. Omit for
            the first page; null nextCursor means there are no more pages.
        - in: query
          name: limit
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 50
          description: >-
            Maximum number of items to return in one page. Use nextCursor from
            the response to fetch more items.
        - in: query
          name: excludeAuthorIds
          schema:
            type: array
            items:
              type: string
              minLength: 1
            default: []
          description: Exclude authors by comma-separated provider:identifier values.
        - in: query
          name: excludeOrganizationName
          schema:
            type: string
            minLength: 1
          description: >-
            Exclude pull requests from the named organization within the caller
            access scope.
        - in: query
          name: excludeReturnedAuthorIds
          schema:
            type: array
            items:
              type: string
              minLength: 1
            default: []
          description: >-
            Exclude returned pull requests by these comma-separated
            provider:identifier author values.
        - in: query
          name: excludeReviewerIds
          schema:
            type: array
            items:
              type: string
              minLength: 1
            default: []
          description: >-
            Exclude pull requests assigned to these comma-separated reviewer
            identifiers.
        - in: query
          name: hasTemboSession
          schema:
            type: boolean
          description: When true, only return pull requests with a linked Tembo session.
        - in: query
          name: includeAuthors
          schema:
            type: boolean
          description: >-
            Request author filter options. Public responses do not include
            organization-wide author options.
        - in: query
          name: includeTotal
          schema:
            type: boolean
          description: Include the total count of matching pull requests.
        - in: query
          name: includeStacks
          schema:
            type: boolean
          description: >-
            Include each open pull request's position in its stack of dependent
            pull requests. Public responses do not include stacks.
        - in: query
          name: repositoryIds
          schema:
            type: array
            items:
              type: string
              minLength: 1
            default: []
          description: Filter by repository IDs, supplied as a comma-separated list.
        - in: query
          name: reviewerIds
          schema:
            type: array
            items:
              type: string
              minLength: 1
            default: []
          description: >-
            Filter by assigned reviewer identifiers, supplied as a
            comma-separated list.
        - in: query
          name: mergedAfter
          schema:
            type: string
            format: date-time
          description: Only pull requests merged after this ISO 8601 timestamp.
        - in: query
          name: search
          schema:
            type: string
            minLength: 1
          description: Search pull requests.
        - in: query
          name: sortBy
          schema:
            type: string
            enum:
              - createdAt
              - updatedAt
          description: Sort by creation time or last update time.
        - in: query
          name: state
          schema:
            type: string
            enum:
              - open
              - returned
              - approved
              - needs review
              - draft
              - merged
              - closed
          description: >-
            Filter by lifecycle or review state, including open, returned,
            approved, needs review, draft, merged, or closed.
        - in: query
          name: updatedAfter
          schema:
            type: string
            format: date-time
          description: Only pull requests updated after this ISO 8601 timestamp.
      responses:
        '200':
          description: List pull requests
          content:
            application/json:
              schema:
                type: object
                properties:
                  items:
                    type: array
                    items:
                      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
                        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
                        approvers:
                          type: array
                          items:
                            type: object
                            properties:
                              login:
                                type: string
                              avatarUrl:
                                type:
                                  - string
                                  - 'null'
                            required:
                              - login
                              - avatarUrl
                            additionalProperties: false
                        diff:
                          type:
                            - object
                            - 'null'
                          properties:
                            additions:
                              type: integer
                              minimum: 0
                            deletions:
                              type: integer
                              minimum: 0
                          required:
                            - additions
                            - deletions
                          additionalProperties: false
                        session:
                          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
                        - headSha
                        - number
                        - owner
                        - reviewers
                        - state
                        - approvers
                        - diff
                        - session
                      additionalProperties: false
                  nextCursor:
                    type:
                      - string
                      - 'null'
                    format: uuid
                  totalCount:
                    type: integer
                    minimum: 0
                required:
                  - items
                  - nextCursor
                additionalProperties: false
        '400':
          description: >-
            Invalid request or missing required organization or user
            information.
          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: []
      x-codeSamples:
        - lang: typescript
          label: TypeScript SDK
          source: |
            import Tembo from '@tembo-io/sdk';

            const client = new Tembo();

            const pullRequest = await client.pullRequests.list({
              limit: 50,
            });
        - lang: rust
          label: Rust SDK
          source: |
            use tembo_rs::*;

            let client = Tembo::from_env()?;

            let response = client.pull_requests().list().send().await?;
components:
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer

````

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