> ## Documentation Index
> Fetch the complete documentation index at: https://wiki.darknetsearch.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Brand assessment reports

> Create report templates with your logo, colors, company name and footer, and apply them to the reports an assessment produces or that you generate.

A report template puts your own branding on Attack Surface assessment reports: a logo, colors, a company name, a font and a footer. Each organization keeps its own templates. To brand reports per client, create one template per client and name it on each call. A client workspace keeps templates of its own.

You create a template once, then name it by its `uid` each time you start an assessment or generate a report. In the dashboard, templates are on the **Report branding** tab of **Exposure → Risk Assessments**, and the wizard that starts an assessment has a **Branding** step where you pick, create or edit the template for that assessment's report.

### Availability and cost

**Availability:** Attack Surface Reports or Targeted Attack Surface Reports, included in every edition. Either feature opens every endpoint on this page.

**Cost:** no metered allowance. Templates use none of your Attack Surface allowances and have no limit on how many you keep. With an API key, each call that returns `2xx` counts once toward your monthly API Calls allowance. Any other status is refunded. See [Rate limits](https://wiki.darknetsearch.com/api/guides/rate-limits.md).

Without either feature, every call on this page returns `403` with `{"detail": "This feature is not included in your plan."}`. A lapsed license returns the same message here. These endpoints never return the allowance `429` or a capacity `409`. See [Plans and quotas](https://wiki.darknetsearch.com/api/guides/plans-and-quotas).

### Template fields

| Field | Value | Default |
| - | - | - |
| `name` | Required. Up to 255 characters. Unique in your organization. | None |
| `mode` | The page style: `dark` for light text on black pages, `light` for dark text on white pages. Any other value returns `400`. | `dark` |
| `logo` | An image file, sent only in a multipart request. Use PNG or JPEG. | None. The full report and the risk reports built on it show the DarknetSearch logo. Other layouts show the DarknetSearch name. |
| `company_name` | Up to 255 characters | None |
| `primary_color` | A color such as `#1A2B3C`. Up to 9 characters. | `#F5F5F5` |
| `secondary_color` | A color. Up to 9 characters. | `#e94560` |
| `accent_color` | A color. Up to 9 characters. | `#F6C344` |
| `font_family` | A font list such as `Inter, sans-serif`. Up to 100 characters. | `Inter, sans-serif` |
| `footer_text` | Any length | None |

> [!WARNING]
>
> **Colors take 9 characters at most, and `font_family` 100.** The API reference shows higher limits, but a longer value is refused with `400` when the template is saved. A hex color fits: `#RRGGBB`, or `#RRGGBBAA` with transparency.

Report layouts differ in which fields they show:

| Field | Full report and the risk reports built on it | Domain Spoofing Risk, activity and Change Comparison reports |
| - | - | - |
| `mode` | Yes | Yes |
| `logo` | Cover page | Cover page |
| `primary_color` | Yes | No |
| `accent_color` | Yes | Yes: headings, table headers and page header |
| `company_name` | No | Cover and page header, in place of the DarknetSearch name |
| `font_family` | No | Body text |
| `footer_text` | No | Page footer. Without one, the footer shows the company name. |
| `secondary_color` | No | No |

The risk reports built on the full report are VIP Executive, Social Media, Application Security, Breach, Infrastructure and Exposed Assets. `secondary_color` is stored with the template but no layout uses it.

### Create a template

[`POST /api/hackerview/report_templates/`](https://client-api.leak.center/scalar-docs/#tag/attack-surface/POST/api/hackerview/report_templates/) creates a template. To upload a logo, send the request as `multipart/form-data`:

```bash theme={"dark"}
curl https://client-api.leak.center/api/hackerview/report_templates/ \
  -X POST \
  -H "X-API-Key: YOUR_API_KEY" \
  -F "name=Acme" \
  -F "company_name=Acme Inc." \
  -F "primary_color=#1A2B3C" \
  -F "accent_color=#0057B8" \
  -F "footer_text=Prepared for Acme Inc." \
  -F "logo=@acme-logo.png"
```

Without a logo, send JSON:

```bash theme={"dark"}
curl https://client-api.leak.center/api/hackerview/report_templates/ \
  -X POST \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Acme plain",
    "company_name": "Acme Inc.",
    "accent_color": "#0057B8"
  }'
```

The call returns `201` with the template:

```json theme={"dark"}
{
  "uid": "2c4e6a8b-0d1f-4a3c-8e5b-7f9a1c3e5d7b",
  "name": "Acme plain",
  "mode": "dark",
  "logo": null,
  "company_name": "Acme Inc.",
  "primary_color": "#F5F5F5",
  "secondary_color": "#e94560",
  "accent_color": "#0057B8",
  "font_family": "Inter, sans-serif",
  "footer_text": null,
  "include_sections": [],
  "created_at": "2026-10-08T10:02:41.512338Z",
  "updated_at": "2026-10-08T10:02:41.512338Z"
}
```

* **`uid`** is the template ID you pass when you apply it.
* **`logo`** is set when the template has a logo and is `null` otherwise. The URL points at an internal address, so don't call it.
* **`include_sections`** is always `[]`, which means every section. You can't set it through the API.

A name already used in your organization returns `400`:

```json theme={"dark"}
{
  "non_field_errors": ["The fields ext_org_id, name must make a unique set."]
}
```

### Apply a template

There is no default template in the API. A template applies only to the reports you name it on. Omit it and the report uses the built-in DarknetSearch branding.

> [!NOTE]
>
> The dashboard pre-selects a default template for you, but it keeps that choice in your browser. The API never sees it, so name the template on every call.

| To brand | Send | On |
| - | - | - |
| The report an assessment produces automatically | `report_template_uid` | [Start an assessment](https://wiki.darknetsearch.com/api/guides/attack-surface-assessments.md) |
| A report you generate | `template_uid` | [Generate a report](https://wiki.darknetsearch.com/api/guides/attack-surface-reports.md#generate-a-report) |

```bash theme={"dark"}
curl https://client-api.leak.center/api/hackerview/reports/ \
  -X POST \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "scan_uid": "5b0e7a3c-1d2f-4e6a-9b8c-7d3e2f1a0b9c",
    "template_uid": "2c4e6a8b-0d1f-4a3c-8e5b-7f9a1c3e5d7b"
  }'
```

* **Check the ID before you start an assessment.** `report_template_uid` is not checked at start. If it does not match one of your organization's templates when the report is queued, the assessment produces no report. Generate it afterwards with a valid `template_uid`.
* **On a generated report, an unknown ID returns `404`** with `{"error": "Template <uid> not found."}`, and no report is created.
* **Branding is fixed when a report is built.** Changing or deleting a template does not change finished reports. To apply a change, [generate the report again](https://wiki.darknetsearch.com/api/guides/attack-surface-reports.md#regenerate-a-report).

### Update a template

[`PATCH /api/hackerview/report_templates/{template_uid}/`](https://client-api.leak.center/scalar-docs/#tag/attack-surface/PATCH/api/hackerview/report_templates/\{template_uid}/) changes the fields you send and keeps the others. It returns `200` with the template.

```bash theme={"dark"}
curl https://client-api.leak.center/api/hackerview/report_templates/2c4e6a8b-0d1f-4a3c-8e5b-7f9a1c3e5d7b/ \
  -X PATCH \
  -H "X-API-Key: YOUR_API_KEY" \
  -F "accent_color=#00875A" \
  -F "logo=@acme-logo-2026.png"
```

Send a new `logo` in a multipart request to replace the image. A JSON request leaves the logo as it is. An update without `mode` keeps the current page style. Renaming to a name already in use returns the same `400` as creating it.

### Delete a template

[`DELETE /api/hackerview/report_templates/{template_uid}/`](https://client-api.leak.center/scalar-docs/#tag/attack-surface/DELETE/api/hackerview/report_templates/\{template_uid}/) deletes the template and its logo. It returns `204`.

```bash theme={"dark"}
curl -X DELETE https://client-api.leak.center/api/hackerview/report_templates/2c4e6a8b-0d1f-4a3c-8e5b-7f9a1c3e5d7b/ \
  -H "X-API-Key: YOUR_API_KEY"
```

Reports built with the template keep their branding, and their `template_uid` becomes `null`. Assessments started with the deleted template's ID produce no automatic report if they have not reached it yet.

### List templates

[`GET /api/hackerview/report_templates/`](https://client-api.leak.center/scalar-docs/#tag/attack-surface/GET/api/hackerview/report_templates/) returns your organization's templates, most recently updated first.

```bash theme={"dark"}
curl -G https://client-api.leak.center/api/hackerview/report_templates/ \
  -H "X-API-Key: YOUR_API_KEY" \
  --data-urlencode "page_size=50"
```

* `page_size` defaults to `10`, max `100`.
* The response has `count`, `next`, `previous` and `results`. Page by raising `page` until `next` is `null`. The `next` and `previous` URLs point at an internal address, so don't call them.

### Errors

| Status | When | Body |
| - | - | - |
| `400` | `name` is missing, or a field is too long | Field errors, such as `{"primary_color": ["Ensure this field has no more than 9 characters."]}` |
| `400` | `mode` is not `dark` or `light` | `{"mode": ["\"<value>\" is not a valid choice."]}` |
| `400` | `logo` is not an image | `{"logo": ["Upload a valid image. The file you uploaded was either not an image or a corrupted image."]}` |
| `400` | `logo` was sent in a JSON request | `{"logo": ["The submitted data was not a file. Check the encoding type on the form."]}` |
| `400` | The name is already used in your organization | `{"non_field_errors": ["The fields ext_org_id, name must make a unique set."]}` |
| `403` | Your plan has neither Attack Surface feature, or your license is not active | See [Availability and cost](#availability-and-cost) |
| `404` | No template with that `uid` in your organization | `{"detail": "Not found."}` |
| `404` | `template_uid` is not a UUID | An HTML page |
| `429` | The per-second rate limit or the API Calls allowance | See [Rate limits](https://wiki.darknetsearch.com/api/guides/rate-limits.md) |
| `502`, `504` | The assessment service failed or timed out | See [Errors](https://wiki.darknetsearch.com/api/guides/errors.md#500-502-503-and-504) |

### Endpoints

| Action | Endpoint |
| - | - |
| Create a template | [`POST /api/hackerview/report_templates/`](https://client-api.leak.center/scalar-docs/#tag/attack-surface/POST/api/hackerview/report_templates/) |
| List templates | [`GET /api/hackerview/report_templates/`](https://client-api.leak.center/scalar-docs/#tag/attack-surface/GET/api/hackerview/report_templates/) |
| Update a template | [`PATCH /api/hackerview/report_templates/{template_uid}/`](https://client-api.leak.center/scalar-docs/#tag/attack-surface/PATCH/api/hackerview/report_templates/\{template_uid}/) |
| Delete a template | [`DELETE /api/hackerview/report_templates/{template_uid}/`](https://client-api.leak.center/scalar-docs/#tag/attack-surface/DELETE/api/hackerview/report_templates/\{template_uid}/) |
| Generate a report with a template | [`POST /api/hackerview/reports/`](https://client-api.leak.center/scalar-docs/#tag/attack-surface/POST/api/hackerview/reports/) |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.