Error with Expenses API when I try to make a POST Create Expense

I’m using the Make.com platform and I’m trying to post an expense via the Clockify API.

I did a test using “content-type = application/json”
And I get the following error

The operation failed with an error. [415] Content-Type is not supported

I then ran a test with “multipart/form-data” as mentioned in the API documentation.

And I get the following error:
[400] Failed to parse multipart servlet request

Any suggestions? Thanks in advance.
Eric

1 Like

Hello there,

In order to troubleshoot this, would you mind contacting our Support at support@clockify.me?

Hi @TheBig. I’m having the same issue. Did you find any solution?
I’ve just tried posting a Category and it works fine.

Hello @LaurenM,

After several exchanges with the Clockify support team and then with the Make team, the solution was to use the “HTTP module” instead of the “API CALL” in order to create an “EXPENSE”.

— Transcript from Clockify Support team who found the solution —

URL: https://api.clockify.me/api/v1/workspaces/{workspaceId}/expenses
Headers:
Name: X-Api-Key
Value: input your API key

Method: POST

Body type: Pick multipart/form-data

Fields: Make sure that the field value is “Text”. Key and values can be found in our API doc.

1 Like