---
title: "Detect framework from a file manifest"
method: POST
path: "/detection"
tags: ["Detection"]
---

# Detect framework from a file manifest

`POST /detection`

## Request

- Base URL: `https://sg.deployhq.com`
- URL: `https://sg.deployhq.com/detection`
- Auth: HTTP basic

Detects the project's framework/stack from an uploaded filename listing plus the contents of key manifest files. Returns the canonical stack, a suggested protocol (static_hosting or managed_vps), the static-hosting preset (output directory and SPA mode), and suggested build commands — the same detection pipeline the web onboarding wizard uses. Files not uploaded degrade detection precision gracefully; they never error. When AI features are enabled for the account and the rule-based result is ambiguous, AI services are consulted and their results merged into the response.

## Request body

- DetectionObject
  - `detection` object, required
    - `filenames` string[]
    - `files` unknown
    - `repository_url` string

## Response `200`

Success

- StackVersionEvidenceObject
  - `stack` string
  - `version` string
  - `evidence` string[]
  - `description` string
  - `suggested_protocol` string
  - `static_hosting` object
    - `eligibility` string
    - `root_path` string
    - `spa_mode` boolean
    - `confidence` string
  - `build_commands` object[]
    - `description` string
    - `command` string
    - `halt_on_error` boolean
    - `template_name` string
  - `excluded_files` object[]
    - `path` string
  - `build_cache_files` object[]
    - `path` string
  - `ai_assisted` boolean

## Other responses

- `401`: You are not authorized to access this resource. You need to authenticate yourself first.
- `403`: You are not allowed to access this resource. You do not have the necessary permissions.
- `422`: Unprocessable Entity
- `500`: An unexpected error occurred on the server. The server was unable to process the request.

---

[API](https://skmtc.dev/deployhq/apis/deployhq-api-interactive-documentation.md) · [All operations](https://skmtc.dev/deployhq/apis/deployhq-api-interactive-documentation/llms.txt) · [OpenAPI document](https://skmtc.dev/deployhq/apis/deployhq-api-interactive-documentation/revisions/830264ae58be?raw)
