# Create Asset REST API

**URL:** <https://forum.mautic.org/t/create-asset-rest-api/19091>\
**Category:** Development\
**Tags:** development\
**Created:** [April 20, 2021, 11:56am UTC](https://forum.mautic.org/t/create-asset-rest-api/19091 "2021-04-20T11:56:40Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![trupti](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/trupti/32/1420_2.png) [@trupti](https://forum.mautic.org/u/trupti)\
**Post date:** [April 20, 2021, 11:56am UTC](https://forum.mautic.org/t/create-asset-rest-api/19091/1 "2021-04-20T11:56:40Z")

</div>

For creating assets I am referring  
[https://developer.mautic.org/#create-asset](https://developer.mautic.org/#create-asset)  
if storageLocation is local I need to ask what value I can add in file parameter?  
I attach with this postman collection json.  
**Http request** :  
URI: POST [https://tdtp.mautic.net/api/assets/new](https://tdtp.mautic.net/api/assets/new)  
**Header** :  
Content-Type: application/json  
Authorization: Bearer NGU4OTBmYWFiNDlmZjBhNmFiYjUzM2M2NmU5Yjc4ZjA2ZjE0OWY5OTQwZmFiNDNjNmU3MWEyODJiZmE1MWMzYw  
**Body** :  
{“title”: “postman1”, “category”: “consu”, “isPublished”: true, “storageLocation”: “local”,  
“file”: “[https://www.mautic.org/media/logos/b979aca7949a1c530b4c92e0af472a3a0ac93a7a.pdf](https://www.mautic.org/media/logos/b979aca7949a1c530b4c92e0af472a3a0ac93a7a.pdf)”   
}

**HTTP Response:**  
Status: 400 Bad Request  
Body:  
{  
“errors”: [  
{  
“code”: 400,  
“message”: “File [https://www.mautic.org/media/logos/b979aca7949a1c530b4c92e0af472a3a0ac93a7a.pdf](https://www.mautic.org/media/logos/b979aca7949a1c530b4c92e0af472a3a0ac93a7a.pdf) was not found in the asset directory.”,  
“details”:   
}  
]  
}

Please guide me how to create assets using rest api if storage location is local.
