# 42201 error: Not able to register schema

**URL:** <https://forum.confluent.io/t/42201-error-not-able-to-register-schema/2973>\
**Category:** Schema Registry\
**Created:** [2 October 2021 22:12 UTC](https://forum.confluent.io/t/42201-error-not-able-to-register-schema/2973 "2021-10-02T22:12:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kkhambadkone](https://avatars.discourse-cdn.com/v4/letter/k/96bed5/32.png) [@kkhambadkone](https://forum.confluent.io/u/kkhambadkone)\
**Post date:** [2 October 2021 22:12 UTC](https://forum.confluent.io/t/42201-error-not-able-to-register-schema/2973/1 "2021-10-02T22:12:43Z")

</div>

I am trying to register a json schema from a file, I keep getting this error

curl -X POST -H “Content-Type: application/vnd.schemaregistry.v1+json” --data “@/Users/kkhambadko001/poapprover-schema-1line.json” [http://localhost:8081/subjects/orders-approver-topic/versions](http://localhost:8081/subjects/orders-approver-topic/versions)

{“error\_code”:42201,“message”:“Empty schema”} **%**

---

<div class="post-metadata">

**Author:** ![kkhambadkone](https://avatars.discourse-cdn.com/v4/letter/k/96bed5/32.png) [@kkhambadkone](https://forum.confluent.io/u/kkhambadkone)\
**Post date:** [3 October 2021 01:01 UTC](https://forum.confluent.io/t/42201-error-not-able-to-register-schema/2973/2 "2021-10-03T01:01:42Z")

</div>

I managed to fix this issue.

---

<div class="post-metadata">

**Author:** ![gklijs](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/gklijs/32/223_2.png) [@gklijs](https://forum.confluent.io/u/gklijs)\
**Post date:** [4 October 2021 04:14 UTC](https://forum.confluent.io/t/42201-error-not-able-to-register-schema/2973/3 "2021-10-04T04:14:26Z")

</div>

For future reference it might be nice to put the solution here as well. Based on my own experience I suspect the schema wasn’t escaped properly? As the whole schema should itself be just a String, not something nested.
