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

# Sync a pull request

> Syncs a pull request object. This action is useful when the pull request has been updated and needs to be
fetched again from the source repository.

> Note: This action is not required as pull requests are automatically synced when they are updated. Only use
> this action if you need to manually trigger the synchronisation when you disabled webhooks for the repository
> either in the source repository or in the application settings.



## OpenAPI

````yaml api-reference/api.json put /2025-04/pull-requests/{pullRequest}/sync
openapi: 3.1.0
info:
  title: PullRule
  version: 0.0.1
servers:
  - url: https://pullrule.com/api
    description: Production
security:
  - http: []
tags:
  - name: Account
  - name: Members
  - name: Pull requests
  - name: Rules
  - name: Users
paths:
  /2025-04/pull-requests/{pullRequest}/sync:
    put:
      tags:
        - Pull requests
      summary: Sync a pull request
      description: >-
        Syncs a pull request object. This action is useful when the pull request
        has been updated and needs to be

        fetched again from the source repository.


        > Note: This action is not required as pull requests are automatically
        synced when they are updated. Only use

        > this action if you need to manually trigger the synchronisation when
        you disabled webhooks for the repository

        > either in the source repository or in the application settings.
      operationId: v202504.pull-requests.sync
      parameters:
        - name: pullRequest
          in: path
          required: true
          description: The unique identifier of the pull request.
          schema:
            type: string
      responses:
        '200':
          description: '`PullRequest`'
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/PullRequest'
                required:
                  - data
        '401':
          $ref: '#/components/responses/AuthenticationException'
        '403':
          $ref: '#/components/responses/AuthorizationException'
        '404':
          $ref: '#/components/responses/ModelNotFoundException'
components:
  schemas:
    PullRequest:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the object.
        external_id:
          type: string
          description: The id of the pull request in the external system.
        number:
          type: integer
          description: The pull-request number.
        url:
          type: string
          description: The URL to the pull request.
        state:
          $ref: '#/components/schemas/PullRequestState'
          description: The state of the pull request.
        title:
          type: string
          description: The title of the pull request.
        body:
          type: string
          description: The body of the pull request.
        additions:
          type: integer
          description: The number of additions in the pull request.
        deletions:
          type: integer
          description: The number of deletions in the pull request.
        commits:
          type: integer
          description: The number of changed files in the pull request.
        changed_files:
          type: integer
          description: The number of changed files in the pull request.
        score:
          type: integer
          description: The score of the pull request.
        score_breakdown:
          type: array
          description: The breakdown of the score of the pull request.
          items:
            $ref: '#/components/schemas/PullRequestScore'
        created_at:
          type: integer
          description: >-
            'score_breakdown' => $this->pullRequestScores->map(

            fn ($score) => new PullRequestScoreResource($score),

            ),

            Time at which the object was created. Measured in seconds since the
            Unix epoch.
        links:
          type: object
          properties:
            member:
              type: string
              description: A reference to the member who created the pull request.
          required:
            - member
      required:
        - id
        - external_id
        - number
        - url
        - state
        - title
        - body
        - additions
        - deletions
        - commits
        - changed_files
        - score
        - score_breakdown
        - created_at
        - links
      title: PullRequest
    PullRequestState:
      type: string
      enum:
        - closed
        - draft
        - merged
        - open
      title: PullRequestState
    PullRequestScore:
      type: object
      properties:
        name:
          type: string
          description: The name of the rule that generated the score.
        action:
          $ref: '#/components/schemas/RuleEffectAction'
          description: The action taken by the rule.
        effect:
          type: integer
          description: The effect that was applied by the rule.
        expression:
          type: string
          description: The expression that was evaluated by the rule.
      required:
        - name
        - action
        - effect
        - expression
      title: PullRequestScore
    RuleEffectAction:
      type: string
      enum:
        - ADD
        - SUBTRACT
      title: RuleEffectAction
  responses:
    AuthenticationException:
      description: Unauthenticated
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    AuthorizationException:
      description: Authorization error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    ModelNotFoundException:
      description: Not found
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
  securitySchemes:
    http:
      type: http
      scheme: bearer

````