> For the complete documentation index, see [llms.txt](https://guardian.hedera.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://guardian.hedera.com/docs/develop/developer-tools-and-resources/logging-configuration/prerequesite-steps.md).

# Prerequisite Steps

Before calling any Policy API endpoint, complete the following setup steps.

***

## 1. Register a Standard Registry Account

**`POST /api/v1/accounts/register`**

```json
{
  "username": "example_user",
  "password": "examplePassword123",
  "role": "STANDARD_REGISTRY"
}
```

**Response `201 Created`:**

```json
{
  "username": "example_user",
  "role": "STANDARD_REGISTRY"
}
```

***

## 2. Obtain a Bearer Token

**`POST /api/v1/accounts/login`**

```json
{
  "username": "example_user",
  "password": "examplePassword123"
}
```

**Response `200 OK`:**

```json
{
  "username": "example_user",
  "did": null,
  "role": "STANDARD_REGISTRY",
  "accessToken": "<token>"
}
```

Use the `accessToken` value as the Bearer token in the `Authorization` header for all subsequent requests:

```
Authorization: Bearer <accessToken>
```

***

## 3. Create a Hedera Account (Demo)

**`GET /api/v1/demo/random-key`**

```json
{
  "id": "0.0.4532001",
  "key": "302e020100300506032b657004220420..."
}
```

***

## 4. Set Up the Standard Registry Profile

**`PUT /api/v1/profile`**

```json
{
  "hederaAccountId": "0.0.4532001",
  "hederaAccountKey": "302e020100300506032b657004220420...",
  "name": "My Registry",
  "type": "StandardRegistry"
}
```

***

## 5. Create and Publish a Schema

Create a schema via **`POST /api/v1/schemas`** with the schema document, then publish it via **`PUT /api/v1/schemas/{schemaId}/publish`** with body `{ "version": "1.0.0" }`.

***

## 6. Create a Token

**`POST /api/v1/tokens`**

```json
{
  "tokenName": "Example Token",
  "tokenSymbol": "EXT",
  "tokenType": "fungible",
  "decimals": "2",
  "initialSupply": "0",
  "enableAdmin": true,
  "changeSupply": true,
  "enableFreeze": true,
  "enableKYC": true,
  "enableWipe": true
}
```

**Response `201 Created`:**

```json
{
  "id": "63e3e5e8a01b3c001234abcd",
  "tokenId": "0.0.5000001"
}
```

***

## Base URL

All policy endpoints are relative to:

```
/api/v1/policies
```

## Pagination

Endpoints that return lists support standard pagination query parameters:

| Parameter   | Type   | Default | Description              |
| ----------- | ------ | ------- | ------------------------ |
| `pageIndex` | number | 0       | Zero-based page index    |
| `pageSize`  | number | 20      | Number of items per page |

The total item count is returned in the `X-Total-Count` response 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://guardian.hedera.com/docs/develop/developer-tools-and-resources/logging-configuration/prerequesite-steps.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
