> Documentation index: https://docs.hodeishield.com/llms.txt

# Versioning and deprecation

`/v1` is the public contract of the HodeiShield API and it is **frozen**: what is published
under `/v1` does not change in an incompatible way. This page summarises the policy as the
OpenAPI document itself publishes it (`GET /v1/openapi.json`), which prevails if they differ.

## How the version is identified

- **The path** carries the major version: `/v1/…`.
- **`info.version`** of the OpenAPI document is the contract revision, shaped like a date. The
  current one is `2026-11-22`. It moves when the published contract gains an addition or a
  correction.
- The **Contract changes** section of the OpenAPI document lists every addition and correction,
  newest first, with the revision it arrived in. To know whether a capability is present, check
  whether the operation exists (for example `GET /v1` lists `listPortfolioTenants` when the
  portfolio contract is available) instead of comparing version strings.

## Recent contract changes

- **2026-11-22, correction: `page` has an upper bound.** `page` is at most 100000 on every
  collection (`maximum` in the OpenAPI document). A larger value is a `400` validation error, like
  `per_page` over 200, and no longer a `500`.
- **2026-11-21, addition: the host binding state of an endpoint.** Every item of `listEndpoints`
  (`GET /v1/endpoints`, scope `endpoints:read`) gains `host_binding_state` (`unbound`, `bound`,
  `unavailable` or `mismatch`: whether the enrolment is bound to the machine it was made on) and
  `host_binding_changed_at` (RFC 3339 or null: the first transition into `mismatch`). `mismatch`
  means a signed report presented another machine's binding, a possible cloned host; revoke the
  endpoint and re-enrol the original machine. The binding itself is never served.
- **2026-11-20, addition: roadmap proposals in the inbox.** The proposal inbox's `class` filter
  accepts `add_roadmap_item`, the vCISO roadmap proposals decided through the same inbox. A
  compatible addition.
- **2026-11-19, addition: the lanes of 2026-11-17 and 2026-11-18 together.** Incidents and AI
  systems reads (`incidents:read`, `ai_systems:read`); the proposal inbox and the approve and reject
  decisions (`act:decide`, a scope of the HodeiShield CLI only; approving never executes); and the
  risk transition (`risks:write`). Compatible additions.
- **2026-11-17, addition: incidents and AI systems.** Four read operations. `GET /v1/incidents`
  and `GET /v1/incidents/{id}` return the tenant's incident register: type, severity, status, the
  key dates and, per incident, `notifications`, its regulatory notification deadlines (DORA, NIS2,
  GDPR, AI Act) with their stage, live status, due date and the date the report that met each one
  was submitted. `GET /v1/ai-systems` and `GET /v1/ai-systems/{id}` return the register of AI
  systems: risk class, lifecycle status, kind, owning unit, provider and data categories (no AI
  Act role and no review date per system: the register does not record them). Two new read scopes,
  `incidents:read` (served while the tenant has the `supply_risk` module) and `ai_systems:read`
  (served while it has `ai_governance`). No existing key or token holds them: create a key, or sign
  in again, asking for them. Nothing existing was removed, renamed or re-statused.

- **2026-11-15, correction: API access is a plan feature.** API and CLI access belong to the plans
  from Comply up and to the trial; Respond, Free, Supplier and AI Governance have none. A tenant API
  key (`hsk_…`) or an OAuth access token not issued for the MCP server, whose tenant is on a plan
  without API access, was served. It is now refused on every request with `403`, `error.code`
  `forbidden`, `error.details.code` `PLAN_WITHOUT_API` and `error.details.deniedReason`
  `plan_without_api`, including keys that already exist. A portfolio key gets the same answer for a
  client tenant on such a plan. A new key or token does not change this; the plan can be changed in the console. Existing keys are kept, and the owner of each refused key is told once by email.

- **2026-11-15, addition: proposals a person approves (`act:propose`).** A write of another kind:
  `POST /v1/act/proposals` (`createActProposal`) records a proposal of one action class
  (`create_task`, `schedule_vendor_scan`, `request_vendor_evidence`) that a person of the tenant
  approves in the console, which executes it with the approver's own role; nothing changes before
  that. `GET /v1/act/proposals/{id}` (`getActProposal`) reports its status to the application that
  made it, never its content or who decided it. Both are reachable only with a user's OAuth access
  token issued for the HodeiShield MCP server that carries the new OAuth-only scope `act:propose`;
  any other credential gets `403` `CREDENTIAL_NOT_ALLOWED`. New detail codes: `BODY_NOT_JSON`,
  `BODY_TOO_LARGE`, `VALIDATION_FAILED` (`400`), `DUPLICATE`, `OPEN_PROPOSAL_CAP`
  (too many open proposals: 20 per application and user, 20 per user across all their
  applications, or 100 per tenant; `error.details.scope` is `grant`, `user` or `tenant`),
  `ACTIONS_PAUSED` (`409`), and the `429` scopes `proposal_grant` (10 proposals per minute per
  application and user) and `proposal_user` (10 per minute per user across all their
  applications). Every other path still
  answers `405` to a write. A compatible addition.
- **2026-11-15, addition: `credential.expires_at` on `GET /v1/me`.** The `credential` block gains
  `expires_at`, an RFC 3339 UTC instant or `null`: when a tenant API key stops working, so an
  integration can warn before it does. It is `null` for a key with no expiry, for an OAuth access
  token (renewed with its refresh token) and, for now, for a portfolio key. A compatible addition:
  a new key in the response.
- **2026-11-15, correction: an unknown query parameter name is refused.** A query parameter whose
  name the operation does not declare (`GET /v1/alerts?stauts=open`) used to be ignored and the
  request was served without the filter, so a connector with a typo ingested the whole table
  believing it had filtered. It now answers `400`, `error.code` `invalid_request` and
  `error.details.code` `UNKNOWN_QUERY_PARAMETER`; `error.details.unknown` lists the names that are
  not declared (at most 10, each cut to 64 characters; `error.details.unknown_omitted` counts the
  rest) and `error.details.allowed` the names the operation accepts. An operation without
  query parameters accepts none. A mistyped value is unchanged (see below). A request that uses
  only the declared names is unaffected.

- **2026-11-15, correction: a key dies with its creator's role, and keys expire.** A tenant API
  key (`hsk_…`) and a portfolio key (`hsp_…`) kept working after the administrator who created
  it was removed, deactivated or demoted. Such a key is now refused with `401`, as a revoked or
  expired key already was, unless another administrator of the tenant took the tenant API key
  over first. Every tenant API key now expires within 365 days (`never` is no longer offered; a
  key that had no expiry was given one and its creator was told) and a portfolio key within 90
  days. A new token does not help: an administrator of the tenant creates a new key.

- **2026-11-14, addition: acknowledge and resolve an alert (the first writes).**
  `POST /v1/alerts/{id}/acknowledge` (`acknowledgeAlert`) and `POST /v1/alerts/{id}/resolve`
  (`resolveAlert`, a `reason` is required), under the new write scope `alerts:write`, for a
  tenant API key or an MSSP portfolio key (the client named with `X-HS-Tenant`); an OAuth access
  token cannot write. Both answer `{ data, changed }`: the alert's state after the request and
  whether this request changed it. The tenant's IP allowlist, its licence (a write is refused in
  the grace period) and the `supply_risk` module apply exactly as on reads. New
  `error.details.code` values: `ROLE_NOT_PERMITTED` and `WRITE_ACTOR_UNRESOLVED` (`403`),
  `ALERT_RESOLVED` and `ALERT_STATE_CHANGED` (`409`); new `429` `error.details.scope` value
  `write_key`. Every read operation is still a `GET` and needs no new scope. See
  [Authentication](https://docs.hodeishield.com/en/api/authentication/#acknowledge-and-resolve-alerts-alertswrite).

- **2026-11-14, addition: MITRE ATT&CK techniques on alerts.** `GET /v1/alerts` and
  `GET /v1/alerts/{id}` gain `mitre_techniques` (the techniques the CTID KEV mappings assign to
  the alert's CVE) and `mitre_mapping` (`status`: `mapped`, `unmapped`, `not_in_plan` or
  `unavailable`, and the `source` dataset). Without `supply_chain.mitre_mapping` in the plan,
  `mitre_techniques` is `null` and the alert is otherwise served in full. Treat `null` as "not
  served", never as "no mapping".

- **2026-11-12, correction: the tenant's IP allowlist applies to API keys.** A tenant API key
  (`hsk_…`) was served from any address, even when its tenant had an IP allowlist. A key is now
  refused from an address outside its tenant's allowlist with `403`, `error.code` `forbidden`
  and `error.details.code` `IP_NOT_ALLOWED`, as an OAuth access token already was. A portfolio
  key acting in a client tenant that has an allowlist is refused from an address outside it with
  the same `404` `TENANT_NOT_FOUND` as a tenant outside its portfolio, so the allowlist reveals
  nothing about the portfolio's members. A tenant without an allowlist is unaffected. A new key
  does not help: the tenant's administrator adds the address.

- **2026-11-12, correction: the portfolio listing and `/v1/me` respect each client's IP allowlist.**
  `GET /v1/portfolio/tenants` listed every client of the portfolio, and `GET /v1/me` counted
  them, from any address. A client tenant with an IP allowlist that excludes the address of the
  request is now left out of the listing and the count, with no sign that it exists. A client
  without an allowlist is unaffected. If a client's allowlist cannot be read, both answer `503`
  instead of a shorter list.

- **2026-11-12, correction: `MFA_ENROLLMENT_REQUIRED` is published.** An OAuth access token (CLI,
  MCP client) of an account without the second factor its tenant requires was already refused with
  `403`, `error.code` `forbidden` and `error.details.code` `MFA_ENROLLMENT_REQUIRED`, but the
  contract did not list that code. It does now, among the detail codes every operation shares. A
  new token does not help: enrol a second factor in the console and sign in again.

- **2026-10-29, addition: a warning when a filter value is not a published one.** `severity`
  on `GET /v1/alerts`, `domain` and `status` on `GET /v1/risks` and `status` on
  `GET /v1/compliance/controls` match exactly, so a mistyped value (`severity=critcal`) used to
  return an empty list that looked like "no results". The request is still served as sent, with
  `200` and the same items: no parameter accepts less than before. When the value is outside the
  parameter's `x-hs-known-values`, the response also carries the optional key `meta.warnings[]`
  (`param`, `value`, `known`) and the `X-HS-Unknown-Filter` header, which names the parameter.
  With no unknown value, neither appears. `category` on `GET /v1/vendors` is free text and is
  not checked.
- **2026-10-27, correction: a scope needs its module active.** A tenant API key or a portfolio
  key used to be served on its scope alone, even when the tenant no longer had that scope's
  module active. Every credential now gets `403` with `error.details.code` `MODULE_NOT_ENTITLED`
  in that case, and a `compliance.<framework>` scope also needs the framework activated for the
  tenant. **A request that used to answer `200` now answers `403`.** The same revision adds
  `GET /v1/changes` (scope `changes:read`, read-only).
- **2026-10-26, change: `user.email` needs the `email` scope.** `GET /v1/me` returns
  `user.email` only to an OAuth access token that carries the new `email` scope, and omits it
  otherwise; the call is never refused for lacking it. Treat `user.email` as optional.

## Compatible changes (happen inside `/v1`, without prior notice)

- a new operation;
- a new **optional** query parameter;
- a new field in a response object;
- a new value in a field documented as an open vocabulary (for example `status`, `severity`,
  `evidence_type`);
- a new `error.code`, always with the HTTP status its siblings already use;
- anything under `error.details`, which is diagnostic and not part of the contract, except
  `error.details.code` and the keys the error table of each operation names.

Write your client so these do not break it: ignore unknown fields, do not switch exhaustively
on an open vocabulary, and treat an unknown `error.code` as "an error of this HTTP status".

## Incompatible changes (do not happen in `/v1`)

They go to a new version (`/v2`), and `/v1` keeps being served:

- removing or renaming an operation, a parameter or a field;
- changing the type, the unit or the meaning of a field;
- making an optional parameter required, or accepting less than it accepted;
- changing which scope an operation requires;
- changing the HTTP status an existing `error.code` is sent with.

## Unknown filter values

A mistyped parameter NAME is different: it is refused with `400` and `UNKNOWN_QUERY_PARAMETER`
(see above), because ignoring it would serve the request unfiltered.

A filter with a published vocabulary (`x-hs-known-values`) does not refuse an unknown value: the
request answers `200` with whatever matches, which is almost always nothing. So that this is not
mistaken for "no results", the response carries `meta.warnings[]` with one
`{ "param", "value", "known" }` element per unknown filter, and the `X-HS-Unknown-Filter` header
with the parameter names separated by commas. It applies to alert `severity`, risk `domain` and
`status`, and compliance control `status`; the retired Spanish `severity` values raise no
warning. The obsolete `Warning` header is not used.

## Retired values

A value retired from a parameter is listed in the OpenAPI document with the extension
`x-hs-deprecated-values`, and the date until which the server is documented to accept it in
`x-hs-deprecated-values-sunset`. There is one case today: the Spanish values of the alert
`severity` filter (`critico`, `alto`, `medio`, `bajo`) are documented as accepted until
**2027-01-14**; move to the English values (`critical`, `high`, `medium`, `low`, `info`)
before that date. A response to a request that uses one of those values carries the
`Deprecation`, `Sunset` and `Link` (`rel="deprecation"`) headers described in the
[deprecation policy](https://docs.hodeishield.com/en/api/deprecation-policy/); a request that uses none gets none.

## What is not part of the frozen contract

- **Rate limits** may be raised without notice. See [Rate limits](https://docs.hodeishield.com/en/api/rate-limits/).
- **Webhook signature headers** have their own lifecycle: the legacy
  `X-HodeiShield-Signature` will be retired. See [Webhooks](https://docs.hodeishield.com/en/api/webhooks/#migrating-from-the-legacy-signature).

## What commitments this policy makes

Breaking changes in `/v1` follow the [deprecation policy](https://docs.hodeishield.com/en/api/deprecation-policy/): at least 12 months between the notice and the removal, an email to the creator of each affected active API key (if still an active member) and to the tenant administrators, and a changelog entry stating the reason. A security fix may break a `/v1` behaviour before that period has passed; when that happens we give as much notice as possible. Webhooks and rate limits are outside that policy (see above). This page summarises the contract; if they differ, the OpenAPI document prevails.
