Skip to documentation
HeyMilo Red University

Get started

Authentication

Every request to the Red API carries a workspace API key in the x-api-key header.

Start with a sandbox key: its scans are free and return canned results. Red shows a key once, when you create it. Paste it here to make every sample copy-paste ready. It stays in this browser tab only.

API keys

Keys belong to a workspace, not a person, so an integration keeps working when someone leaves. Owners and admins create and revoke them on the API keys page.

Keys start with HM-RED-. Red stores only a hash and the key's prefix, so the full key is shown once, when you create it. Keep it in a secret manager and read it from an environment variable such as RED_API_KEY. Never ship a key in a browser or mobile app.

Send the key in the x-api-key header. A mistyped, revoked or expired key returns 401, and a request with no x-api-key header at all returns 422. A key without the scope a route needs returns 403.

GET/v1/scans/8F3A91C24D7E0B5A6C1D9E2F3B4A5C6D7E8F9A0B1C2D3E4F5A6B7C8D9E0F1A2B
export RED_API_KEY="<YOUR_API_KEY>"

curl "https://red-api.apps.heymilo.cloud/v1/scans/8F3A91C24D7E0B5A6C1D9E2F3B4A5C6D7E8F9A0B1C2D3E4F5A6B7C8D9E0F1A2B" \
  -H "x-api-key: $RED_API_KEY"
Response
HTTP/1.1 401 Unauthorized
Content-Type: application/json

{
  "detail": "Invalid API key"
}

Live and sandbox keys

You choose the type when you create a key, and it can't be changed later.

  • Live keys start with HM-RED-. They analyze real media, count toward billing and need a payment method on the workspace.
  • Sandbox keys start with HM-RED-SANDBOX-. Their scans return canned results, cost nothing and need no payment method. How sandbox works.

Each type sees only its own scans. Job groups and interview checks are shared, so a sandbox key can read job groups, and their roll-ups count live scans.

Scopes

Give each key only what its job needs. A key created without scopes has full access. A key with an empty scope list can call nothing.

ScopeAllows
scans:readList and fetch scans, results and exports, and read job groups and interview checks.
scans:createStart new scans. Consumes credits.
sets:manageCreate, edit and delete job groups, and add or remove their scans.
taxonomy:manageCreate, edit, clone and delete interview checks.
webhooks:manageCreate, list, test and delete webhook endpoints, and set webhook_url on a scan.

Rotating a key

Rotate a key from its row on the API keys page. Red issues a replacement straight away and keeps the old key working for the grace period you choose, so you can deploy the new key without downtime. Revoke a key to stop it at once.

Every request made with a key appears in Usage with its status, latency and a redacted body, which helps when you trace a failed call.