Discussions

Ask a Question
Back to All

422 error /v1/company/documents

I'm using the following code:

curl --location --request POST 'https://api.personio.de/v1/company/documents?employee_id=*myEmployeeID*&category_id=*myCategoryID*&title=test2'
--header 'Authorization: Bearer myBearerToken'
--form '[email protected]"/opt/PCDOCS/dochousetest/aufgaben/2022/08/24/1043_783.pdf"'

I'm getting the following error response:

{"success":false,"error":{"message":"The given data was invalid.","code":0,"error_data":{"file":["The file must be a file of type: pdf, docx, doc, jpg, zip, png, txt, jpeg, odt, xlsx, rtf, htm, xls, p7s, pptx, pages, rar, ppt, gif, tif, html, msg, eml, asc, tiff, wps, bmp, 7z, csv, ics, vcf, dotx, numbers, eps, gz, ods, otf, odp, odg, rtfd, txz, webarchive, xml, xps, md, fax, asice."]}

What am I missing?