---
title: "Get source version summary"
method: GET
path: "/websiteSourceCode/summary"
tags: ["Source code"]
---

# Get source version summary

`GET /websiteSourceCode/summary`

## Request

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

Returns `headVersion`, `publishedVersion`, and whether the website has unpublished source changes.

## Query parameters

- `websiteId` string, required

## Response `200`

Draft and published version summary for the website.

- object
  - `websiteId` string, required: Id of the website.
  - `headVersion` integer, required: Current draft source version. Starts at 1 and increments with every content-changing edit.
  - `publishedVersion` integer, nullable, required: Source version currently published. `null` when the website has never been published.
  - `hasUnpublishedChanges` boolean, required: Whether head differs from the published version (always `true` before the first publish).

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