Hi,
I’m trying to create a Links
field and set the editor to link_embed
instead of the default link_select
. However, I’m getting a 422 INVALID_FIELD
trying to do this. Doing it through the GUI does work so I must be doing something wrong here. Can you help out?
Request and response below.
Cheers,
Floris
Request
POST https://site-api.datocms.com/item-types/390858/fields
content-type: application/json
accept: application/json
authorization: Bearer [REDACTED]
user-agent: js-client v3.2.0
X-Api-Version: 3
X-Environment: floris-tenhove--local--feature-ch8704
{"data":{"type":"field","attributes":{"label":"Cases","field_type":"links","api_key":"featured_cases","localized":false,"validators":{"items_item_type":{"item_types":["390871"]}},"appearance":{"editor":"link_embed","addons":[],"parameters":{}},"hint":null},"relationships":{"fieldset":{"data":{"type":"fieldset","id":"5795"}}}}}
Response
422 Unprocessable Entity
{"data":[{"id":"f7f81e","type":"api_error","attributes":{"code":"INVALID_FIELD","details":{"field":"appearance.editor","code":"VALIDATION_INVALID","message":"incompatible with field type"}}}]}
Exception details:
ApiException: 422 INVALID_FIELD (details: {"field":"appearance.editor","code":"VALIDATION_INVALID","message":"incompatible with field type"})