How to specify content type for text key when using multipart-form-data

Dear community,

I am facing an issue with a HTTP call in make.com !
I try to send a document to an API with module HTTP from Make but I received every time an error.

{
    "timestamp": "2024-02-06T12:47:53.861+00:00",
    "status": 415,
    "error": "Unsupported Media Type",
    "path": "/registered_mail/v4/sendings/79cb30fc-9e0e-4c55-969c-786d88c8d116/documents"
}

After investigation, I saw that I have to set up a content-type = application/json for my metadata but I did’nt find the way how to do it with a body form data.

For your information:
→ PATH PARAMETERS = sending_id
→ REQUEST BODY SCHEMA = multipart/form-data
→ Content of the body (see the screenshot named postman).

Someone has the same issue and find the solution ?

Thank you in advance for your help :slight_smile:

What I have in make.com:
make

What I must have (it works well on postman and I recieve the status 201 !

Welcome to the Make community!

Can you try without the metadata to see if the attachment goes through? This is to rule out any issues with the attachment, as your error message says “Unsupported Media Type”.

Can you provide a link to the endpoint in the external service’s API documentation reference, which you are trying to make a request from your HTTP module?

2 Likes

Hello,

Thank you for your help !
I try to send the attachment without METADATA and I receive this information:

code	EMPTY_METADATA
message	Les méta-données sont vides

You have the doc here => Envoi et suivi de Maileva LREL | OpenAPI Maileva and the link I tried to upload the doc => https://api.sandbox.maileva.net/registered_mail/v4/sendings/{{19.data.id}}/documents

Hi,

Impossible in Make, we found a limit ! :frowning:
Response of Make below:

Hi,

Greetings from Make Customer Care team.

Apologies, per design specifying content type is supported only when Body type is Raw, when multipart-form-data is selected please input desired key - value pair.

Let me know should you have any further questions related to this issue. If you need help with something else, please submit a new ticket and we will get back to you promptly.

Kind regards,

2 Likes

Hello @zeway

I just wanted to quickly say thank you for sharing the insights you got from our Support team with the rest of the community. We all 100% appreciate it :pray:

1 Like