---
title: "Create a Code Analysis Test"
method: POST
path: "/v1/inspect/analyze"
tags: ["Code Analysis"]
---

# Create a Code Analysis Test

`POST /v1/inspect/analyze`

## Request

- Base URL: `https://api.mailgun.net`
- URL: `https://api.mailgun.net/v1/inspect/analyze`
- Auth: HTTP basic
- TypeScript: <https://skmtc.dev/mailgun/apis/email-preview-api/docs/v1/inspect/analyze/post.ts> (a function with typed inputs; its response is checked against the schema)

Create a code analysis test to analyze HTML content for email client feature compatibility.

## Request body

- GithubComMailgunHtmlparserTypesHTMLEngineAPIRequest
  - `html` string
  - `url` string
  - `mime` string
  - `transfer_encoding` string
  - `charset` string

## Response `200`

A 200 response

- GithubComMailgunInspectInternalCodeanalysisTestCreationResponse
  - `meta` object, nullable: Metadata about the test creation including status and version
  - `items` GithubComMailgunInspectInternalCodeanalysisTestCreationItem, required
    - `id` string, required: Unique identifier for the created test
    - `links` GithubComMailgunInspectInternalCodeanalysisLinks, required
      - `self` string, required: URL to access this resource

## Other responses

- `400`: A 400 response
- `401`: A 401 response

---

[API](https://skmtc.dev/mailgun/apis/email-preview-api.md) - [All operations](https://skmtc.dev/mailgun/apis/email-preview-api/llms.txt) - [OpenAPI document](https://skmtc.dev/mailgun/apis/email-preview-api/revisions/c8a18f02bc8b?raw)
