Hi Everyone,
We create a file using “https://domain.myfreshworks.com/crm/sales/api/documents” API in FreshSales.
But we are facing this { errors: { code: 400, message: [ ‘Bad Request’ ] } }.
The body we pass through the API:
Thank You.
Hi Everyone,
We create a file using “https://domain.myfreshworks.com/crm/sales/api/documents” API in FreshSales.
But we are facing this { errors: { code: 400, message: [ ‘Bad Request’ ] } }.
The body we pass through the API:
Thank You.
Hi S.Ram.K
A “400 Bad Request” error usually indicates an issue with the request you’re sending to the API. Based on your description, you’re using the FreshSales “Create a File” API. To help you troubleshoot this issue, please ensure the following points:
Check the API endpoint URL: Ensure you’re using the correct domain and API endpoint. It should be in the format: https://yourdomain.myfreshworks.com/crm/sales/api/documents
Ensure correct method: The API call should be a POST request.
Authorization: Ensure the API key you’re using for authorization is correct and valid.
Content-Type: Make sure you’re using the correct content-type for file upload in your request header. It should be multipart/form-data
.
Verify the request body: Ensure you’re passing the required parameters in the request body, such as file, folder_id, and parent_id