Skip to main content
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. 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.

Template fields

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: 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/ creates a template. To upload a logo, send the request as multipart/form-data:
Without a logo, send JSON:
The call returns 201 with the template:
  • 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:

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

Update a template

PATCH /api/hackerview/report_templates/{template_uid}/ changes the fields you send and keeps the others. It returns 200 with the template.
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}/ deletes the template and its logo. It returns 204.
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/ returns your organization’s templates, most recently updated first.
  • 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

Endpoints