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

# /bitbucket/pullrequests

> Get a Bitbucket pull request by URL or 'workspace/repo#id'

**Price:** 1 credit

**⚠️ Common errors:** 412: Pull request not found



## OpenAPI

````yaml /openapi/developer-data.json post /api/bitbucket/pullrequests
openapi: 3.1.0
info:
  title: Any Site API
  description: >+
    Any Site API provides programmatic access to data from LinkedIn, Instagram,
    Twitter, and other platforms.


    ## Authentication


    All API endpoints require an `access-token` header with a valid API token.
    Tokens can be created in the [dashboard](https://app.anysite.io/).


    ## Pricing


    Each endpoint has a credit cost listed in its description. Credits are
    deducted from your token balance per request.

  version: 0.0.1
servers: []
security:
  - AccessToken: []
paths:
  /api/bitbucket/pullrequests:
    post:
      tags:
        - /bitbucket
      summary: /bitbucket/pullrequests
      description: |-
        Get a Bitbucket pull request by URL or 'workspace/repo#id'

        **Price:** 1 credit

        **⚠️ Common errors:** 412: Pull request not found
      operationId: __api_bitbucket_pullrequests_post
      parameters:
        - name: access-token
          in: header
          required: true
          schema:
            anyOf:
              - type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BitbucketPullRequestPayload'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/BitbucketPullRequest'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    BitbucketPullRequestPayload:
      properties:
        timeout:
          type: integer
          maximum: 1500
          minimum: 20
          default: 300
        pull:
          type: string
          minLength: 1
      type: object
      required:
        - pull
    BitbucketPullRequest:
      properties:
        '@type':
          type: string
          default: BitbucketPullRequest
        id:
          type: integer
        pull_title:
          type: string
          default: ''
        text:
          anyOf:
            - type: string
            - type: 'null'
        state:
          type: string
          default: ''
        is_draft:
          type: boolean
          default: false
        comment_count:
          type: integer
          default: 0
        task_count:
          type: integer
          default: 0
        close_source_branch:
          type: boolean
          default: false
        created_at:
          type: string
          default: ''
        updated_at:
          type: string
          default: ''
        author:
          anyOf:
            - $ref: '#/components/schemas/BitbucketAccount'
            - type: 'null'
        closed_by:
          anyOf:
            - $ref: '#/components/schemas/BitbucketAccount'
            - type: 'null'
        merge_commit_hash:
          anyOf:
            - type: string
            - type: 'null'
        reason:
          type: string
          default: ''
        source_branch:
          type: string
          default: ''
        source_commit_hash:
          type: string
          default: ''
        source_repository_alias:
          anyOf:
            - type: string
            - type: 'null'
        destination_branch:
          type: string
          default: ''
        destination_commit_hash:
          type: string
          default: ''
        destination_repository_alias:
          anyOf:
            - type: string
            - type: 'null'
        reviewers:
          items:
            $ref: '#/components/schemas/BitbucketAccount'
          type: array
          default: []
        participants:
          items:
            $ref: '#/components/schemas/BitbucketParticipant'
          type: array
          default: []
        web_url:
          type: string
          default: ''
      type: object
      required:
        - id
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
      type: object
    BitbucketAccount:
      properties:
        '@type':
          type: string
          default: BitbucketAccount
        uuid:
          type: string
          default: ''
        display_name:
          type: string
          default: ''
        nickname:
          anyOf:
            - type: string
            - type: 'null'
        account_id:
          anyOf:
            - type: string
            - type: 'null'
        account_type:
          type: string
          default: ''
        account_status:
          anyOf:
            - type: string
            - type: 'null'
        is_staff:
          type: boolean
          default: false
        location:
          anyOf:
            - type: string
            - type: 'null'
        created_at:
          anyOf:
            - type: string
            - type: 'null'
        image:
          anyOf:
            - type: string
            - type: 'null'
        web_url:
          type: string
          default: ''
      type: object
    BitbucketParticipant:
      properties:
        '@type':
          type: string
          default: BitbucketParticipant
        user:
          anyOf:
            - $ref: '#/components/schemas/BitbucketAccount'
            - type: 'null'
        role:
          type: string
          default: ''
        approved:
          type: boolean
          default: false
        state:
          anyOf:
            - type: string
            - type: 'null'
        participated_at:
          anyOf:
            - type: string
            - type: 'null'
      type: object
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
        msg:
          type: string
        type:
          type: string
        input: {}
        ctx:
          type: object
      type: object
      required:
        - loc
        - msg
        - type
  securitySchemes:
    AccessToken:
      type: apiKey
      in: header
      name: access-token
      description: API token from the dashboard

````