# Schema Creation APIs

**Base URL:** `/api/v1`

These APIs allow Standard Registry users to manage schemas — create, update, publish, import, export, and delete schemas associated with Guardian policies.

**Authentication:** All endpoints require a valid JWT Bearer token (`Authorization: Bearer <token>`). Obtain a token via `POST /accounts/login`.

***

## Endpoints

| Method | Endpoint                             | Description                            | Auth Required |
| ------ | ------------------------------------ | -------------------------------------- | ------------- |
| GET    | `/schemas`                           | List all schemas (paginated)           | Yes           |
| GET    | `/schema/{schemaId}`                 | Get schema by ID                       | Yes           |
| GET    | `/schemas/{topicId}`                 | List schemas by topic                  | Yes           |
| POST   | `/schemas/{topicId}`                 | Create new schema under a topic        | Yes           |
| PUT    | `/schemas/`                          | Update an existing schema              | Yes           |
| DELETE | `/schemas/{schemaId}`                | Delete a schema                        | Yes           |
| PUT    | `/schemas/{schemaId}/publish`        | Publish schema to IPFS                 | Yes           |
| GET    | `/schemas/{schemaId}/export/message` | Export schema message IDs              | Yes           |
| GET    | `/schemas/{schemaId}/export/file`    | Export schema as zip file              | Yes           |
| POST   | `/schemas/{topicId}/import/message`  | Import schema from IPFS                | Yes           |
| POST   | `/schemas/{topicId}/import/file`     | Import schema from zip file            | Yes           |
| POST   | `/schemas/import/message/preview`    | Preview schema from IPFS before import | Yes           |
| POST   | `/schemas/import/file/preview`       | Preview schema from zip before import  | Yes           |

***

## Endpoint Details

* [Listing of Schema](/docs/develop/schemas/schema-creation-using-the-guardian-apis/creation-of-a-schema-1.md) — `GET /schemas`
* [Returning Schema by SchemaID](/docs/develop/schemas/schema-creation-using-the-guardian-apis/returning-schema-by-schemaid.md) — `GET /schema/{schemaId}`
* [Returns All Schemas Related to the Topic](/docs/develop/schemas/schema-creation-using-the-guardian-apis/returns-all-schemas-related-to-the-topic.md) — `GET /schemas/{topicId}`
* [Creation of Schema Related to the Topic](/docs/develop/schemas/schema-creation-using-the-guardian-apis/creation-of-schema-related-to-the-topic.md) — `POST /schemas/{topicId}`
* [Updating Schema](/docs/develop/schemas/schema-creation-using-the-guardian-apis/updating-schema.md) — `PUT /schemas/`
* [Deleting a Schema](/docs/develop/schemas/schema-creation-using-the-guardian-apis/deleting-a-schema.md) — `DELETE /schemas/{schemaId}`
* [Publishing Schema Based on Schema ID](/docs/develop/schemas/schema-creation-using-the-guardian-apis/publishing-schema-based-on-schema-id.md) — `PUT /schemas/{schemaId}/publish`
* [Export Schema Message IDs](/docs/develop/schemas/schema-creation-using-the-guardian-apis/export-a-schema.md) — `GET /schemas/{schemaId}/export/message`
* [Export Schema as Zip](/docs/develop/schemas/schema-creation-using-the-guardian-apis/export-a-schema-1.md) — `GET /schemas/{schemaId}/export/file`
* [Import Schema from IPFS](/docs/develop/schemas/schema-creation-using-the-guardian-apis/importing-schema-from-ipfs.md) — `POST /schemas/{topicId}/import/message`
* [Import Schema from Zip](/docs/develop/schemas/schema-creation-using-the-guardian-apis/importing-zip-file-containing-schema.md) — `POST /schemas/{topicId}/import/file`
* [Schema Preview from IPFS](/docs/develop/schemas/schema-creation-using-the-guardian-apis/schema-preview-from-ipfs.md) — `POST /schemas/import/message/preview`
* [Schema Preview from Zip](/docs/develop/schemas/schema-creation-using-the-guardian-apis/schema-preview-from-zip.md) — `POST /schemas/import/file/preview`

See [Prerequisite Steps](/docs/develop/policies/policy-creation-using-the-guardian-apis/prerequesite-steps.md) for authentication setup.


---

# 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://guardian.hedera.com/docs/develop/schemas/schema-creation-using-the-guardian-apis.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.
