# Question - API validation errors occurred

**URL:** https://discussions.eramba.org/t/question-api-validation-errors-occurred/3113
**Category:** Forum - Software
**Created:** [May 18, 2023, 12:35pm UTC](https://discussions.eramba.org/t/question-api-validation-errors-occurred/3113 "2023-05-18T12:35:32Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![wesney.silva](https://discussions.eramba.org/letter_avatar_proxy/v4/letter/w/dec6dc/32.png) [@wesney.silva](https://discussions.eramba.org/u/wesney.silva)
#### Post date: [May 18, 2023, 12:35pm UTC](https://discussions.eramba.org/t/question-api-validation-errors-occurred/3113/1 "2023-05-18T12:35:32Z")

</div>

Hi all!

I am trying to use the API to create assets in Eramba. I am using the following JSON:

{‘name’: ‘teste’, ‘description’: ‘teste2’, ‘asset\_label\_id’: 1, ‘asset\_media\_type\_id’: 1, ‘review’: ‘2023-11-14’, ‘created’: ‘2023-05-18’, ‘edited’: ‘2023-05-18’, ‘asset\_owners’: [‘Group-40’], ‘asset\_guardians’: [‘Group-40’], ‘asset\_users’: [‘Group-40’], ‘business\_units’: [9], ‘legals’: [7], ‘related\_assets’: [1], ‘asset\_classifications\_1’: [‘2 - Restrita’]}

however, I am receiving this error:

{“exception”:“ValidationException”,“message”:“8 validation errors occurred: asset\_owners.isArray - The provided value is invalid; business\_units.belongsToMany - This field cannot be left empty; business\_units.isArray - The provided value is invalid; related\_assets.isArray - The provided value is invalid; legals.isArray - The provided value is invalid; asset\_guardians.isArray - The provided value is invalid; asset\_users.isArray - The provided value is invalid; asset\_classifications\_1.isArray - The provided value is invalid; “,“url”:”/api/assets/add”,“error”:{},“code”:422}

Does anybody knows how can I send these fields?

---

<div class="post-metadata">

### Author: ![kisero](https://discussions.eramba.org/user_avatar/discussions.eramba.org/kisero/32/2925_2.png) [@kisero](https://discussions.eramba.org/u/kisero)
#### Post date: [June 5, 2023, 7:51am UTC](https://discussions.eramba.org/t/question-api-validation-errors-occurred/3113/2 "2023-06-05T07:51:09Z")

</div>

> [@wesney.silva](#):
>
> {‘name’: ‘teste’, ‘description’: ‘teste2’, ‘asset\_label\_id’: 1, ‘asset\_media\_type\_id’: 1, ‘review’: ‘2023-11-14’, ‘created’: ‘2023-05-18’, ‘edited’: ‘2023-05-18’, ‘asset\_owners’: [‘Group-40’], ‘asset\_guardians’: [‘Group-40’], ‘asset\_users’: [‘Group-40’], ‘business\_units’: [9], ‘legals’: [7], ‘related\_assets’: [1], ‘asset\_classifications\_1’: [‘2 - Restrita’]}

If i copy paste your JSON to an online validator:

 ![image](https://discussions.eramba.org/uploads/default/original/2X/6/6d496d0d48bafe7de1c53b42b48528ede233b9de.jpeg)

you are mixing up quote strings for sure, there might be something else. please use the documentation, we have an extensive library of examples.
