---
title: "Record the tools a wizard scan found in a codebase"
method: POST
path: "/api/projects/{project_id}/wizard/scans/"
tags: ["wizard"]
---

# Record the tools a wizard scan found in a codebase

`POST /api/projects/{project_id}/wizard/scans/`

## Request

- Base URL: `https://us.posthog.com`
- URL: `https://us.posthog.com/api/projects/{project_id}/wizard/scans/`
- Auth: HTTP bearer

## Path parameters

- `project_id` string, required

## Request body

- RecordWizardScanRequest
  - `session_id` string, required: The wizard run that made the scan.
  - `program` string, required: The wizard program that scanned, such as `posthog-integration` or `warehouse-source`.
  - `wizard_version` string, required: Version of the wizard that made the scan.
  - `workspace_fingerprint` string, required: sha256 hex digest that identifies the scanned repository without naming it.
  - `scanned_at` string, date-time, required: When the wizard scanned the codebase.
  - `tools` WizardScanTool[], required: Every tool the scan found. An empty list is a scan that found nothing.
    - `kind` string, required: The tool's kind in the wizard tool catalog, such as `Stripe` or `Amplitude`.
    - `signals` WizardScanSignal[], required: The signals that matched this tool.
      - `source` string, required: Where the wizard found the tool, such as `npm`, `pypi`, `env_key` or `script_host`.
      - `name` string, required: The package name, `.env` key name or script host that matched. Never a `.env` value.
      - `file` string, nullable: Path of the file the signal came from, relative to the scanned directory.
  - `complete` boolean: False when the scan could not read the whole workspace. Tools it did not find are then kept.

## Response `200`

This session already reported its scan.

- WizardScanResult
  - `id` string, uuid, required: ID of the stored scan.
  - `created` boolean, required: False when this session had already reported its scan, so nothing changed.

## Other responses

- `201`: The scan was stored.

## Changes

> 52 revisions in range; 1 not diffed.

- **2026-10-15** `98642c559af2`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/posthog/apis/posthog-api/changes/api/projects/:project_id/wizard/scans/post.md)

---

[API](https://skmtc.dev/posthog/apis/posthog-api.md) · [All operations](https://skmtc.dev/posthog/apis/posthog-api/llms.txt) · [OpenAPI document](https://skmtc.dev/posthog/apis/posthog-api/revisions/71e64193672d?raw)
