# https://api.hubapi.com/filemanager/api/v3/files/upload 415 error

**URL:** <https://community.hubspot.com/t/https-api-hubapi-com-filemanager-api-v3-files-upload-415-error/76927>\
**Category:** APIs & Integrations\
**Tags:** enterprise\
**Created:** [March 10, 2023, 11:36am UTC](https://community.hubspot.com/t/https-api-hubapi-com-filemanager-api-v3-files-upload-415-error/76927 "2023-03-10T11:36:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![cpradalier](https://avatars.discourse-cdn.com/v4/letter/c/6bbea6/32.png) [@cpradalier](https://community.hubspot.com/u/cpradalier)\
**Post date:** [March 10, 2023, 11:36am UTC](https://community.hubspot.com/t/https-api-hubapi-com-filemanager-api-v3-files-upload-415-error/76927/1 "2023-03-10T11:36:15Z")

</div>

hi,

i send this

curl\_setopt\_array($curl, array(

CURLOPT\_URL =\> ‘[https://api.hubapi.com/files/v3/files/import-from-url/async](https://api.hubapi.com/files/v3/files/import-from-url/async)’,

CURLOPT\_RETURNTRANSFER =\> true,

CURLOPT\_ENCODING =\> ‘’,

CURLOPT\_MAXREDIRS =\> 10,

CURLOPT\_TIMEOUT =\> 0,

CURLOPT\_FOLLOWLOCATION =\> true,

CURLOPT\_HTTP\_VERSION =\> CURL\_HTTP\_VERSION\_1\_1,

CURLOPT\_CUSTOMREQUEST =\> ‘POST’,

CURLOPT\_POSTFIELDS =\>'{

“access”: “PUBLIC\_INDEXABLE”,

“name”: “test101202.pdf”,

“url”: “[https://myspace.com/101202/administratif/test101202.pdf](https://myspace.com/101202/administratif/test101202.pdf)”,

“folderId”: “63326534593”,

“duplicateValidationStrategy”: “NONE”,

“duplicateValidationScope”: “EXACT\_FOLDER”,

“overwrite”: true

}',

CURLOPT\_HTTPHEADER =\> array(

```
'Authorization: Bearer pat-\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*',

'Content-Type: application/json'

```

),

));

the return status is

Error 415 Unsupported Media Type

i tried with a .txt instead a .pdf it’s exactly the same

thanks for your help

---

<div class="post-metadata">

**Author:** ![Jaycee\_Lewis](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jaycee_lewis/32/61352_2.png) [@Jaycee\_Lewis](https://community.hubspot.com/u/Jaycee_Lewis)\
**Post date:** [March 10, 2023, 8:02pm UTC](https://community.hubspot.com/t/https-api-hubapi-com-filemanager-api-v3-files-upload-415-error/76927/2 "2023-03-10T20:02:29Z")

</div>

Hey, @cpradalier One quick question — does [https://myspace.com/101202/administratif/test101202.pdf](https://myspace.com/101202/administratif/test101202.pdf) work for you? I got a 404.  
I wonder if we could test with a different PDF or with a different URL.

Best,

Jaycee

---

<div class="post-metadata">

**Author:** ![cpradalier](https://avatars.discourse-cdn.com/v4/letter/c/6bbea6/32.png) [@cpradalier](https://community.hubspot.com/u/cpradalier)\
**Post date:** [March 13, 2023, 8:43am UTC](https://community.hubspot.com/t/https-api-hubapi-com-filemanager-api-v3-files-upload-415-error/76927/3 "2023-03-13T08:43:32Z")

</div>

the adress is [https://db-apart.com/101202/administratif/test101202.pdf](https://myspace.com/101202/administratif/test101202.pdf)
