# Schema References Error - Failed to Register

**URL:** <https://forum.confluent.io/t/schema-references-error-failed-to-register/37338>\
**Category:** Schema Registry\
**Created:** [27 February 2025 00:27 UTC](https://forum.confluent.io/t/schema-references-error-failed-to-register/37338 "2025-02-27T00:27:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![brianshih1](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/brianshih1/32/3960_2.png) [@brianshih1](https://forum.confluent.io/u/brianshih1)\
**Post date:** [27 February 2025 00:27 UTC](https://forum.confluent.io/t/schema-references-error-failed-to-register/37338/1 "2025-02-27T00:27:12Z")

</div>

I am following the example provided in the document about registering schemas with references: [Schema Registry API Reference | Confluent Documentation](https://docs.confluent.io/platform/current/schema-registry/develop/api.html#post--subjects-(string-%20subject)-versions)

First, I register a string schema under the subject `hello`:

```auto
curl -X POST "http://localhost:8087/subjects/hello/versions" \
     -H "Content-Type: application/json" \
     -d '{"schema": "{\"type\":\"string\"}"}'

```

Next, I register the following schema alongside the references:

```auto
curl -X POST "http://localhost:8087/subjects/foo/versions" \
     -H "Content-Type: application/json" \
     -d '{
       "schema": "{\"type\":\"record\",\"name\":\"test\",\"fields\":[{\"name\":\"f1\",\"type\":\"string\"},{\"name\":\"f2\",\"type\":\"com.acme.Referenced\"}]}",
       "references": [
         {
           "name": "com.acme.Referenced",
           "subject": "hello",
           "version": 1
         }
       ]
     }'

```

However, I get the following error: `"com.acme.Referenced\" is not a defined name. The type of the \"f2\" field must be a defined name or a {\"type\": ...} expression."}`.

Any chance anyone know what is the cause of this error?

---

<div class="post-metadata">

**Author:** ![brianshih1](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/brianshih1/32/3960_2.png) [@brianshih1](https://forum.confluent.io/u/brianshih1)\
**Post date:** [27 February 2025 00:28 UTC](https://forum.confluent.io/t/schema-references-error-failed-to-register/37338/2 "2025-02-27T00:28:22Z")

</div>

This is using `docker.io/bitnami/schema-registry:7.8`

---

<div class="post-metadata">

**Author:** ![ryokota](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/ryokota/32/3901_2.png) [@ryokota](https://forum.confluent.io/u/ryokota)\
**Post date:** [9 June 2025 08:21 UTC](https://forum.confluent.io/t/schema-references-error-failed-to-register/37338/3 "2025-06-09T08:21:37Z")

</div>

You can only use schema references in Avro to refer to named types. So the schema posted under the subject `hello` should be a record with name `com.acme.Referenced`
