---
title: "List changed source files"
method: GET
path: "/websiteSourceCode/changes"
tags: ["Source code"]
---

# List changed source files

`GET /websiteSourceCode/changes`

## Request

- Base URL: `https://api.cactal.ai/v1`
- URL: `https://api.cactal.ai/v1/websiteSourceCode/changes`
- Auth: HTTP bearer

Lists added, removed, and modified file identities between two version refs, defaulting from published to head. Results use cursor pagination; pin continuation requests to the resolved version numbers.

## Query parameters

- `websiteId` string, required
- `from` string: Base side of the diff: a version number, `head`, or `published`. Defaults to `published`.
- `to` string: Target side of the diff: a version number, `head`, or `published`. Defaults to `head`.
- `cursor` string: Opaque cursor from the previous page. Continue with the returned resolved versions to keep the comparison pinned.
- `limit` integer: Maximum candidate files to compare. Defaults to 20 and cannot exceed 20.

## Response `200`

A page of changed file identities.

- object
  - `items` object[], required
    - `type` 'page' | 'component' | 'module' | 'server_function' | 'global_css' | 'not_found' | 'website_config' | 'custom_head_start' | 'custom_head_end' | 'custom_body_start' | 'custom_body_end', required: File type.
    - `name` string, required: File name.
    - `status` 'added' | 'removed' | 'modified', required: How the file changed from `fromVersion` to `toVersion`.
  - `nextCursor` string, nullable, required: Opaque cursor for the next page. Pass it as the `cursor` parameter on the next request. `null` when this is the last page.
  - `websiteId` string, required: Id of the website.
  - `fromVersion` integer, required: Resolved base version. Pass it as `from` when continuing.
  - `toVersion` integer, required: Resolved target version. Pass it as `to` when continuing.

## Other responses

- `400`: Validation failed. The response `message` names the first invalid field.
- `401`: Missing, invalid, expired, or revoked API key.
- `403`: The authenticated principal lacks the required capability.
- `404`: The resource does not exist or is outside the principal’s access scope.
- `429`: Rate limit exceeded. Retry after the number of seconds in the `Retry-After` header.

---

[API](https://skmtc.dev/cactal/apis/cactal-api.md) · [All operations](https://skmtc.dev/cactal/apis/cactal-api/llms.txt) · [OpenAPI document](https://skmtc.dev/cactal/apis/cactal-api/revisions/9cd0fb5eacdd?raw)
