# API Conventions

### Request format

All requests must:

* Use `Content-Type: application/json`
* Send request bodies as valid JSON
* Include all required authentication headers (documented per product)
* Include an `x-request-id` header with a unique UUID v4

***

### Request ID (`x-request-id`)

Every request must include this header. Generate a new UUID for each request.

```
x-request-id: 550e8400-e29b-41d4-a716-446655440000
```

Store the `x-request-id` on your side. If you need to investigate a failed request with TemboPlus support, this is how we trace it.

***

### HTTP Status Codes

<table><thead><tr><th width="109.5">Code</th><th width="190">Meaning</th><th>Description</th></tr></thead><tbody><tr><td><strong><code>200</code></strong></td><td>OK</td><td>Request accepted</td></tr><tr><td><strong><code>400</code></strong></td><td>BAD REQUEST</td><td>Invalid payload or headers</td></tr><tr><td><strong><code>401</code></strong></td><td>UNAUTHORIZED</td><td>Invalid API credentials. Verify your <code>x-account-id</code> and <code>x-secret-key</code> (or Bearer token for Merchant Accounts)</td></tr><tr><td><strong><code>404</code></strong></td><td>NOT FOUND</td><td>Resource does not exist</td></tr><tr><td><strong><code>500</code></strong></td><td>INTERNAL SERVER ERROR</td><td>Temporary issue on TemboPlus servers. Retry with exponential backoff. If it persists, contact support with your <code>x-request-id</code>.</td></tr></tbody></table>


---

# Agent Instructions: 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://tembo.gitbook.io/tembo/api-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.
