---
title: "Create a clinical audit"
method: POST
path: "/audits"
tags: ["Audits"]
---

# Create a clinical audit

`POST /audits`

## Request

- Base URL: `http://127.0.0.1:5000/api/v1`
- URL: `http://127.0.0.1:5000/api/v1/audits`
- Auth: API key in header `X-API-Key`
- TypeScript: <https://skmtc.dev/clinicalauditai/apis/clinicalauditai-api/docs/audits/post.ts> (a function with typed inputs; its response is checked against the schema)

Generates an audit from the supplied source data.

The API may also generate a private PDF and return a temporary signed
PDF URL. Email delivery can use the client's saved notification
configuration or be explicitly requested in the request body.

Webhook delivery can be requested with webhook_url or use the client's
saved webhook configuration.

## Request body

- CreateAuditRequest
  - `data` string, required: Source data to be analyzed by the ClinicalAuditAI API audit engine.
  - `email` string, email: Optional email recipient. When omitted, the saved client notification email may be used.
  - `notify` boolean: Whether email notification should be sent. When omitted, the client's saved preference may be used.
  - `webhook_url` string, uri: Optional webhook URL. When omitted, a saved client webhook configuration may be used.

## Response `200`

Audit generated successfully

- CreateAuditResponse
  - `audit_id` string, uuid, required
  - `status` string, required
  - `created_at` string, date-time, required
  - `completed_at` string, date-time, required
  - `result` string, required: Generated audit report text.
  - `pdf_status` 'generated' | 'failed', required
  - `pdf_url` string, uri, nullable, required: Temporary signed URL for the private PDF.
  - `pdf_url_expires_in` integer, nullable, required
  - `email_status` 'pending' | 'sent' | 'failed' | 'not_requested', required
  - `webhook_status` 'pending' | 'sent' | 'failed' | 'not_requested', required
  - `authentication` object
    - `type` 'client' | 'master'

## Other responses

- `400`: Invalid request
- `401`: Missing or invalid API key
- `500`: Server or audit-generation error

---

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