> For the complete documentation index, see [llms.txt](https://docs.idlayr.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.idlayr.com/get-started/concepts/api-versioning.md).

# API versioning

IDlayr versions the public API at the **major level only** — `/v1/`, `/v2/`, etc. The version sits in the URL path; there is no header- or content-type-based version negotiation. A major bump only happens when a breaking change to the API contract is unavoidable.

## What's a breaking change

The version applies to the **API contract** — the shape of requests and responses, the set of endpoints, the meaning of `error_code` values. A change is breaking only if a valid integration against the prior major could stop working as a result. Additive changes are not.

| Breaking — requires a new major                                       | Non-breaking — ships within the current major                 |
| --------------------------------------------------------------------- | ------------------------------------------------------------- |
| Removing or renaming a field on a response                            | Adding any new field to a response                            |
| Adding a new required field to a request                              | Adding a new optional field to a request                      |
| Changing the type of an existing field                                | Adding a new endpoint                                         |
| Removing an endpoint                                                  | Adding a new optional query parameter                         |
| Changing the semantics of any field                                   | Adding a new `error_code` value                               |
| Tightening validation in a way that rejects previously-accepted input | Loosening validation, or rejecting previously-malformed input |

## Implications for your integration

Two practical rules follow. Both are about staying robust to additive change.

**Avoid pinning to the payload shape.** We strongly discourage pinning client code to a specific payload shape — IDlayr may add new fields to responses or callbacks at any time within the same major. Tolerate fields you don't recognise; parse what you need and ignore the rest. Code generators with strict modes (rejecting unknown fields) tend to break on additive platform changes — configure them to tolerate unknown fields where possible.

**Tolerate new `error_code` values.** The catalogue grows additively within a major. Switch on the codes your integration handles explicitly; route unknown codes to a generic-error branch rather than crashing.

## API versioning is separate from SDK versioning

The HTTP API version (`/v1/`) and the mobile SDK version (e.g. `IDlayrKit 2.4.1`) are independent. Major bumps are scheduled independently; an SDK upgrade does not change the API contract, and an API major bump does not force an SDK upgrade. See [SDK versioning](/get-started/sdks/versioning.md) for the SDK side.

## URL design

Within a major, IDlayr applies a few URL conventions consistently:

* **Resource-based.** URLs name resources (`/v1/sim-swap/checks/{check_id}`), not actions (`/v1/check-sim`).
* **Family namespaces.** Products that share a mechanism are grouped under a single prefix — for example, `/v1/number-verification/secure-sna-checks/`, `…/reverse-sms-checks/`, `…/discovery-checks/`. This mirrors CAMARA's convention for related products and lets the reference docs present the family as one section.
* **Kebab-case** for path segments; **snake\_case** for JSON field names.

## Legacy v0.x

**New integrations should use v1.** The legacy v0.1 and v0.2 endpoints are closed to new adopters — they're maintained for existing integrations and in-flight migrations only, not as a starting point.

Existing v0.x integrations remain operational on **security-only maintenance** — limited to vulnerabilities flagged by IDlayr's internal SAST tooling or Vanta findings. No new features land on v0.x, and no functional bug fixes outside that scope.

For migration mechanics — the rename map, the per-product breaking changes, suggested order — see the [v0.x to v1 migration guide](/guides/migration.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.idlayr.com/get-started/concepts/api-versioning.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
