> ## Documentation Index
> Fetch the complete documentation index at: https://docs.voicemark.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# POST /enroll

> Enrol a user's voice and return a voiceprint_id.

Enrols a user's voice. Extracts an ECAPA-TDNN 192-dim speaker embedding and stores it keyed by a UUID. Raw audio is deleted immediately after processing.

## Request

`POST /v1/enroll`

**Content-Type:** `multipart/form-data`

| Field | Type | Required | Notes |
| - | - | - | - |
| `audio` | File | Yes | WAV, WebM, MP3 or M4A. Minimum 2 seconds of speech. |
| `user_id` | string | Yes | Your internal identifier for this user. Not stored after processing. |

## Response

```json theme={null}
{
  "voiceprint_id": "3f2a1b4c-e8a9-4f7d-b2c1-9d8e3f1a7b5c",
  "enrolled_at": "2026-11-09T14:32:00Z",
  "quality_score": 0.82,
  "duration_s": 4.3,
  "glyph_params": {
    "hue": 0.61,
    "shapeStretch": 0.44,
    "shellDensity": 0.73,
    "breathPulse": 0.38,
    "fluxMotion": 0.55,
    "scatterAir": 0.21,
    "chaosWarp": 0.18,
    "pulseDepth": 0.47,
    "kurtosisIntensity": 0.62,
    "colorVibrancy": 0.80
  }
}
```

| Field | Description |
| - | - |
| `voiceprint_id` | Store this — pass to `verify()` to enable identity check |
| `enrolled_at` | ISO 8601 timestamp |
| `quality_score` | 0–1. Prompt re-record if below 0.4. See [quality scoring](https://docs.voicemark.dev/concepts/quality-scoring). |
| `duration_s` | Duration of usable speech in the clip |
| `glyph_params` | Render the [Glyph VoiceMark](https://docs.voicemark.dev/concepts/glyph-voicemark) immediately |

## Error codes

| Code | Status | Cause |
| - | - | - |
| `AUDIO_TOO_SHORT` | 400 | Clip under 2 seconds |
| `AUDIO_TOO_QUIET` | 400 | RMS energy below threshold |
| `LOW_VOICE_SIGNAL` | 400 | No recognisable voice identity in audio |
| `AUDIO_CONVERSION_FAILED` | 400 | Unsupported format |
| `UNAUTHORIZED` | 401 | Missing or invalid API key |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.