> 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.

# Create broken link scans

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

Launches one Broken Links Checker scan per eligible website of an explicit selection (`type: full`), or one scan per website behind specific pages or findings to re-check (`type: page`). A scan takes from minutes to several hours: there is no answer to wait on for it to finish - follow it through "List broken link scans" and read `status` (`pending` while running; `done`, `failed` or `failed_partial` once it ends).

**Body** (JSON), `type` decides the rest - the two scopes never mix:

* `type` (string, required): `full` or `page`.
* `sites` (integer array): required and the only accepted target for `full`; prohibited for `page`. Exact website ids, 1 to 200, scoped to the token's organization.
* `pages` (integer array): only for `page`, required unless `issues` carries at least one id - an empty array is accepted for `pages` when `issues` does. Exact `site-broken-link-pages` ids, 0 to 200.
* `issues` (integer array): only for `page`, required unless `pages` carries at least one id - an empty array is accepted for `issues` when `pages` does. Exact `site-broken-link-issues` ids, 0 to 200 - each resolves to the page(s) it was found on; a page already re-checked through another id in the same call is only scanned once.

Page scan example, an empty companion list accepted alongside the other:

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

Answers **202** with the created `site-broken-link-scans` documents (`status: pending`) and `meta.skipped`: the websites the preflight refused (or, for a page scan, left with nothing to re-check), each with `site_id`, `site_name`, `scan_id` (null here), `reason_code` and `message`. Reason codes: `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 launched between the preflight check and the launch itself), `NOT_FOUND` (a named page or finding already resolved/fixed, or a website left with nothing to re-check because every page it was named through is gone or ignored), `PERMISSION_DENIED` (a page or finding id outside the token's reach, `site_name` null). A page the caller ignored is never re-checked: naming only ignored pages for a website answers that website `NOT_FOUND` as a whole. `data: []` is still a 202.

* **422**: `type` missing or invalid; `sites` sent on a `page` scan or missing/empty/over 200 ids on a `full` one; `pages`/`issues` sent on a `full` scan, or both missing on a `page` one; any list containing an id that resolves to no row.
* **403**: a read-only token.
* **404**: the organization's plan does not include the Broken Links Checker, or the member lacks the permission.

The MCP twin is the `site-broken-link-scans-store` tool; the dashboard API offers the same call at `POST /api/site-broken-link-scans/bulk`. The pre-existing single-website `POST /api/site-broken-link-scans` on the dashboard is a separate, unmigrated endpoint and keeps its own contract.

Reference: https://api.docs.modulards.com/modular-ds-public-api/broken-links-scans/create-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 object, optional)
  - `attributes` (object, optional)
    - `created_at` (string, optional)
    - `current_batch` (double, optional)
    - `error_code` (any, optional, nullable)
    - `error_message` (any, optional, nullable)
    - `finished_at` (any, optional, nullable)
    - `links_enumerated` (double, optional)
    - `links_planned` (double, optional)
    - `method` (string, optional)
    - `pages_enumerated` (double, optional)
    - `pages_planned` (double, optional)
    - `parts_done` (double, optional)
    - `parts_empty` (double, optional)
    - `parts_failed` (double, optional)
    - `parts_total` (double, optional)
    - `site_id` (double, optional)
    - `status` (string, optional)
    - `total_batches` (double, optional)
    - `type` (string, optional)
    - `updated_at` (string, optional)
  - `id` (string, optional)
  - `links` (object, optional)
    - `self` (string, optional)
  - `type` (string, optional)
- `jsonapi` (object, optional)
  - `version` (string, optional)
- `meta` (object, optional)
  - `skipped` (list of object, optional)
    - `message` (string, optional)
    - `reason_code` (string, optional)
    - `scan_id` (any, optional, nullable)
    - `site_id` (double, optional)
    - `site_name` (string, optional)

## Errors

### 403 Forbidden Error

403 Forbidden - Read-only token

- `errors` (list of object, optional)
  - `detail` (string, optional)
  - `source` (object, optional)
    - `parameter` (string, optional)
  - `status` (string, optional)
  - `title` (string, optional)
- `jsonapi` (object, optional)
  - `version` (string, optional)

### 404 Not Found Error

404 - Plan or permission

- `errors` (list of object, optional)
  - `detail` (string, optional)
  - `source` (object, optional)
    - `parameter` (string, optional)
  - `status` (string, optional)
  - `title` (string, optional)
- `jsonapi` (object, optional)
  - `version` (string, optional)

### 422 Unprocessable Entity Error

422 - Mixed scope (sites with a page scan)

- `errors` (list of object, optional)
  - `detail` (string, optional)
  - `source` (object, optional)
    - `parameter` (string, optional)
  - `status` (string, optional)
  - `title` (string, optional)
- `jsonapi` (object, optional)
  - `version` (string, optional)

## Examples

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

**Request**

```json
undefined
```

**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

**Request**

```json
undefined
```

**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
      },
      {
        "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()
```

### Create 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 Create 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 Create 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 Create 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 Create 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 Create 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 Create 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 Create 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 Create 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()
```