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

# Conventions

### Base URL

```
https://api.education.portablewallet.net/v1
```

There is only one environment — the Lab always runs on testnet by design, so there's no separate production server to switch to. See [Authentication](/03-authentication.md) for the two key types (user vs. admin).

### Request format

All request bodies are JSON. `Content-Type: application/json` is required on any request with a body.

### Response format

All successful responses return the resource directly (no wrapper envelope):

```json
{
  "wallet_id": "wlt_442",
  "address": "0x8f3a...19bd",
  "chain": "eth-sepolia"
}
```

List endpoints return an array, or an object with a `data` array plus pagination:

```json
{
  "data": [ { "...": "..." }, { "...": "..." } ],
  "next_cursor": "eyJvZmZzZXQiOjIwfQ"
}
```

Paginate with `?cursor=` and `?limit=` (default 20, max 100).

### Timestamps

All timestamps are ISO 8601, UTC: `2026-08-13T14:00:00Z`.

### Errors

Errors follow a consistent shape — see [Errors](/platform/02-errors.md) for the full list of codes.

```json
{
  "error": {
    "code": "session_required",
    "message": "This endpoint requires a valid session_id header.",
    "status": 400
  }
}
```

### Idempotency

Any `POST` that creates a resource (wallets, orders, certificates) accepts an optional `Idempotency-Key` header. Reusing the same key returns the original response instead of creating a duplicate.

### Usage & billing

Lab and Simulator activity is never billed — the testnet Lab is free to use as much as needed for development and practice. What's metered is the Commerce & Entitlements side (see the API Reference): entitlements granted per WooCommerce order, per the pricing already defined for each product category. Usage is visible via:

```
GET /admin/usage
```

### Rate limits

| Key type                   | Limit                                   |
| -------------------------- | --------------------------------------- |
| User key (`sk_...`)        | 60 requests/minute                      |
| Admin key (`sk_admin_...`) | 600 requests/minute (higher on request) |

Rate-limited responses return `429` with a `Retry-After` header.


---

# 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://developer.portablewallet.net/04-conventions.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.
