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

# Conventions & errors

## Requests

* Base URL: `https://YOUR-TESTVIBE-SERVER/api/v1/ops`
* Authentication: `Authorization: Bearer tvb_…` on every request ([details](/testvibe-api/getting-started/authentication.md)).
* Bodies are JSON (`application/json`); a malformed body is rejected with `400 invalid_request`.
* `{project}` in paths is the project's **public id** (a GUID, from [`list_projects`](/testvibe-api/api-reference/projects/list_projects.md)). `{feature}` accepts a **numeric id or the feature name** (case-insensitive).

The cURL examples throughout the reference assume:

```bash
export TESTVIBE_SERVER=https://YOUR-TESTVIBE-SERVER
export TESTVIBE_API_KEY=tvb_XXXXXXXX…
export PROJECT=7f3c9a4e-2b1d-4e8a-9c6f-0d5b8a1e2f34
```

## Responses

* JSON, with `camelCase` keys.
* **Timestamps** are ISO-8601 UTC with a `Z` suffix: `"2026-06-10T14:32:07Z"`. Fields that don't apply yet (e.g. `finishedUtc` on a running run) are `null`.
* Reads return `200`. Creates return `201`. Dispatches (generate, run) return `202` with the id to poll. Mutations return `200` with `{ "ok": true }`.

## Errors

Every error has the same shape:

```json
{ "error": "conflict", "message": "This feature is already generating." }
```

| HTTP  | `error`           | When                                                                                  |
| ----- | ----------------- | ------------------------------------------------------------------------------------- |
| `400` | `invalid_request` | Malformed JSON, missing required field, write-allowlist violation, file too large.    |
| `401` | `unauthorized`    | Missing, invalid, or revoked API key.                                                 |
| `404` | `not_found`       | Unknown route, or no such project / feature / run **in this workspace**.              |
| `409` | `conflict`        | Lifecycle conflicts: feature already generating, not runnable yet, dispatch rejected. |

{% hint style="info" %}
`message` is human-readable and safe to surface directly — the MCP server and CLI both pass it through verbatim.
{% endhint %}

## Versioning

The API is versioned in the path (`/api/v1/`). Additive changes (new fields, new routes) happen within `v1`; breaking changes get a new version. See [Roadmap & changelog](/testvibe-api/resources/roadmap-and-changelog.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:

```
GET https://docs.testvibe.com/testvibe-api/api-reference/conventions.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
