> For the complete documentation index, see [llms.txt](https://dev.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://dev.guardian.hedera.com/guardian/standard-registry/schemas/schema-creation-using-apis/importing-schema-from-ipfs.md).

# Importing Schema from IPFS

**`POST /schemas/{topicId}/import/message`**

Imports new schema from IPFS into the local DB. Only users with the Standard Registry role are allowed to make the request.

**Authentication:** Bearer token required (`Authorization: Bearer <token>`)

**Permission:** `Permissions.SCHEMAS_SCHEMA_CREATE`

***

## Request

### Path Parameters

| Parameter | Type   | Required | Description |
| --------- | ------ | -------- | ----------- |
| `topicId` | String | Yes      | Topic ID    |

### Request Body

An object containing the identifier of the Hedera message which contains the IPFS CID of the schema.

```json
{
  "messageId": "1700000000.000000001"
}
```

***

## Response

### Success Response

**Status:** `201 Created`

Returns an array of the imported schema objects.

```json
[
  {
    "id": "f3b2a9c1e4d5678901234567",
    "uuid": "f3b2a9c1e4d5678901234567",
    "name": "Schema name",
    "status": "PUBLISHED",
    "topicId": "f3b2a9c1e4d5678901234567"
  }
]
```

### Error Responses

| Status                      | Description               |
| --------------------------- | ------------------------- |
| `401 Unauthorized`          | Missing or invalid token  |
| `403 Forbidden`             | Insufficient permissions  |
| `422 Unprocessable Entity`  | Validation error          |
| `500 Internal Server Error` | Unexpected server failure |
