> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://api.docs.modulards.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://api.docs.modulards.com/_mcp/server.

# Launch broken link scans

POST https://api.modulards.com/api/public/v1/site-broken-link-scans
Content-Type: application/json

Starts a Broken Links Checker scan: a full crawl of the websites you list in `sites` (`type: full`), or a re-check of specific pages or issues (`type: page`). A scan takes from minutes to several hours: follow it with "List broken link scans" and read `status`.

`type` decides the rest, and the two scopes never mix. A page scan looks like this, with an empty companion list accepted alongside the other:

```json
{
    "type": "page",
    "pages": [501],
    "issues": []
}
```

The work finishes later: see [Writes and asynchronous operations](https://api.docs.modulards.com/writes-and-asynchronous-operations). Websites that cannot be processed are reported in `meta.skipped`, each with a `reason_code` and a message, and do not fail the call. Their `scan_id` is always null. For a page scan, a website left with nothing to re-check is skipped too. The codes are `SITE_UNREACHABLE` (not connected, or has not synchronized in the last 48 hours), `UNSUPPORTED` (no Broken Links Checker configuration assigned, or the website's Modular Connector is too old to check links: update it), `CONFLICT` (a scan is already running for this website, including one that started while your request was being processed), `NOT_FOUND` (a named page or issue already resolved, or a website left with nothing to re-check because every page it was named through is gone or ignored) and `PERMISSION_DENIED` (a page or issue id outside your token's reach, with a null `site_name`). A page you ignored is never re-checked: naming only ignored pages for a website skips that website as `NOT_FOUND`.

Your role must be allowed to launch Broken Links Checker scans; without it the request answers 404.

**Body**

* `type` (`full` or `page`, required): what to scan.
* `sites` (array of integers, required for `full`): ids of the websites to act on, 1 to 50. Not allowed for `page`.
* `pages` (array of integers, only for `page`): ids from "List broken link pages", 0 to 200. Required unless `issues` carries at least one id, and an empty array is accepted when `issues` has ids.
* `issues` (array of integers, only for `page`): ids from "List broken link issues", 0 to 200. Required unless `pages` carries at least one id, and an empty array is accepted when `pages` has ids. Each id resolves to the pages it was found on, and a page reached through several ids in the same call is scanned once.

**Errors**

* **422**: `type` is missing or invalid; `sites` is sent on a `page` scan, or is missing, empty or over 50 ids on a `full` one; `pages` or `issues` is sent on a `full` scan, or both are missing on a `page` one; an id does not exist.

Reference: https://api.docs.modulards.com/modular-ds-public-api/broken-links-checker/broken-links-scans/launch-broken-link-scans

## Authentication

- `Authorization` header (bearer token, required) — Personal access token created in the Modular DS dashboard; read-only tokens can only call GET endpoints.

## Request

### Body (application/json)

This endpoint expects an object.

- `sites` (list of double, optional)
- `type` (string, optional)

## Response

### 202

202 Accepted - one scan launched, one website skipped / 202 Accepted - page scan, mixed skips

- `data` (list of ApiPublicV1SiteBrokenLinkScansPostResponsesContentApplicationJsonSchemaDataItems, optional)
- `jsonapi` (ApiPublicV1SiteBrokenLinkScansPostResponsesContentApplicationJsonSchemaJsonapi, optional)
- `meta` (ApiPublicV1SiteBrokenLinkScansPostResponsesContentApplicationJsonSchemaMeta, optional)

## Errors

### 404 Not Found Error

404 - Plan or permission

- `errors` (list of ApiPublicV1SiteBrokenLinkScansPostResponsesContentApplicationJsonSchemaErrorsItems, optional)
- `jsonapi` (ApiPublicV1SiteBrokenLinkScansPostResponsesContentApplicationJsonSchemaJsonapi, optional)

### 422 Unprocessable Entity Error

422 - Mixed scope (sites with a page scan)

- `errors` (list of ApiPublicV1SiteBrokenLinkScansPostResponsesContentApplicationJsonSchemaErrorsItems, optional)
- `jsonapi` (ApiPublicV1SiteBrokenLinkScansPostResponsesContentApplicationJsonSchemaJsonapi, optional)

## Types

### ApiPublicV1SiteBrokenLinkScansPostResponsesContentApplicationJsonSchemaDataItems

- `attributes` (ApiPublicV1SiteBrokenLinkScansPostResponsesContentApplicationJsonSchemaDataItemsAttributes, optional)
- `id` (string, optional)
- `links` (ApiPublicV1SiteBrokenLinkScansPostResponsesContentApplicationJsonSchemaDataItemsLinks, optional)
- `type` (string, optional)

### ApiPublicV1SiteBrokenLinkScansPostResponsesContentApplicationJsonSchemaJsonapi

- `version` (string, optional)

### ApiPublicV1SiteBrokenLinkScansPostResponsesContentApplicationJsonSchemaMeta

- `skipped` (list of ApiPublicV1SiteBrokenLinkScansPostResponsesContentApplicationJsonSchemaMetaSkippedItems, optional)

### ApiPublicV1SiteBrokenLinkScansPostResponsesContentApplicationJsonSchemaErrorsItems

- `detail` (string, optional)
- `source` (ApiPublicV1SiteBrokenLinkScansPostResponsesContentApplicationJsonSchemaErrorsItemsSource, optional)
- `status` (string, optional)
- `title` (string, optional)

### ApiPublicV1SiteBrokenLinkScansPostResponsesContentApplicationJsonSchemaDataItemsAttributes

- `created_at` (datetime, optional) — When the scan was created.
- `current_batch` (integer, optional) — Batch being processed; 0 until the plugin reports.
- `error_code` (string, optional, nullable) — Failure code; null unless the scan failed.
- `error_message` (string, optional, nullable) — Failure message; null unless the scan failed.
- `finished_at` (datetime, optional, nullable) — When the scan ended; null while it runs.
- `links_enumerated` (integer, optional) — Links found by discovery.
- `links_planned` (integer, optional) — Links planned for checking, updated while the scan runs.
- `method` (enum, optional) — How the scan started: `manual`, `automatic` for a scheduled one, or `force_first` for the first automatic scan of a website.
  - Allowed values: `manual`, `automatic`, `force_first`
- `pages_enumerated` (integer, optional) — Pages found by discovery.
- `pages_planned` (integer, optional) — Pages planned for checking, updated while the scan runs.
- `parts_done` (integer, optional) — Crawl parts finished.
- `parts_empty` (integer, optional) — Crawl parts that found nothing to check.
- `parts_failed` (integer, optional) — Crawl parts that failed.
- `parts_total` (integer, optional) — Crawl parts planned.
- `site_id` (integer, optional) — Id of the website that was scanned.
- `status` (enum, optional) — How the scan ended: pending while it runs, done, failed, or failed_partial when some content types finished and others failed.
  - Allowed values: `pending`, `done`, `failed`, `failed_partial`
- `total_batches` (integer, optional) — Batches the scan is split in.
- `type` (enum, optional) — Scope of the scan: full covers every published content type, page only the pages named when it was launched.
  - Allowed values: `full`, `page`
- `updated_at` (string, optional)

### ApiPublicV1SiteBrokenLinkScansPostResponsesContentApplicationJsonSchemaDataItemsLinks

- `self` (string, optional)

### ApiPublicV1SiteBrokenLinkScansPostResponsesContentApplicationJsonSchemaMetaSkippedItems

- `message` (string, optional) — Human-readable explanation.
- `reason_code` (enum, optional) — Why it was refused: SITE_UNREACHABLE, UNSUPPORTED, CONFLICT, NOT_FOUND or PERMISSION_DENIED.
  - Allowed values: `SITE_UNREACHABLE`, `UNSUPPORTED`, `CONFLICT`, `NOT_FOUND`, `PERMISSION_DENIED`
- `scan_id` (integer, optional, nullable) — Always null: a refused website has no scan.
- `site_id` (integer, optional) — Id of a website that was refused.
- `site_name` (string, optional, nullable) — Name of that website; null when the id is outside your token's reach.

### ApiPublicV1SiteBrokenLinkScansPostResponsesContentApplicationJsonSchemaErrorsItemsSource

- `parameter` (string, optional)

## Examples

### 202 Accepted - one scan launched, one website skipped

**Response**

```json
{
  "data": [
    {
      "attributes": {
        "created_at": "2026-09-17T18:00:00.000000Z",
        "current_batch": 0,
        "error_code": null,
        "error_message": null,
        "finished_at": null,
        "links_enumerated": 0,
        "links_planned": 0,
        "method": "manual",
        "pages_enumerated": 0,
        "pages_planned": 0,
        "parts_done": 0,
        "parts_empty": 0,
        "parts_failed": 0,
        "parts_total": 0,
        "site_id": 12,
        "status": "pending",
        "total_batches": 0,
        "type": "full",
        "updated_at": "2026-09-17T18:00:00.000000Z"
      },
      "id": "5003",
      "links": {
        "self": "{{base_url}}/api/public/v1/site-broken-link-scans/5003"
      },
      "type": "site-broken-link-scans"
    }
  ],
  "jsonapi": {
    "version": "1.1"
  },
  "meta": {
    "skipped": [
      {
        "message": "This website is not connected; connect it first.",
        "reason_code": "SITE_UNREACHABLE",
        "scan_id": null,
        "site_id": 13,
        "site_name": "Blog"
      }
    ]
  }
}
```

**SDK Code**

```python 202 Accepted - one scan launched, one website skipped
import requests

url = "https://api.modulards.com/api/public/v1/site-broken-link-scans"

headers = {"Authorization": "Bearer <token>"}

response = requests.post(url, headers=headers)

print(response.json())
```

```javascript 202 Accepted - one scan launched, one website skipped
const url = 'https://api.modulards.com/api/public/v1/site-broken-link-scans';
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go 202 Accepted - one scan launched, one website skipped
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.modulards.com/api/public/v1/site-broken-link-scans"

	req, _ := http.NewRequest("POST", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby 202 Accepted - one scan launched, one website skipped
require 'uri'
require 'net/http'

url = URI("https://api.modulards.com/api/public/v1/site-broken-link-scans")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java 202 Accepted - one scan launched, one website skipped
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.modulards.com/api/public/v1/site-broken-link-scans")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php 202 Accepted - one scan launched, one website skipped
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.modulards.com/api/public/v1/site-broken-link-scans', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp 202 Accepted - one scan launched, one website skipped
using RestSharp;

var client = new RestClient("https://api.modulards.com/api/public/v1/site-broken-link-scans");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift 202 Accepted - one scan launched, one website skipped
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.modulards.com/api/public/v1/site-broken-link-scans")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### 202 Accepted - page scan, mixed skips

**Response**

```json
{
  "data": [
    {
      "attributes": {
        "created_at": "2026-09-17T18:00:00.000000Z",
        "current_batch": 0,
        "error_code": null,
        "error_message": null,
        "finished_at": null,
        "links_enumerated": 0,
        "links_planned": 0,
        "method": "manual",
        "pages_enumerated": 0,
        "pages_planned": 0,
        "parts_done": 0,
        "parts_empty": 0,
        "parts_failed": 0,
        "parts_total": 0,
        "site_id": 12,
        "status": "pending",
        "total_batches": 0,
        "type": "page",
        "updated_at": "2026-09-17T18:00:00.000000Z"
      },
      "id": "5004",
      "links": {
        "self": "{{base_url}}/api/public/v1/site-broken-link-scans/5004"
      },
      "type": "site-broken-link-scans"
    }
  ],
  "jsonapi": {
    "version": "1.1"
  },
  "meta": {
    "skipped": [
      {
        "message": "Page 502 is outside your access; it was not touched.",
        "reason_code": "PERMISSION_DENIED",
        "scan_id": null,
        "site_name": null
      },
      {
        "message": "None of the pages of this website are still available to check.",
        "reason_code": "NOT_FOUND",
        "scan_id": null,
        "site_id": 13,
        "site_name": "Blog"
      }
    ]
  }
}
```

**SDK Code**

```python 202 Accepted - page scan, mixed skips
import requests

url = "https://api.modulards.com/api/public/v1/site-broken-link-scans"

headers = {"Authorization": "Bearer <token>"}

response = requests.post(url, headers=headers)

print(response.json())
```

```javascript 202 Accepted - page scan, mixed skips
const url = 'https://api.modulards.com/api/public/v1/site-broken-link-scans';
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go 202 Accepted - page scan, mixed skips
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.modulards.com/api/public/v1/site-broken-link-scans"

	req, _ := http.NewRequest("POST", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby 202 Accepted - page scan, mixed skips
require 'uri'
require 'net/http'

url = URI("https://api.modulards.com/api/public/v1/site-broken-link-scans")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java 202 Accepted - page scan, mixed skips
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.modulards.com/api/public/v1/site-broken-link-scans")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php 202 Accepted - page scan, mixed skips
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.modulards.com/api/public/v1/site-broken-link-scans', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp 202 Accepted - page scan, mixed skips
using RestSharp;

var client = new RestClient("https://api.modulards.com/api/public/v1/site-broken-link-scans");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift 202 Accepted - page scan, mixed skips
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.modulards.com/api/public/v1/site-broken-link-scans")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Launch broken link scans

**Request**

```json
{
  "sites": [
    12,
    13
  ],
  "type": "full"
}
```

**Response**

```json
{
  "data": [
    {
      "attributes": {
        "created_at": "2026-09-17T18:00:00.000000Z",
        "current_batch": 0,
        "error_code": null,
        "error_message": null,
        "finished_at": null,
        "links_enumerated": 0,
        "links_planned": 0,
        "method": "manual",
        "pages_enumerated": 0,
        "pages_planned": 0,
        "parts_done": 0,
        "parts_empty": 0,
        "parts_failed": 0,
        "parts_total": 0,
        "site_id": 12,
        "status": "pending",
        "total_batches": 0,
        "type": "full",
        "updated_at": "2026-09-17T18:00:00.000000Z"
      },
      "id": "5003",
      "links": {
        "self": "{{base_url}}/api/public/v1/site-broken-link-scans/5003"
      },
      "type": "site-broken-link-scans"
    }
  ],
  "jsonapi": {
    "version": "1.1"
  },
  "meta": {
    "skipped": [
      {
        "message": "This website is not connected; connect it first.",
        "reason_code": "SITE_UNREACHABLE",
        "scan_id": null,
        "site_id": 13,
        "site_name": "Blog"
      }
    ]
  }
}
```

**SDK Code**

```python Launch broken link scans
import requests

url = "https://api.modulards.com/api/public/v1/site-broken-link-scans"

payload = {
    "sites": [12, 13],
    "type": "full"
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Launch broken link scans
const url = 'https://api.modulards.com/api/public/v1/site-broken-link-scans';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"sites":[12,13],"type":"full"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Launch broken link scans
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.modulards.com/api/public/v1/site-broken-link-scans"

	payload := strings.NewReader("{\n  \"sites\": [\n    12,\n    13\n  ],\n  \"type\": \"full\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Launch broken link scans
require 'uri'
require 'net/http'

url = URI("https://api.modulards.com/api/public/v1/site-broken-link-scans")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"sites\": [\n    12,\n    13\n  ],\n  \"type\": \"full\"\n}"

response = http.request(request)
puts response.read_body
```

```java Launch broken link scans
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.modulards.com/api/public/v1/site-broken-link-scans")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"sites\": [\n    12,\n    13\n  ],\n  \"type\": \"full\"\n}")
  .asString();
```

```php Launch broken link scans
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.modulards.com/api/public/v1/site-broken-link-scans', [
  'body' => '{
  "sites": [
    12,
    13
  ],
  "type": "full"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp Launch broken link scans
using RestSharp;

var client = new RestClient("https://api.modulards.com/api/public/v1/site-broken-link-scans");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"sites\": [\n    12,\n    13\n  ],\n  \"type\": \"full\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Launch broken link scans
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "sites": [12, 13],
  "type": "full"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.modulards.com/api/public/v1/site-broken-link-scans")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```