@amitsolanki24_ No one can help with “not working”. Please tell us what actually happens.
Also, as @gych says, it’s completely redundant to call your own API from a server-side route. Why are you doing this, instead of just uploading the file using $request->file('attachment')->store() or whatever?
@amitsolanki24_ Yes but not everything the client wants is the best solution.
As a developer you should advise your client on what the best practice is.
And its also not needed to use url() helper when you're calling the route from the same server you can just use the url path.
@amitsolanki24_ Well tell your client it’s completely redundant to make a HTTP request to their application, just for their application to then start another HTTP request… to itself 🤦♂️