Unexpected end when deserializing object via api

I’m submitting a…

Bug report

Current behavior

  1. setup role guest,

  2. add permission to my schema: contents.contact.create

  3. submit via api (with chrome and with postman) with bearer token with sample data:
    {
    “name”: “aaA”,
    “organisation”: “test”,
    “natureOfBiz”: “tech”,
    “requestFor”: “app,website”,
    “duration”: 1,
    “detail”: “blabla”
    }

  4. throws error 400
    {
    “message”: “Validation error”,
    “traceId”: “00-88ca62a16a697d42a54c712a11020bb7-8039456b1af2654f-00”,
    “type”: “https://tools.ietf.org/html/rfc7231#section-6.5.1”,
    “details”: [
    “Unexpected end when deserializing object. Path ‘’, line 8, position 1.”
    ],
    “statusCode”: 400
    }

Expected behavior

should work

Minimal reproduction of the problem

Environment

  • [ ] Cloud version

Version: cloud version

Browser:
Chrome (desktop) andPostman

Others:

In squidex all properties are nested objects because of localization. So your request needs to be like

{
"name": {
	"iv": "aaA"
},
...
}

BTW: Please use code blocks next time

thank you.
ive changed the post parameter, but getting error 403. but the record is created.

{
    "message": "You do not have permission for this schema.",
    "errorCode": "FORBIDDEN",
    "traceId": "00-590bfc5a78e4cb49af20f702c2f141bd-2295b692dc731245-00",
    "type": "https://tools.ietf.org/html/rfc7231#section-6.5.3",
    "statusCode": 403
}
{
    "name": {
        "iv": "aaA 222"
    },
    "organisation": {
        "iv": "test"
    },
    "natureOfBiz": {
        "iv": "tech"
    },
    "requestFor": {
        "iv": "app,website"
    },
    "duration": {
        "iv": "1"
    },
    "detail": {
        "iv": "blabla"
    }
}

hi, anyone can help?

Sorry, I have just forgotten this thread.

When you only have the create permission: contents.contact.create this is just like expected. You also need read permission.