---
metadata:
  - name: generator
    content: Diplodoc Platform v5.71.0
alternate:
  - https://vibe.sourcecraft.dev/portal/docs/en/api-ref/Repository-or-PullRequest/GetPullRequestDiff.md
  - https://vibe.sourcecraft.dev/portal/docs/ru/api-ref/Repository-or-PullRequest/GetPullRequestDiff.md
  - https://vibe.sourcecraft.dev/portal/docs/ru/api-ref/Repository-or-PullRequest/GetPullRequestDiff.md
  - href: https://vibe.sourcecraft.dev/portal/docs/ru/api-ref/Repository-or-PullRequest/GetPullRequestDiff.md
    type: text/markdown
    title: Markdown version
  - href: https://vibe.sourcecraft.dev/portal/docs/ru/llms.txt?revision=r22261781
    rel: describedby
---
> **Documentation Index:** Fetch the complete configuration index at https://vibe.sourcecraft.dev/portal/docs/ru/llms.txt?revision=r22261781

<div class="openapi">

# Get Pull Request Diff

<!-- markdownlint-disable-file -->

Returns a link for downloading the complete Git-compatible unified diff for the current pull request iteration.
Public links resolve the latest iteration when downloaded. Signed links pin the iteration
selected when the link is issued and remain usable until expires_at.
Downloads are limited to 300 changed files, 1 MiB total, 500 KiB per encoded file diff
and 20,000 lines.
Exceeding a limit returns HTTP 429 without a partial diff; retrying the same diff will not help.

## Request

<div class="openapi__requests">

<div class="openapi__request__wrapper" style="--method: var(--dc-openapi-methods-get);margin-bottom: 12px">

<div class="openapi__request">

GET {.openapi__method}
```text translate=no
https://api.sourcecraft.tech/repos/{org_slug}/{repo_slug}/pulls/{pull_request_slug}/diff
```

</div>

</div>

</div>

### Path parameters

#|
|| **Name** | **Description** ||
||

_org_slug_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

_Example:_{.json-schema-reset .json-schema-example} ``
{.table-cell}
||
||

_pull_request_slug_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

_Example:_{.json-schema-reset .json-schema-example} ``
{.table-cell}
||
||

_repo_slug_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

_Example:_{.json-schema-reset .json-schema-example} ``
{.table-cell}
||
|#{.json-schema-properties}

## Responses

<div class="openapi__response__code__200">

## 200 OK

A successful response.

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "link": "example",
  "expires_at": "2025-01-01T00:00:00Z"
}
```

{% endcut %}

#|
|| **Name** | **Description** ||
||

_expires_at_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string&lt;date-time&gt;

Expiration time for a signed link. Omitted when the link does not expire.

_Example:_{.json-schema-reset .json-schema-example} `2025-01-01T00:00:00Z`
{.table-cell}
||
||

_link_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

Link for downloading the complete Git-compatible unified diff.
A public link follows the latest iteration at download time.
A signed link pins the iteration selected when this response was created.

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
|#{.json-schema-properties}

</div>

</div>

<div class="openapi__response__code__default">

## default

Both Client Errors (4xx) and Server Errors (5xx) are serialized into this scheme

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "error_code": "example",
  "message": "example",
  "request_id": "example",
  "details": null
}
```

{% endcut %}

#|
|| **Name** | **Description** ||
||

_details_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: unknown

_Example:_{.json-schema-reset .json-schema-example} `null`
{.table-cell}
||
||

_error_code_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_message_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_request_id_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
|#{.json-schema-properties}

</div>

</div>

</div>

[*Deprecated]: No longer supported, please use an alternative and newer version.