---
name: heymilo-red-api
description: Build and troubleshoot HeyMilo Red REST integrations for interview recording scans, job groups, interview checks, and webhook delivery.
---

# HeyMilo Red API

Use the public Red API at `https://red-api.apps.heymilo.cloud`. The ZIP includes `references/openapi.json` with the method, path, parameters, and responses for every public operation. The current schema is also available at https://docs.heymilo.red/openapi.json and the documentation index at https://docs.heymilo.red/llms.txt.

Read `RED_API_KEY` from the calling service’s environment and send it in the `x-api-key` header for `/v1` requests. Keep keys out of chat, source files and browser bundles. Shared report links use a share token and do not require a workspace key.

## Check connectivity

Use a sandbox key with the `scans:read` scope. A new workspace can return an empty `data` list. Red scan lists use `limit`, `skip`, and `has_more`.

```sh
curl --fail-with-body 'https://red-api.apps.heymilo.cloud/v1/scans?limit=1' \
  -H "x-api-key: $RED_API_KEY"
```

## Integrate scans

1. Send `POST /v1/scans` with an HTTPS `video_url` and a `scans:create` key. Sandbox keys begin with `HM-RED-SANDBOX-`. Set `sandbox_scenario` to `clean`, `flagged` or `failed` for a repeatable outcome. Live scans consume minutes and reject this sandbox field.
2. Retain the `scan_id` from the 202 response. Poll `GET /v1/scans/{scan_id}` every five seconds or receive signed events. Stop polling on both `COMPLETED` and `FAILED`. On 429 respect `Retry-After`. An ambiguous timeout after submission can mean the scan already exists.
3. On success, return the timestamped evidence and verdict to the calling application. On failure, surface the top-level `error`. Use the selected result version when parsing the payload.
4. If the integration requests webhooks, follow https://docs.heymilo.red/docs/polling-and-webhooks for signature verification, replay protection, and deduplication. Adding a per-scan `webhook_url` requires `webhooks:manage`.
